views:

22

answers:

2

Hello,

I am trying to build a DB replication using MSSQL 2005. Both publisher and subscriber are SQL Server database. I know I can create subsriber database from the snapshop of publisher. However, snapshot agent will put the share lock on publisher DB, which is a production database. Is there any way I can build a replication and initialize subscriber db from restoring a DB backup instead of running snapshot agent?

Thanks

A: 

You can. Here are some things to be aware of:

  • You can use profiler to see the scripts that are running at any given time (use it while performing a backup and a restore)
  • If you are using a restore to copy a database, once its finished, any users that were tied to the backed up database will have to be recreated.
Gabriel McAdams
Thanks, if there any online document for my reference?
qshao
http://msdn.microsoft.com/en-us/library/ms190436.aspx
Gabriel McAdams
http://blog.sqlauthority.com/2007/02/25/sql-server-restore-database-backup-using-sql-script-t-sql/
Gabriel McAdams
http://www.sqlteam.com/article/backup-and-restore-in-sql-server-full-backups
Gabriel McAdams
A: 

Thanks, is there any online document for my reference. I would like to know more detail about how to create the replica using backup and restore.

qshao