.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

initialize subscriber from backup

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :
  1. Set up the Distributer – database and share – one time setup
  2. Set up Publisher on source server - Don’t use either checkbox for snapshot.
  3. Enable the flag under the Publication properties to allow “initialize from backup”.
  4. Disable the distribution cleanup agents. Make a Full backup of the database. Keep a local copy as you'll need it later.
  5. Copy database to other site. Restore database with the same name
  6. Create pull subscription on the destination server. Check status – Replication monitor -> drill down to publisher ,“View details on the subscription on the right to get a status report After it’s done synching up, turn off the “initialize from backup” flag or else the cache it keeps will never shrink. And re-enable the distribution cleanup agents.
  7. TEST IT. Check the tables after synchronization and then check again after new transactions have been sent.


in 4th step

 Keep a local copy of backup as you'll need it later.


View Complete Post

More Related Resource Links

'Initialize with backup' Option in transactional Replication


We have set 'Initialize with backup'  while intialially restoring the backup over subscriber.My question is

When there is a failure on sunscriber or agent will I be able to reintialise the snapshot without changing any setting?

SQL Server Backup and Restore (video)

Restore your full backup, then run a few queries before you keep restoring transaction logs. Brent shows how to use the Standby option for restores.

In this five minute video, Brent demonstrates how to do it by creating a database, populating data, and then showing what disaster recovery is like by doing RESTORE WITH STANDBY.

How to backup SMS from windows mobile Pocket PC to computer

How to backup SMS from windows mobile Pocket PC to computer

Many Windows Mobile Pocket PC Phone users could not backup their SMS to txt file or view on computer. I found this software offers a SMS Messages backup solution to Backup all SMS messages for Windows Mobile Phones onto computer and keep them safe. Here is the user's guide:

Toolbox: Easy File Backup, Exploring Files And Folders Inside Visual Studio, Multiple Monitor Softwa


If the responsibility for creating, managing, and executing routine backups is yours, these tools will make it easier. Also see how you can browse folders and files from inside Visual Studio.

Scott Mitchell

MSDN Magazine May 2009

MOSS 2007 Backup Strategies

I saw some backup strategy best practices papers stating you could backup the databases and site content separately, but was told by Microsoft that if you do that, and have to do a bare metal restore you will not be able to recover because the site content and database will be out of sync. Does anyone have a proven DR process for MOSS 2007 that they can share? We have Commvault in house right now, but are using it only to backup the databases and file system separately. Should we be using the built in sharepoint backup stdadm(sp?) tools?
John M. Couch Insight Enterprises Inc. 6820 S. Harl Ave, Tempe, Az 85283 Email: john.couch@insight.com

SQL2005 backup Issue

After moving the SPS 2003 portal from one disk to another, I am having a problem in backing up the portal from the spsbackup tool as well as through the SQL Server 2005 database backup option . Following is the error am getting:-   ============================================================================================================================= Backup failed for Server 'sql server name'.  (Microsoft.SqlServer.Smo)   ------------------------------ For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Backup+Server&LinkId=20476   ------------------------------ Program Location:      at Microsoft.SqlServer.Management.Smo.Backup.SqlBackup(Server srv)    at Microsoft.SqlServer.Management.SqlManagerUI.BackupPropOptions.OnRunNow(Object sender)   ===================================   System.Data.SqlClient.SqlError: The backup of the file or filegroup "sysft_ix_ContentDatabaseName" is not permitted because it is not online. BACKUP can be performed by using the FILEGROUP or FILE clauses to restrict the selection to include only online data. (Microsoft.SqlServer.Smo)   ------------------------------ For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&LinkId=

SMO Backup and Restore Help

Hello Friends, I am new to SMO, Till now I have only worked with Selct,Insert/update Queries.. Now I want to Implement some backup and restore feature for my application. I looked at some documents of SMO and found it is possible using SMO. First of all I will explain my situation. My application wants to store data belongs to different companies(which is maintained with in application) in to single database server, Sql server 2008. I am planning to use Partition Scheme function and create filegroup for each company. Advantage here is, taking backup of each company will be easy. I am generating primary key for each table without taking into consideration of companies. In other words Particular table's ID 1,2 belongs to Company A, 3 Belongs to Company B and 5 belongs to Company A... But these data will be split in to Different filegroups using Company ID.(horizontal partitioning) Ok... Now the Problem.. My backup for a particular company was taken successfully. Now I want Restore function. When I am trying to restore this backup to somewhere else. Target database may or may not contain Companies installed. When Restoring Will there be any Primary key Violation? I know one solution is to generate primary key by taking into consideration Company Id. But this will cause a complete rewriting of code, as it contains lot of edit/delete queries.  I want to know, whether the

SQL2008 - Cannot Restore a new database from a full backup of a different one, database in use

I am trying to restore a brand new database from a copy of another one and am encountering an error message stating: System.Data.SqlClient.SqlError: The file <Backup source database file location> cannot be overwritten.  It is being used by database <Backup Source Database>. (Microsoft.SqlServer.Smo) I am running the Restore procedure with the REPLACE option and am wondering why it is stating that the source database is the database in use when I am trying to restore and overwrite a completely different database. This issue happens when running the replace both in C# using SMO and when manually restoring with SqlServer Management Studio Interesting note is, the original source database is created / deployed using a database project within VisualStudios 2010 and then deployed to SqlServer through VisualStudios. Any thoughts on why this is happening? Thanks in advance for any help!

What happened to the backup and restore classes in namespace Microsoft.SqlServer.Management.Smo vers

I do not see these two classes in version 10 of this namespace and I am not finding any documentation explaining what happened to them.

Initialize snapshot fro alternate location - multiple .bcp files for an article

