Shell command to stop sql server

Directlinq

Registered User.
Local time
Today, 05:59
Joined
Sep 13, 2009
Messages
67
Hi at the moment im running a shell command to stop my sqlserver 2000. This is the command.
cmd net stop MSSQLSERVER
this will stop my sql server but i cannot start it again. Unless i log off my pc and log back on again.but if i type this into dos command window not in access. It shuts down perfectly and i can start it up again without any problems. But doing it in access stops me starting it again. Has anyone got any ideas why it is doing this.
Many thanks
 
Can I ask why you want to stop your SQL Server? Does this not affect any other users currently logged in or is this an admin thing?

David
 
It is because i need to copy over my .mdf and .ldf files and i cant do that when the server is running. There is only one user anyway.
 
Don't quote me on this but I am sure that you could set up a DTS to take the SQL Server offline and do the copy. Not sure about the resetart though. Problem is start up usually needs login credentials.

David
 
There is an easier way to do this.
Use sp_detach_db to detach(duh) your database from SQL Server. Now you can copy/delete that specific database without bugging anyone.
When copied, reattach the database with sp_attach_db

Or google sp_detach_db

Enjoy!
 
I cannot use detatch as i have not got rights to do so. No one has. The company that built my software that uses the sql server have gone bankrupt. The only thing that has full access to my database is the software. The only way around this is to copy the mdf to my other computer. Attach it to the instance of that sql server. Use my access front end to edit the data. Then copy the .mdf file back which i can only do when the sql server is stopped. If you want the full story i will expalin but the above is a breif outline of my problem.
Many thanks
 
In order to do anything meaningfull to the data on the server you need to have a user account on that SQL Server. The bankrupt company usually has a obligation to perform support on their product or another company that supports that product. At least that's in the Netherlands. You should be able to get the login data for that application from that company and even support.

If that doesn't get you anywhere, you have three options:
  1. Hack the application to retrieve username and password for the SQL Server database
  2. Continue stopping the SQL Server like you are doing now
  3. Consider using another/similar application
HTH:D
 
Thanks for your reply

option 1 i have the user name just not the password. If i am correct the only way to hack the password is brute force. Is this correct?

option 2 possible but a pain in the *rse

option 3 i cant use another bit of software as the software has been specifically writen to use the hardware mpeg decoders in the pc.

Many thanks
 
option 1. There are several ways to retrieve the password. None of which are easy. Using brute force is the "easiest" way however it might take you a few years. The other options cost a lot of money/effort.

This is a long shot but it helped me in the past: strings in executables are usually readable. But only if the username and password are hardcoded. So if you change the extension of your program from exe to txt and open it with notepad then search for the username.

HTH:D

[edit]this is my 1500th post[/edit]
 
Last edited:

Users who are viewing this thread

Back
Top Bottom