HOWTO: Copy the Tailwind Database

From Tailwind Wiki

Jump to: navigation, search

Contents

Materials

image:Important-1.png NOTE:   To save the above link, right click on the link and click "Save As...", "Save Target As..." or "Save Link As..." depending on your web browser.

Procedure

Installing the Stored Procedure

  • Download the Copy Database Stored Procedure onto the server
    • Save it into the root of your C:\, or another easily-accessible place
  • Open a command prompt, using StartRuncmd
  • Navigate to the directory that you saved the SQL script, using the cd command, eg:
   cd c:\
  • Execute the SQL script on your database, using the following command:
   osql -E -d master -n -i "sp_copy_db.sql"
  • The following output, indicating success, should be generated:
   Using Master database
   Checking for the existe
   Created the procedure.

image:Important-2.png NOTE:This has not actually copied your database - just installed the stored procedure that we will use to do so.

Copying the Database

image:Important-3.png NOTE: No users (this includes the Tailwind Agent) can be connected to the database you are trying to copy. If anyone is connected to the database, the copy will fail.

  • To copy the Tailwind database, Open a command prompt, using StartRuncmd
  • Establish a connection to the SQL server by entering the following command:
   osql -E
  • Upon establishing a successful connection, you will be greeted with the following prompt:
   1>
  • Enter the following:
   1> sp_copy_db OLD_DATABASE_NAME, NEW_DATABASE_NAME
   2> go

Where OLD_DATABASE_NAME is the name of the database you wish to copy, and NEW_DATABASE_NAME is the name of the database you wish to create

  • Upon successful completion of the copy command, the following output will be generated:
   1 file(s) copied.
   NULL
   Attaching OLD_DATABASE_NAME...
   Attaching NEW_DATABASE_NAME...
   Done

The Tailwind database has now been copied.

Related Articles