Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
kayladallinga
Starting Member
4 Posts |
Posted - 2008-01-15 : 15:49:35
|
| I have a database whose .mdf and .ldf files have turned up missing.I know the login for the database, however, enterprise manager is not functioning on this pc.I have a .bak file that I need to restore, and I am unsure how to accomplish that using an osql command.When I attempt to login using OSQL I get a DBNETLIB error. The services cannot be started, and I am assuming this is because of the missing mdf and ldfs.Any Suggestions? |
|
|
jackv
Master Smack Fu Yak Hacker
2179 Posts |
Posted - 2008-01-16 : 05:18:57
|
| To Restore from OSQL use - osql -S myServer -E -Q " RESTORE DATABASE myDB FROM DISK = 'C:\Temp\myDB.bak' " Could you post the full error message you are getting and the osql statement. ?Jack Vamvas--------------------Search IT jobs from multiple sources- http://www.ITjobfeed.com |
 |
|
|
kayladallinga
Starting Member
4 Posts |
Posted - 2008-01-16 : 09:33:57
|
| The latest error message, from that string:osql -S HELPDESK\TRACKIT70 -E -Q " 'RESTORE DATABASE MSSQL$TRACKIT70 'c:\TRACKIT70_DATA_20080109_044501AM.bak' "is:[TCP/IP SOCKETS]SQL Server does not exist or access is denied.[TCP/IP SOCKETS]ConnectionOpen (Connect()). |
 |
|
|
kayladallinga
Starting Member
4 Posts |
Posted - 2008-01-16 : 09:45:34
|
| osql -S HELPDESK\TRACKIT70 -E -Q " RESTORE DATABASE MSSQL$TRACKIT70 'c:\TRACKIT70_DATA_20080109_044501AM.bak' "Sorry - that's the correct syntax there. |
 |
|
|
jackv
Master Smack Fu Yak Hacker
2179 Posts |
Posted - 2008-01-17 : 07:49:47
|
| just to be clear , is the second post giving you an error?Jack Vamvas--------------------Search IT jobs from multiple sources- http://www.ITjobfeed.com |
 |
|
|
kayladallinga
Starting Member
4 Posts |
Posted - 2008-01-17 : 09:45:39
|
| Yes |
 |
|
|
|
|
|