Monday, September 16, 2013

[MS SQL Server] Validating large tables replicated

[MS SQL Server] Validating large tables replicated


Validating large tables replicated

Posted: 16 Sep 2013 04:58 AM PDT

Hello,I am working with large tables (many millions of records) in SQL Server that are replicated from one server to another and I need to find a way to quickly compare the source table with the target. The key to this issue is that the tables do not have a primary key, otherwise, I would look for the max primary key value in both tables (source vs. target) and check the delta (difference). Applying a count of the records is not efficient. Also, checking the row count for the tables according to sys.sysindexes is not possible due to the inconsistency in which statistics are run on both servers.Is there an approach using the trasactional replication where a quick comparison can be run between the source and target tables that will provide a delta? I have already read the following article regarding replication monitoring, but it was at a higher level than I'm seeking.http://www.sqlservercentral.com/articles/Stairway+Series/72451/Thanks,Grant

Copy File Across Servers Failing

Posted: 16 Sep 2013 04:40 AM PDT

I have 2 servers that are in the same rack, but not on a domain. Ultimately, I want a SQL scheduled job to copy files from Server_A to Server_BLogged on to Server_B as Windows/Administrator, I want to copy backup files from Server_A to Server_B with the following SQL Statement:[code="sql"]DECLARE @cmd varchar(500)SET @cmd = 'copy /Y ' + '\\Server_A_IP_Address\f$\Backup\231_StandbyServer\' + 'MyBackupFile.bak ' + 'F:\Backups\231_Server\FULL\' select @cmdEXEC master.dbo.xp_cmdshell @cmdwhich runs this:copy /Y \\Server_A_IP_Address\f$\Backup\231_StandbyServer\MyBackupFile.bak F:\Backups\231_Server\FULL\[/code]I get "access denied"But if I put the "[font="Courier New"]copy /Y \\Server_A_IP_Address[/font]...." statement into a DOS command line, it works fine.Thoughts ?

SQL Server Upgradation from 2005 to 2008

Posted: 16 Sep 2013 02:05 AM PDT

Can you please any one clarify my below doubts, because we are going to Upgrade SQL 2005 to 20081) Can we attach SQL 2005 DB .mdf file in SQL Server 2008 ?2) Can we restore SQL 2005 User Databases in SQL 2008 ?and 3) Can we restore SQL 2005 System Databses (Master,MSDB..etc) into SQL Server 2008 ?

No comments:

Post a Comment

Search This Blog