Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Attaching db

Status
Not open for further replies.

redsand23

Technical User
Feb 22, 2002
77
US
I am new to this so please excuse the ignorance. I have an sql db on a standalone server that is not on our network.

I copied the mdf & ldf and copied them onto a stick and put them on the network production sql box. I tried to do an attach database and received the following error

error 9003. The LSN (410:55337:1) passed to log scan in database 'axdb_30' is invalid.

Am I doing this the correct way? Should I be doing an attach? The db did not exist on the production box.

Anyhelp would be greatly appreciated.



 
Attach the db without the log file.
Just uncheck the log.

- Paul
10qkyfp.gif

- If at first you don't succeed, find out if the loser gets anything.
 
When I do the attach it pulls the ldf in by default if I uncheck it(puts a redx in) I get the following error.
Defice activation error, the physical name(log file name) may be incorrect.

Is there another way to attach outside of the right click attach db method?
 
Delete the log file from your device. Then attach it.

- Paul
10qkyfp.gif

- If at first you don't succeed, find out if the loser gets anything.
 
I deleted any instance of the log file off of the server. When I right click on database/attach, and point it to my mdf it pulls the log file from the same location. If I clear the path the okay button goes grey. I don't see a way to remove it ldf file from attach function?
 
Let it pull the path from where your mdf is. It should create a new one for you.

- Paul
10qkyfp.gif

- If at first you don't succeed, find out if the loser gets anything.
 
First thing....how did you copy the .mdf and .ldf files? Did you stop the SQL Server services or did you detach the database before you copied the files? If you copied the files while the database was still online, then the copies are not usable.

-SQLBill

Posting advice: FAQ481-4875
 
It would not let me copy the db while sql service was up and running. So I stopped services then copied.
 
It gives me the redx saying that the ldf does not exist and I get the following error.

Could not open new database axdb_30. create database is aborted.
Device activation error. The physical file name d:\xxx\axdb_30_log.ldf may be incorrect.
 
Did you copy the .mdf file to the local hard drive and that is the copy you are trying to attach correct?

- Paul
10qkyfp.gif

- If at first you don't succeed, find out if the loser gets anything.
 
I copied the db local(non networked machine) zipped it up, put it on a stick, copied it to the network production box, unzipped it and then tried to attach.
I appreciate your help!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top