Showing posts with label become. Show all posts
Showing posts with label become. Show all posts

Sunday, March 25, 2012

attach data file

I have MS SQL server database with two files
1- x_data.mdf, 2- x_log.ldf
The database become suspect and i have no space problem.
now the problem is that the log file become corrupted because when i stop the database service I tray to copy the log file into another place but I can't
Now the result is that I have one data file x_data.mdf and how can I solve the problem
and the question is how can I back the data again when I have a data file without a log file
Thankstry attaching the database file.
right click server --> attach database.
while attaching it recreates the log file.

Sunday, February 12, 2012

asp.net cannot connect to sql 2000

i have do a web site with asp.net 2.0

when i run the on the development pc it can coonect to db

when i publish the website, it become cannot connect to sql2000

the conn string as below
strConn = "Data Source=SHHDB;Initial Catalog=test8;Persist Security Info=True;User ID=sa;Password=;Trusted_Connection=yes;Current Language=British;"

the DB server is on other pc with same network

and i have public it to same pc with the development pc

it come out with "erro like cannot connect to sqlserver 2005, name pipe error: 40"

the problem is the both iis and dbpc don have sql 2005

only db server installed sql 2000

Hi,

From your question, it seems your application is attemp to use the LocalSqlServer connectionstring which needs a attached Sql Express database, so please don't use the LocalSqlServer and open your Web.Config file and in the ConnectionString node, modify your connection string and make it look like "Data Source=ServerName\InstanceName(or IP address);Initial Catelog=DatabaseName; User id=;Password=". Meantime, as your DB server is on other pc with same network, so please use some tools such as QA to verify if the remote database server can be accessible first.

Thanks.

|||

Sorry duplicate post

|||

Hi,

do you've admin rights to database server? if yes then by yourself or else ask your admin to enable remote connection on the database server. may be following link will help you

http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SQL-Server-2005/Q_22604523.html

thanks,

satish.