Attach db with error 5105....URGENT>>Please
I detached a database from my client machine (I was not on the server). Now when I try to attach it again from the client machine, Im not able to do so....please help !!!
What do I need to do ?....I cant log onto the server, once in the server room,since the database is the default one.
Server: Msg 5105, Level 16, State 4, Line 1
Device activation error. The physical file name 'E:\mssql7\data\ABC_data.mdf' may be incorrect.
To solve your immediate problem, you can log in specifying a database through the command line.
Start isql: isql -U sa -d master
Then you can change your default db:
sp_defaultdb 'sa', 'master'.
As to why your attach is failing, verify that E:\MSSQL\DATA is the correct folder on both machines.
Im sorry Jbane, Im relatively new to SQL Server...when you say"isql"...how do I start it ?...do I need to supply a password for sa ?
My client machine does not have the "E:\mssql7.... path, since that path is only on the server box...but since I was able to detach, I thought I could attach as well from the client and not the server box
thanks for your help
ISQL is launched from the command prompt in windows. Just select 'run' from the start menu and type 'cmd' to get a command prompt. Then you can launch the program using:
isql -U sa -d master -P password
Now you will be at a prompt where you can use sql commands:
sp_defaultdb 'sa', 'new default database name'
This will set your default db for the sa account to something else. Or you can substitute your user account for 'sa'.