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

Post New Web Links

How to verify Master and Replication database are in synch

Posted By:      Posted Date: September 27, 2010    Points: 0   Category :Sql Server


I have two SQL Server 2005 standard Edition SP2. Where one server act as master database and other as replication database.

I have setup transactional replication between master and replication database. also i have written one stored procedure which check the total number of the records in master and replication database.

Now my requirement is to verify data between two server are in synch.

Let me explain with example:

I have customer table in master database has customerid:100  & customer_City:New York.

User update city to Mumbai

Now I have to verify at one point in time, may be at the end of day that  customer_city of customerid:100 in replication database  updated to Mumbai. In short, both master and replication databases are in synch.

Please let me know your view.


Thanks and Regards





View Complete Post

More Related Resource Links

Windows 7 CREATE DATABASE permission denied in database 'master'. (Microsoft SQL Server, Error: 26

Hi I have migrated to a new computer using Windows 7, 6 gig memory, I7 chip (old machine had xp) and have installed Visual Studio 2008 and  SQL Server 2008 R2.  I get CREATE DATABASE permission denied in database 'master'. (Microsoft SQL Server, Error: 262) when I try to create a new database.  Other posts (example:http://social.msdn.microsoft.com/forums/en-US/sqltools/thread/28fee0ed-c7e2-40df-8f79-f513c9848f09/) work for Vista but I cannot find how to grant permissions.  Run as administrator (vista fix) does not work. I have admin privaleges on my machine.  There are no other accounts.    What do I need to do to update privaleges? Thanks and have a nice day.    

Cant create new database / CREATE DATABASE permission denied in database master (error 262)

   I am using SQL express and Visual web developer on windows Vista. When I try to create a new database the following message appears.   CREATE DATABASE permission denied in database master (error 262) I log on to my computer as an administrator. Help appreciated  Prontonet      

SQL Server 2008 R2 rebuild master database fails with error -2068643838

I want to change the server collation setting for SQL 2008 R2.  I'm using the command: Setup /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=MyServerName /SQLSYSADMINACCOUNTS="MyDomain\Special Account Group" "NT AUTHORITY\SYSTEM" "NT SERVICE\MSSQLSERVER" "NT SERVICE\SQLSERVICEAGENT" sa /SQLCOLLATION=Latin1_General_CI_AI The setup program starts, runs a while, then exits with a return code: Error result: -2068643838 Result facility code: 1203 Result error code: 2 The final lines of the Detail.txt file in the ...\Setup Bookstrap\Log\<specific timestamp>\ directory are: 2010-07-12 14:54:58 Slp: Running Action: ProduceStatusLogsBeforeFinishPage 2010-07-12 14:54:59 Slp: Completed Action: ProduceStatusLogsBeforeFinishPage, returned True 2010-07-12 14:55:00 Slp: Received request to add the following file to Watson reporting: C:\Users\<MyLoginName>\AppData\Local\Temp\2\tmpDAAF.tmp 2010-07-12 14:55:00 Slp: The following is an exception stack listing the exceptions in outermost to innermost order 2010-07-12 14:55:00 Slp: Inner exceptions are being indented 2010-07-12 14:55:00 Slp: 2010-07-12 14:55:00 Slp: Exception type: Microsoft.SqlServer.Setup.Chainer.Workflow.NoopWorkflowException 2010-07-12 14:55:00 Slp:     Message: 2010-07-12 14:55:00 Slp:         The state of your

Tx Replication Error when renaming Subscription Database

Tx Replication Errors when renaming Subscription Database. Please help. It seemed to work earlier, but now is giving errors when i rename subscription database.

how to do sharepoint database disk usage analysis and selective replication?



I have a SharePoint 2007 database that is 16GB in size and I want to know why, and how I can reduce the size. Ideally I would like a trimmed replica to use as a developer workstation that retains a good sample data set, and has the ability to be refreshed.

Can you please tell me if there are any third party tools or other methods to accomplish this? I have found the Microsoft tool (stsadm) to be very limited in this regard.

Many thanks.

Issue with SAN Drive Migration in master database in clustered SQL Server 2005 SP1




In our SQL Server 2005 SP1 cluster, I have to retire the existing SAN and move all my databases to new SAN drive. I have successfully moved all datafiles (user,system databases, resource) except master database.


Even when I change the parameters in start-up from configuration manager, I am getting error when starting up from cluster administrator / configuration manager.


But I am able to start the SQL Server successfully from command line (without any flags).


When I start the SQL Server from cluster administrator / configuration manager (after changing the parameters), I see that the start-up parameters are changing back to originalpath (old SAN) .


Please let me know incase you need any more information.

Create database permision denied in database ' master' (MS SQL SERVER, ERROR 262


Cn not do anything with my sql server, everything i trt to do i get this message, user does not have permision, etc, ,

I am running windows Vista Business, SQL SERVER 2005

so what going on here


Stuck installing Sharepoint 2010 - Config Wizard saying Cannot connect to database master


Hi all

I have setup 2 servers in hyper-v.
SERVER-SHP = Sharepoint 2010
both running on windows server 2008 R2.
Both servers are joined to the same domain, have fixed ip addresses and can ping each other.

When I get to the part in Sharepoint 2010 setup where I'm runnng "Sharepoint Products Configuration Wizard" where I specify the database server and name and username and password I get the following error which I can't get past "Cannot connect to database master at SQL server at SERVER-SQL. The database might not exist, or the current user does not have permission to connect to it."

I have read the following link and followed it but the problem remains

I don't see where it is falling over as the username and password is the domain administrator one (have also tried the spAdmin) mentioned to setup in the above link. And it says at the notes at the top of the page that if the database (SharePoint_Co

Error 3417 - cannot recover the master database


Dear All,


After checking my event viewer message of mssql 2005, I have the following error :


"Cannot recover the master database. SQL Server is unable to run. Restore master from a full backup, repair it, or rebuild it. For more information about how to rebuild the master database, see SQL Server Books Online."


I currently do not have any back up of the master database and Im not sure how to go about repairing it if I cannot log into the enterprise console as the database engine will not start without the master database.


Kindly advice.


Your assistance is much appreciated.


Kind regards,



Move the database files to different branches before replication?


Hi all,


I want to start a replication between 3 sites using Merge replication, 1<sup>st</sup> branch is the distributer and publisher and already has a database, the others are subscribers and they are new (No data yet). But the size of the database in the main branch is about 4 GB. So if I start the replication, 4 GB will be replicated which something I don’t want. Is there a way I can put the database in the other branches manually? So nothing will need to replicate at the first time. And then replication will take place.


Waiting your valuable reply,




SQL Express 2008 R2 - CREATE DATABASE permission denied in database 'master'. (Microsoft SQL Serve


So, we have an application that we've written to leverage SQL Express 2008 R2 - which our setup installs on the command line using the following instructions:


The code that does the installation can be found here:


//Path to the SQL Installation files 

string strSQLPath = Application.StartupPath + "\\Install_Support_Files\\SQL_86\\Setup.exe"; 

//If we're on a 64-bit OS use the 64 bit setup

if (Wow.Is64BitOperatingSystem == true)


strSQLPath = Application.StartupPath + "\\Install_Support_Files\\SQL_64\\Setup.e

Master Database on a MS SQL 2000 cluster


Hi guys

I am have a cluster db at the moment. I noticed that the attached drive was playing up - i.e. backups would not transfer unto (just a simple example).


I took the disk offline and online again. But when trying to start up the SQL Server in the Cluster Admin tool, I get the following error in the logs:

Starting up database 'master'.
Error: 5172, Severity: 16, State: 15.
Stack Overflow Dump not possible - Exception c00000fd E at 0x00409FCA

So basically from the looks of it, the master db is gone. What would be the suggested / advisable / best practise methods to restore / rebuild the master db in a clustered environment?

Just as some extra info: for whatever reason, I do not have the master db backup but I have the backup for the other dbs residing on this SQL server. There might be a possibility that the other dbs are also corrupted - but it's not an issue.


I guess I would like to hear what the quickest method is to rebuild the master and 'reattach' the db if possible. I am new to this so I am actually learning to swim when I am 'drowning' :P


Thank you in advance


Bottelnecks faced,When trying to implement CDC and Transctional Replication on the same Database


Hi Guys,

When I tried implementing the CDC (first) and Configured Transctional Replication on the same database.. the CDC at the database level looks good/unchanged ..but CDC at the table level is disabling,Replication is changing the metadata tables of CDC..

So, Could you plzz suggest me on thiss……How to implement CDC and Transctional replication on the same database

Anil Inampudi

HowTo: Replication to a mostly disconnected database


Searches have not turned up an answer to this:

Set up Transactional Push Replication to a mostly disconnected Subscriber. Publisher/Distributor is SS2008 R2, the Subscriber will probably be SS2008 or 2008 R2. How do you get the Distributor to initiate and maintain a VPN connection (talking nuts and bolts here folks) to the disconnected network that contains the Subscription database so that it can push the publication/transactional data to the subscriber?

SQL 2008 SP2 succefull but instance start fails - Script level upgrade for database 'master' faile


after installing SP2 instance starts and stops with error:

Script level upgrade for database 'master' failed because upgrade step 'sqlagent100_msdb_upgrade.sql' encountered error 5831, state 1, severity 16. This is a serious error condition which might interfere with regular operation and the database will be taken offline. If the error happened during upgrade of the 'master' database, it will prevent the entire SQL Server instance from starting. Examine the previous errorlog entries for errors, take the appropriate corrective actions and re-start the database so that the script upgrade steps run to completion.

Already tried without success:
- enabled SA account (was disabled) http://support.microsoft.com/kb/960781/en-us
- uninstalled SP2 -> other error, but same problems with running the script



SQL 2008 master database has wrong collation


I'm pretty new to SQL, so excuse me for landing in this situation in the first place.  Never again!

I had an old Windows 2003/SQL 2000 server which I wanted to retire, so installed a nice new Windows 2008 R2/SQL 2008 server to host all the databases.  I detached all the databases, copied them over, and attached them to the new server.  Everything appeared to be running OK.  However, the application is now complaining that I have different collations between the master database, and all the other ones.  the master (and other system databases) is Latin1_General_CI_AS and all the user ones are SQL_Latin1_General_CP1_CI_AS.

What I need to do is change the master to SQL_Latin1_General_CP1_CI_AS and ensure that any new databases which the application creates in future are also SQL_Latin1_General_CP1_CI_AS.  I have no idea how to do this!

I suppose one option wiould be to reinstall and start again, but I'm sure there must be an easier way.  Musn't there?  Help!



Unable to restore master database


I'm trying to develop a backup/restore strategy for my merge replication setup. The system has already been deployed (over 20 subscribers) so this is quite a matter of urgency

The msdn/technet merge replication backup/restore strategies page (ms152497) recommends backing up the publication, master and msdb database, and I have done this through SQL Server Management Studio (SQL Server 2005).

I have tested restoring just the publication database, and it seems to work ok, with a test client still being able to synchronise properly.

However given that the master and msdb databases are also backed up, it makes sense to restore these as well; however when I try to restore the master database (right-click master, tasks, restore, database), it won't let me select the master database in the "To database:" drop-down field!

Alternatively, if I right-click master, tasks, restore, files and filegroups, then it allows me to select the master db as the "To database:" but I have never used the files/filegroups options before.

What is the proper way to restore the master and msdb datab
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