Copy Database files from command line

已答复 Copy Database files from command line

  • 2012年8月3日 3:01
     
     

    Hi folks,

    I have a very bad issue.

    Something has happened in our Windows Server 2003 Server and we cannot access to dtabase files from explorer.

    We need to copy them to a safe place to solve the server problem and recover the databases again.

    I have access to files from command line but it seems tha databases are in use so we I am not able to copy them.

    Help please.

    Thanks a lot  in advance.

全部回复

  • 2012年8月3日 3:05
     
     已答复

    Hi,

    If you cannot copy your database files, as you mentioned, they might be in use.

    hmm,

    You have to stop your SQL Server service from CMD using "net start MSSQLSRV" which MSSQLSRV is the name of your sql server instance.

    After your SQL Server Sevice stops successfully you will be able to copy your databases from command line.

    Cheers.


    MCP, MCTS, MCITP

    • 已标记为答案 Glen1983 2012年8月5日 3:36
    •  
  • 2012年8月5日 3:36
     
     

    YES,

    Thanks, it worked.