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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Database - making copies

Author  Topic 

dan_a
Starting Member

2 Posts

Posted - 2008-07-22 : 08:51:51
Hi,
The main idea is to take a database
and make copies of it with current date and then add them to
database server and make them off line.

What is the order of actions? backup / restore / attach etc..
Any scripts commands I can use?
Please show me an example

10x
Daniel

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-07-22 : 09:43:47
Use backup/restore.
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-07-22 : 23:43:21
Find detailed syntax and samples in books online.
Go to Top of Page

dan_a
Starting Member

2 Posts

Posted - 2008-07-23 : 01:55:55
Well I did some tests but using the Transfer object in C#
didnt move data and schemas at all...error messege

I used the tools in SQL Server in order to restoreand found out the
the target database can be rename so it can be new database instead the original...
How can I do the same action in script?

10x once again...
Daniel
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-07-24 : 14:46:02
You can specify different db name in restore statement.
Go to Top of Page
   

- Advertisement -