I have to replicate over 50GB of data over a slow network.  I did not use the option to initialize snapshot from database backup because the replication articles contain row filters.  If I do that, I'll have to run a lot of scripts to remove the data and other unnecessary database objects on the subscriber. Instead, I created a workaround.  On the publisher, I first create the actual push subscription to the target subscriber on the publication.  This subscription is set not to initialize from snapshot.  I then created a second push subscription on the same publication, but the subscriber is a random database on the publisher server.  This second subscription is a dummy subscription set to initialize from snapshot - the purpose is to generate the necessary snapshot files.  I then reinitialized all subscriptions and generate the new snapshot files. On the subscriber, an empty database is created with the same tables as the publisher database.  I created an identical publication on this empty database, and a dummy push subscription on the target subscriber.  The subscription is reinitialized, and the snapshot files on the empty database is created.  These dummy snapshot files are then overwritten with the actual snapshot files created on the publisher, and then I synchronize the the dummy subscriptions with the actual sn

How to prevent Propagation from subscriber to Publisher in some occations

We are using merge application. We need sometimes delete some tables at subscriber and that delete command or any other command  should not propagate to Publisher and other subscribers. And sometimes it should be refilled from Publisher. Is it possibe? Second question : My publisher crashed two times. I could attach the database after restoring the OS. But at subscriber I am unable to modify some table and it gives the error invalid object name 'dbo.msmerge.......'. Replication is working fine. What is the reason for this error and how I can get rid of it?

One subscriber in the two replications, containing the same table. How can this be

There are 2 merge publications (MS SQL 2005)  that use the same table but with different filters. Each of them has their subscribers, but I accidentally discovered that one subscriber is contained in both publications. How such a scheme might work, it is unclear what will happen in the case of reinitialization etc. Should I alter the scheme that this was a subscriber in one publication, or everything will work?

Subscriber data changes problems when use_partition_groups set to false

Hello,Within our solution we use merge replication to replicate data between MS SQL Server 2008 (running on MS Windows Server 2008) and MS SQL Server Compact 3.5 (running on Windows XP Tablet PC). Initially we set the parameter @use_partition_groups of sp_addmergepublication to true. The replication worked well but later we have observed problems while inserting/updating records on publisher. (commands have been timed out) The timeout problem has been solved by setting @use_partition_groups to false - the performance on subscriber is good, but (as we later realized) subscribers are not getting the changes properly (Publisher’s deletes are not reflected at subscriber) We have found following thread however the answer did not help us: http://social.msdn.microsoft.com/Forums/fi-FI/sqlreplication/thread/638bc057-b12f-4e04-b42d-564b244c715fWe would need to solve this problem ASAP.Please help.Thx a lot in advanceRobert

Can I backup to a UNC destination not part of domain using Proxies?

Hi, I am trying to backup my databases to a UNC destination that is not part of domain (stand alone machine) Can I use proxy accounts, so the database backup engine uses the UNC path using a stand alone machine’s account? If not, how can I handle this situation? Thank you, Max

Any issues removing backup mount point cluster resources from SQL Server dependencies?

Win 2003, SQL 2005/SQL2008 64 bit enterprise failover cluster with 3 nodes and 6 instances. The mount points configured as cluster resources for the data/backup/logs. The entire cluster mount points are SAN replicated to a DR Site. But backup drives/LUNs are excluded from the replication. All the disk resources including backup LUNs are set to dependencies on the SQL Server server. The SQL Server is not coming on-line in the DR Site due to unavailability of the backup LUNs (failed resources). As per the documentation all the disk resources must be set to dependencies (http://support.microsoft.com/kb/835185). Thought it did not specifically mentions only Data/Log mount points and/or the backup LUNs as well. "The SQL Server 2005 resource depends on the SQL network name resource and the physical disk resources that hold its data. When mount points are being used together with the physical disks, each mount point must appear as a cluster resource. Additionally, each mount point must also be added as a SQL Server dependency. If only the root physical disks dependency is added and the mount points are not added, database corruption will occur on failover. Database corruption may also occur when SQL Server is restarted without failing over. "     What if I remove the backup LUNs from dependencies list. This will allow me to recover the SQL Server

SQL Server backup failing on one file

Hi I have a server which is not backing up a db each day. When I look at the event log it displays the following...   SQL Server has encountered 1 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [D:\########\########_File_CS_DefaultData.ndf] in database [########] (5). The OS file handle is 0x000006A0. The offset of the latest long I/O is: 0x00000008e00000 2010-08-16 16:07:38.19 Backup Error: 3203, Severity: 16, State: 1. 2010-08-16 16:07:38.19 Backup Read on "D:\########\########_File_CS_DefaultData.ndf" failed: 1117(failed to retrieve text for this error. Reason: 15100) 2010-08-16 16:07:38.20 Backup Error: 3041, Severity: 16, State: 1. 2010-08-16 16:07:38.20 Backup BACKUP failed to complete the command BACKUP DATABASE ########. Check the backup application log for detailed messages. 2010-08-16 16:12:14.32 spid5s SQL Server has encountered 2 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [D:\########\########_File_CS_DefaultData.ndf] in database [########] (5). The OS file handle is 0x000006A0. The offset of the latest long I/O is: 0x00000009900000 2010-08-16 16:13:07.02 Backup Error: 3203, Severity: 16, State: 1. 2010-08-16 16:13:07.02 Backup Read on "D:\########\########_File_CS_DefaultData.ndf" failed: 1117(failed to retrieve text for this error. Reason: 15105) 2010-

Backup keeps failing and prevents another job from running

I have been trying to backup 6 Databases on an External harddrive but it keeps failing each time and preventing another job from running (the other job runns every 30 mins) is there another way that I should perform backup. Thank you in advance. 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend