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.
| Author |
Topic |
|
inbs
Aged Yak Warrior
860 Posts |
Posted - 2010-11-10 : 08:44:25
|
| i want to backup my DB in production server and restore it in development serverhow can i do it in daily? |
|
|
pk_bohra
Master Smack Fu Yak Hacker
1182 Posts |
Posted - 2010-11-10 : 09:12:39
|
| Hi,Have a look at:http://www.sqlservercentral.com/articles/Backup+%2F+Restore/71272/Regards,BohraI am here to learn from Masters and help new bees in learning. |
 |
|
|
inbs
Aged Yak Warrior
860 Posts |
Posted - 2010-11-11 : 05:37:58
|
| i have 2 servers:DevServer -DevelopmentServerProdServer - ProductionServerRESTORE DATABASE DevServer.[DBTest] FROM DISK = N'\\store\DBTest.bak' WITH FILE = 1, NOUNLOAD, REPLACE, STATS = 10i get this error:"Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon."how can i run this on ProdServer (In job)? |
 |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2010-11-11 : 09:55:48
|
RESTORE DATABASE DevServer.[DBTest] FROM DISK = N'\\store\DBTest.bak' WITH FILE = 1, NOUNLOAD, REPLACE, STATS = 10 |
 |
|
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2010-11-11 : 11:30:43
|
| You can't run the restore from the production server, it has to be run from dev. Set up a job on the dev server that copies the backup over (if necessary) then restores it.--Gail ShawSQL Server MVP |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|