HOWTO: Copy the Tailwind Database
From Tailwind Wiki
Contents |
Materials
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 Start → Run → cmd
- 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.
NOTE:This has not actually copied your database - just installed the stored procedure that we will use to do so.
Copying the Database
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 Start → Run → cmd
- 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.
