Problems starting Replication on large databases - SQL 2012

Hi all,
I have been battling SQL Server for a week trying to get replication up and running, now I realize that most probably I am doing something wrong and I hope that one of you can help pointing me in the right direction.
I want to start replication of a big (180GB) database in my lab environment and every time the end result is errors of the type "The row was not found at the Subscriber when applying the replicated command. (Source: MSSQLServer, Error number: 20598)".
There are more than one database to be replicated and the smaller ones (<= 4GB) have started without problems, a medium database of 21GB had one similar error and has been running for a few days since I found and inserted the missing data in the subscriber
DB.
A couple of facts:
- I have set up the distributor as a remote distributor since the publishers are mirrored databases.
- I assume the distributor setup is OK since all the replicated databases are taking the same 'path' and the smaller ones are working.
- The distributor and the subscriber are set up on the same server.
- All in all the following procedure takes about 3.5-4 hours.
- The database is running in Full Recovery mode
- All log backups on the publisher are turned off for the duration.
Here's what I do:
On the publisher
Create the publication and add all the articles
use [Zaragoza]
exec sp_replicationdboption @dbname = N'Zaragoza',
@optname = N'publish',
@value = N'true'
GO
exec [Zaragoza].sys.sp_addlogreader_agent @job_login = N'NS-LAB-DB-40\SqlServiceUser',
@job_password = N'********', -- Modify Here
@publisher_security_mode = 1,
@job_name = null
GO
-- Adding the transactional publication
exec sp_addpublication @publication = N'Zaragoza_Full',
@description = N'Transactional publication of database ''Zaragoza'' from Publisher ''NS-LAB-DB-38''.',
@sync_method = N'concurrent',
@retention = 0,
@allow_push = N'true',
@allow_pull = N'true',
@allow_anonymous = N'false',
@enabled_for_internet = N'false',
@snapshot_in_defaultfolder = N'true',
@compress_snapshot = N'false',
@ftp_port = 21,
@allow_subscription_copy = N'false',
@add_to_active_directory = N'false',
@repl_freq = N'continuous',
@status = N'active',
@independent_agent = N'true',
@immediate_sync = N'true', -- Needs TRUE
@allow_sync_tran = N'false',
@allow_queued_tran = N'false',
@allow_dts = N'false',
@replicate_ddl = 1,
@allow_initialize_from_backup = N'true', -- Modify Here
@enabled_for_p2p = N'false',
@enabled_for_het_sub = N'false'
GO
/* SHOULD not need this since no snapshots will be generated
exec sp_addpublication_snapshot @publication = N'Zaragoza_Full',
@frequency_type = 1,
@frequency_interval = 1,
@frequency_relative_interval = 1,
@frequency_recurrence_factor = 0,
@frequency_subday = 8,
@frequency_subday_interval = 1,
@active_start_time_of_day = 0,
@active_end_time_of_day = 235959,
@active_start_date = 0,
@active_end_date = 0,
@job_login = N'NS-LAB-DB-40\SqlServiceUser',
@job_password = N'********',
@publisher_security_mode = 1
exec sp_addarticle @publication = N'Zaragoza_Full',
@article = N'__MigrationLog',
@source_owner = N'dbo',
@source_object = N'__MigrationLog',
@type = N'logbased',
@description = null,
@creation_script = null,
@pre_creation_cmd = N'drop',
@schema_option = 0x000000000803509F,
@identityrangemanagementoption = N'manual',
@destination_table = N'__MigrationLog',
@destination_owner = N'dbo',
@vertical_partition = N'false',
@ins_cmd = N'CALL sp_MSins_dbo__MigrationLog',
@del_cmd = N'CALL sp_MSdel_dbo__MigrationLog',
@upd_cmd = N'SCALL sp_MSupd_dbo__MigrationLog'
GO
-- MANY more "EXEC sp_addarticle"....
On the publisher
I recompile the subscription SPs since I had problems with them once.
I use the output from the following statement:
USE Zaragoza;
EXEC sp_scriptpublicationcustomprocs @publication=N'Zaragoza_Full';
On the publisher
I backup the database & log
BACKUP DATABASE Zaragoza TO DISK = 'E:\Backup\Zaragoza_FULL.bkp' WITH INIT, STATS=5;
BACKUP LOG Zaragoza TO DISK = 'E:\Backup\Zaragoza_LOG.bkp' WITH INIT, STATS=5;
On the subscriber
Copy the backups from the publisher
CD /D E:\Backup
COPY /Y \\NS-LAB-DB-38-mirror\Backup\Zaragoza_FULL.bkp .
COPY /Y \\NS-LAB-DB-38-mirror\Backup\Zaragoza_LOG.bkp .
On the subscriber
Restore the database and log backups
USE [master]
GO
RESTORE DATABASE Zaragoza_Sub
FROM DISK = 'E:\Backup\Zaragoza_FULL.bkp'
WITH NORECOVERY, REPLACE, STATS=5,
MOVE 'Zaragoza' TO 'I:\mssql_repl\Zaragoza_Sub\Zaragoza_Sub.mdf',
MOVE 'Zaragoza_log' TO 'I:\mssql_repl\Zaragoza_Sub\Zaragoza_Sub_log.ldf';
GO
RESTORE LOG Zaragoza_Sub
FROM DISK = 'E:\Backup\Zaragoza_LOG.bkp'
WITH RECOVERY, STATS=25;
GO
On the subscriber
Remove all triggers since I noticed that they interfered with the replication SPs
USE Zaragoza_Sub;
DECLARE @Trigger nvarchar(100),
@SQL nvarchar(2000);
DECLARE curTriggers CURSOR
LOCAL FAST_FORWARD FOR
SELECT DISTINCT tr.name TriggerName--, te.type_desc TriggerType, ob.name TableName, tr.is_disabled, c.text
FROM sys.triggers tr INNER JOIN
sys.trigger_events te ON tr.object_id = te.object_id INNER JOIN
sys.objects ob ON tr.parent_id = ob.object_id;
OPEN curTriggers;
FETCH NEXT FROM curTriggers INTO @Trigger;
WHILE @@FETCH_STATUS = 0
BEGIN
SELECT @SQL = 'DROP TRIGGER dbo.' + @Trigger + ';';
EXEC sp_executesql @SQL;
FETCH NEXT FROM curTriggers INTO @Trigger;
END;
CLOSE curTriggers;
DEALLOCATE curTriggers;
On the publisher
Add the subscription and the push agent
-----------------BEGIN: Script to be run at Publisher 'NS-LAB-DB-38'-----------------
use [Zaragoza]
exec sp_addsubscription @publication = N'Zaragoza_Full',
@subscriber = N'NS-LAB-DB-40',
@destination_db = N'Zaragoza_Sub',
@subscription_type = N'Push',
@sync_type = N'initialize with backup', --@sync_type = N'replication support only',
@status = N'active', -- ADD this line
@article = N'all',
@update_mode = N'read only',
@subscriber_type = 0,
@backupdevicetype=N'disk',
@backupdevicename=N'E:\backup\Zaragoza_LOG.bkp';
exec sp_addpushsubscription_agent @publication = N'Zaragoza_Full',
@subscriber = N'NS-LAB-DB-40',
@subscriber_db = N'Zaragoza_Sub',
@job_login = N'NS-LAB-DB-40\SqlServiceUser',
@job_password = N'********', -- Modify Here
@subscriber_security_mode = 1,
@frequency_type = 64,
@frequency_interval = 0,
@frequency_relative_interval = 0,
@frequency_recurrence_factor = 0,
@frequency_subday = 0,
@frequency_subday_interval = 0,
@active_start_time_of_day = 0,
@active_end_time_of_day = 235959,
@active_start_date = 20140618,
@active_end_date = 99991231,
@enabled_for_syncmgr = N'False',
@dts_package_location = N'Distributor';
GO
-----------------END: Script to be run at Publisher 'NS-LAB-DB-38'-----------------
The worst part is that this is only a LAB system, when I apply this to Live I will have to deal with a 24/7 environment with 10,000+ transactions a day, so downtime is a total No-No.
If you are missing any details do not hesitate to ask, I will gladly provide all the details I have.
Have a great day
DS

Hi Ashwin,
I have tried a few things these last couple of days and here's where I'm at.
I looked through the publisher database for the missing row so I could just copy it over but the row was nowhere to be found. After talking to the developers I found out that the table in question has a clean-up job that deletes records when they are finished
- OK, no problem, the replication should take care of that.
When I then look at the trace from the Distributor I find a bunch of records where the ID of the missing row is used. However, I find it peculiar that the replication first does updates to a record, then deletes it only to continue doing updates afterwards.
A sample from the Trace will explain better:
The SPs are
sp_MSupd_dboMessageDialog => This SP tries to do the failing UPDATE on the table, the second to last parameter is the RowId in the table (1075152)
sp_MSdel_dboMessageDialog => This SP tries to DELETE from the table, the only parameter is the RowId in the table (1075152)
There is one other SP in the replication of this article (table) and it is called sp_MSins_dboMessageDialog and it should be used for inserting records into the table. However it is never called.
RowNumber
EventClassName
TextData
EventSequence
StartTime
EndTime
2899078
RPC:Starting
exec [sp_MSupd_dboMessageDialog] default,default,default,default,0,default,'2014-08-13 12:10:56.503',1075152,0x50
74255940
2014-08-13 14:22:15.763
NULL
2899372
SP:Starting
exec [sp_MSupd_dboMessageDialog] default,default,default,default,0,default,'2014-08-13 12:10:56.503',1075152,0x50
74256234
2014-08-13 14:22:16.270
NULL
2899446
SP:Completed
exec [sp_MSupd_dboMessageDialog] default,default,default,default,0,default,'2014-08-13 12:10:56.503',1075152,0x50
74256312
2014-08-13 14:22:16.270
2014-08-13 14:22:17.923
2899447
RPC:Completed
exec [sp_MSupd_dboMessageDialog] default,default,default,default,0,default,'2014-08-13 12:10:56.503',1075152,0x50
74256313
2014-08-13 14:22:15.763
2014-08-13 14:22:17.923
2899462
RPC:Starting
exec [sp_MSdel_dboMessageDialog] 1075152
74256328
2014-08-13 14:22:17.927
NULL
2899558
SP:Starting
exec [sp_MSdel_dboMessageDialog] 1075152
74256420
2014-08-13 14:22:17.940
NULL
2899606
SP:Completed
exec [sp_MSdel_dboMessageDialog] 1075152
74256468
2014-08-13 14:22:17.940
2014-08-13 14:22:17.940
2899607
RPC:Completed
exec [sp_MSdel_dboMessageDialog] 1075152
74256469
2014-08-13 14:22:17.927
2014-08-13 14:22:17.940
2915054
RPC:Starting
exec [sp_MSupd_dboMessageDialog] default,default,default,default,0,default,'2014-08-13 12:10:56.503',1075152,0x50
74272198
2014-08-13 14:22:56.577
NULL
2915118
SP:Starting
exec [sp_MSupd_dboMessageDialog] default,default,default,default,0,default,'2014-08-13 12:10:56.503',1075152,0x50
74272262
2014-08-13 14:22:56.587
NULL
2915353
SP:Completed
exec [sp_MSupd_dboMessageDialog] default,default,default,default,0,default,'2014-08-13 12:10:56.503',1075152,0x50
74272497
2014-08-13 14:22:56.587
2014-08-13 14:22:56.597
2915354
RPC:Completed
exec [sp_MSupd_dboMessageDialog] default,default,default,default,0,default,'2014-08-13 12:10:56.503',1075152,0x50
74272498
2014-08-13 14:22:56.577
2014-08-13 14:22:56.597
2994616
RPC:Starting
exec [sp_MSupd_dboMessageDialog] default,default,default,default,0,default,'2014-08-13 12:10:56.503',1075152,0x50
74352996
2014-08-13 14:26:13.227
NULL
2994701
SP:Starting
exec [sp_MSupd_dboMessageDialog] default,default,default,default,0,default,'2014-08-13 12:10:56.503',1075152,0x50
74353159
2014-08-13 14:26:13.647
NULL
2994749
SP:Completed
exec [sp_MSupd_dboMessageDialog] default,default,default,default,0,default,'2014-08-13 12:10:56.503',1075152,0x50
74353266
2014-08-13 14:26:13.647
2014-08-13 14:26:13.647
2994750
RPC:Completed
exec [sp_MSupd_dboMessageDialog] default,default,default,default,0,default,'2014-08-13 12:10:56.503',1075152,0x50
74353267
2014-08-13 14:26:13.227
2014-08-13 14:26:15.163
2995292
RPC:Starting
exec [sp_MSdel_dboMessageDialog] 1075152
74353810
2014-08-13 14:26:15.240
NULL
2995331
SP:Starting
exec [sp_MSdel_dboMessageDialog] 1075152
74353849
2014-08-13 14:26:15.250
NULL
2995389
SP:Completed
exec [sp_MSdel_dboMessageDialog] 1075152
74353911
2014-08-13 14:26:15.250
2014-08-13 14:26:15.603
2995390
RPC:Completed
exec [sp_MSdel_dboMessageDialog] 1075152
74353912
2014-08-13 14:26:15.240
2014-08-13 14:26:15.603
3000727
RPC:Starting
exec [sp_MSupd_dboMessageDialog] default,default,default,default,0,default,'2014-08-13 12:10:56.503',1075152,0x50
74359306
2014-08-13 14:26:29.413
NULL
3000795
SP:Starting
exec [sp_MSupd_dboMessageDialog] default,default,default,default,0,default,'2014-08-13 12:10:56.503',1075152,0x50
74359374
2014-08-13 14:26:29.423
NULL
3000843
SP:Completed
exec [sp_MSupd_dboMessageDialog] default,default,default,default,0,default,'2014-08-13 12:10:56.503',1075152,0x50
74359422
2014-08-13 14:26:29.423
2014-08-13 14:26:29.427
3000844
RPC:Completed
exec [sp_MSupd_dboMessageDialog] default,default,default,default,0,default,'2014-08-13 12:10:56.503',1075152,0x50
74359423
2014-08-13 14:26:29.413
2014-08-13 14:26:29.427
3081879
RPC:Starting
exec [sp_MSupd_dboMessageDialog] default,default,default,default,0,default,'2014-08-13 12:10:56.503',1075152,0x50
74441576
2014-08-13 14:29:56.223
NULL
3082017
SP:Starting
exec [sp_MSupd_dboMessageDialog] default,default,default,default,0,default,'2014-08-13 12:10:56.503',1075152,0x50
74441868
2014-08-13 14:29:58.060
NULL
3082209
SP:Completed
exec [sp_MSupd_dboMessageDialog] default,default,default,default,0,default,'2014-08-13 12:10:56.503',1075152,0x50
74442059
2014-08-13 14:29:58.060
2014-08-13 14:29:58.067
3082210
RPC:Completed
exec [sp_MSupd_dboMessageDialog] default,default,default,default,0,default,'2014-08-13 12:10:56.503',1075152,0x50
74442060
2014-08-13 14:29:56.223
2014-08-13 14:29:58.070
3082470
RPC:Starting
exec [sp_MSdel_dboMessageDialog] 1075152
74442320
2014-08-13 14:29:58.097
NULL
3082471
SP:Starting
exec [sp_MSdel_dboMessageDialog] 1075152
74442321
2014-08-13 14:29:58.100
NULL
3082519
SP:Completed
exec [sp_MSdel_dboMessageDialog] 1075152
74442369
2014-08-13 14:29:58.100
2014-08-13 14:29:58.100
3082520
RPC:Completed
exec [sp_MSdel_dboMessageDialog] 1075152
74442378
2014-08-13 14:29:58.097
2014-08-13 14:29:58.400
3090751
RPC:Starting
exec [sp_MSupd_dboMessageDialog] default,default,default,default,0,default,'2014-08-13 12:10:56.503',1075152,0x50
74450665
2014-08-13 14:30:17.940
NULL
3090796
SP:Starting
exec [sp_MSupd_dboMessageDialog] default,default,default,default,0,default,'2014-08-13 12:10:56.503',1075152,0x50
74450712
2014-08-13 14:30:17.953
NULL
3090844
SP:Completed
exec [sp_MSupd_dboMessageDialog] default,default,default,default,0,default,'2014-08-13 12:10:56.503',1075152,0x50
74450760
2014-08-13 14:30:17.953
2014-08-13 14:30:17.957
3090845
RPC:Completed
exec [sp_MSupd_dboMessageDialog] default,default,default,default,0,default,'2014-08-13 12:10:56.503',1075152,0x50
74450761
2014-08-13 14:30:17.940
2014-08-13 14:30:17.953
Correct me if I'm wrong but this seems a bit weird. Why don't I see any INSERT to create the row again after the DELETE?
For the time being, and since this is a test system, I added the parameter "-SkipErrors 20598" to the Distribution Agent and restarted the agent. The replication started by skipping 20 records with that error and then continuing to work fine, as
suspected. I will have to verify with the developers and testers to see if all the data is still available.
Hopefully you will have some great insight into this matter and be able to explain what is happening.
Cheers!
DS

Similar Messages

  • Failover Cluster in SQL 2012 in not auto switch when stop service SQL

    Good Morning to all,
    I'm Mr.Tuyen from VietNam. I have a big problem with AlwaysOn High Availabity in SQL 2012.
    I setup 3 server and join Availabilty Group. Ex: Server A (Primary), Server B (Secondary), Cluster Qourum is only node. I have test:
    1. Stop service SQL server A, immediately server B is Primary
    Start servicel SQL server A, Server A is secondary
    2. Stop service SQL server B, server is not Primary and "status is Resloving" and role cluster failed with error as belows
    [i]Clustered role 'XXX' has exceeded its failover threshold. It has exhausted the configured number of failover attempts within the failover period of time allotted to it and will be left in a failed state. No additional attempts will be made to bring the role
    online or fail it over to another node in the cluster. Please check the events associated with the failure. After the issues causing the failure are resolved the role can be brought online manually or the cluster may attempt to bring it online again after
    the restart delay period.[/i]
    or 
    The Cluster service failed to bring clustered role 'XXX' completely online or offline. One or more resources may be in a failed state. This may impact the availability of the clustered role.
    Do you have same error?

    http://blogs.msdn.com/b/sqlserverfaq/archive/2012/03/15/inf-alwayson-the-secondary-database-doesn-t-come-automatically-when-the-primary-instance-of-sql-server-goes-down.aspx
    Balmukund Lakhani
    Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog |
    Team Blog | @Twitter
    | Facebook
    Author: SQL Server 2012 AlwaysOn -
    Paperback, Kindle

  • SQL 2012 FCI Failure Help Troubleshoot Cause

    Starting since the upgrade to SQL 2012 Enterprise in May of 2013, in a highly transactional OLTP environment, We experience periodic cluster failures.
    When I generate the Cluster.log for this cluster we receive the following, (We've increased the timeout already and that doesn't seem to help)
    00001724.00004920::2014/11/25-04:01:18.130 WARN  [RES] SQL Server <SQL Server>: [sqsrvres] Failed to retrieve data column. Return code -1
    00000f14.00002988::2014/11/25-04:01:21.235 DBG   Sending control 4950882
    00000f14.000020c8::2014/11/25-04:01:21.235 DBG   Sending control 4950883
    00000f14.000020c8::2014/11/25-04:01:21.250 DBG   Sending control 4950884
    00000f14.000020c8::2014/11/25-04:01:21.250 DBG   Sending control 4950885
    00000f14.000020c8::2014/11/25-04:01:21.250 DBG   Sending control 4950886
    00000f14.000020c8::2014/11/25-04:01:21.250 DBG   Sending control 4950887
    00000f14.000020c8::2014/11/25-04:01:21.250 DBG   Sending control 4950888
    00000f14.000020c8::2014/11/25-04:01:21.250 DBG   Sending control 4950889
    00000f14.000020c8::2014/11/25-04:01:21.250 DBG   Sending control 4950890
    00000f14.000020c8::2014/11/25-04:01:21.250 DBG   Sending control 4950891
    00000f14.000020c8::2014/11/25-04:01:21.250 DBG   Sending control 4950892
    00000f14.000020c8::2014/11/25-04:01:21.250 DBG   Sending control 4950893
    00000f14.000020c8::2014/11/25-04:01:21.250 DBG   Sending control 4950894
    00000f14.000020c8::2014/11/25-04:01:21.250 DBG   Sending control 4950895
    00000f14.000020c8::2014/11/25-04:01:21.266 DBG   Sending control 4950930
    00000f14.000020c8::2014/11/25-04:01:21.266 DBG   Sending control 4950931
    00000f14.000020c8::2014/11/25-04:01:21.282 DBG   Sending control 4950932
    00000f14.000020c8::2014/11/25-04:01:21.282 DBG   Sending control 4950933
    00000f14.000020c8::2014/11/25-04:01:21.282 DBG   Sending control 4950934
    00000f14.000020c8::2014/11/25-04:01:21.282 DBG   Sending control 4950935
    00000f14.000020c8::2014/11/25-04:01:21.282 DBG   Sending control 4950936
    00000f14.000020c8::2014/11/25-04:01:21.282 DBG   Sending control 4950937
    00000f14.000020c8::2014/11/25-04:01:21.282 DBG   Sending control 4950938
    00000f14.000020c8::2014/11/25-04:01:21.282 DBG   Sending control 4950939
    00000f14.000020c8::2014/11/25-04:01:21.282 DBG   Sending control 4950940
    00000f14.000020c8::2014/11/25-04:01:21.282 DBG   Sending control 4950941
    00000f14.000020c8::2014/11/25-04:01:21.282 DBG   Sending control 4950942
    00000f14.000020c8::2014/11/25-04:01:21.282 DBG   Sending control 4950943
    00000f14.000020c8::2014/11/25-04:01:21.297 DBG   Sending control 4950944
    00000f14.000020c8::2014/11/25-04:01:21.297 DBG   Sending control 4950945
    00000f14.000020c8::2014/11/25-04:01:21.297 DBG   Sending control 4950946
    00001724.0000305c::2014/11/25-04:01:21.344 ERR   [RES] SQL Server <SQL Server>: [sqsrvres] Failure detected, diagnostics heartbeat is lost
    00001724.0000305c::2014/11/25-04:01:21.344 INFO  [RES] SQL Server <SQL Server>: [sqsrvres] IsAlive returns FALSE
    00001724.0000305c::2014/11/25-04:01:21.344 WARN  [RHS] Resource SQL Server IsAlive has indicated failure.
    00000f14.00002988::2014/11/25-04:01:21.344 INFO  [RCM] HandleMonitorReply: FAILURENOTIFICATION for 'SQL Server', gen(2) result 1.
    00000f14.00002988::2014/11/25-04:01:21.344 INFO  [RCM] TransitionToState(SQL Server) Online-->ProcessingFailure.
    What can we do to find the cause of this as it causes the SQL Resource to Fail, and then restart on the same node, a node failure does not occur on the SQL Server 2012 FCI.
    Thanks in advance for all responses,
    Tyler
    Tyler Krusenstjerna | Database Administrator

    Here is what runs right before the failure is detected in the cluster.log I show > 
    00000f14.00002988::2014/11/25-04:01:07.460 DBG   Sending control 4950846
    00000f14.00002988::2014/11/25-04:01:07.460 DBG   Sending control 4950847
    00000f14.00001928::2014/11/25-04:01:10.814 DBG   [CM] mscs::RegCheckpoint::SaveCheckpointTimerCallback(SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQLServer)
    00000f14.00001928::2014/11/25-04:01:10.814 DBG   [CM] mscs::RegCheckpoint::SaveCheckpointTimerCallback: Before: Checkpoint state for key SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQLServer.
    00000f14.00001928::2014/11/25-04:01:10.814 DBG   [CM] mscs::RegCheckpoint::SaveCheckpointInternal(SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQLServer)
    00000f14.00001928::2014/11/25-04:01:10.814 DBG   [CM] mscs::RegCheckpoint::SaveCheckpointInternal: Before: Checkpoint state for key SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQLServer.
    00000f14.00001928::2014/11/25-04:01:10.939 DBG   [CM] mscs::RegCheckpoint::SaveCheckpoint: Stored registry checkpoint SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQLServer for resource SQL Network Name (XXXXXXXXXXX).
    00000f14.00001928::2014/11/25-04:01:10.939 DBG   [GUM] Node 1: gum.SendRequest(/dm/update) Started
    00000f14.00001928::2014/11/25-04:01:10.939 DBG   [GUM] Node 1: skipping lock aquisition
    00000f14.00001928::2014/11/25-04:01:10.939 DBG   [GUM] Node 1: sending request
    00000f14.00001928::2014/11/25-04:01:10.939 DBG   [MRR] Node 1: insert request record for RID 28422
    00000f14.00001928::2014/11/25-04:01:10.939 DBG   [MRR] SendRequest(<message action='gum/do-update' GemId='0' target='GUMA' sender='1'mrr='28422'/>)
    00000f14.00001928::2014/11/25-04:01:10.939 DBG   [GEM] Node 1: message added to send queue
    00000f14.00001928::2014/11/25-04:01:10.939 DBG   [GEM] Node 1: SendNextMessageSerially
    00000f14.00001928::2014/11/25-04:01:10.939 DBG   [GEM] Node 1: delivering message 1:28579
    00000f14.00001928::2014/11/25-04:01:10.939 DBG   [GUM] Node 1: DoUpdate(/dm/update, gumid: 28477)
    00000f14.00001928::2014/11/25-04:01:10.939 DBG   [GEM] Node 1: ProcessAck from node 1 (already acked (1))
    00000f14.00001110::2014/11/25-04:01:10.939 DBG   [NODE] Node 1: just about to send a message of size 0 to 3
    00000f14.00000f88::2014/11/25-04:01:10.939 DBG   [DM] Beginning transaction
    00000f14.00001114::2014/11/25-04:01:10.939 DBG   [NODE] Node 1: just about to send a message of size 16932 to 2
    00000f14.00000f88::2014/11/25-04:01:10.939 DBG   [DM] Beginning transaction
    00000f14.00001110::2014/11/25-04:01:10.939 DBG   [NODE] Node 1: message to node 3 sent
    00000f14.00001110::2014/11/25-04:01:10.939 DBG   [NODE] Node 1: just about to send a message of size 16932 to 3
    00000f14.00001114::2014/11/25-04:01:10.939 DBG   [NODE] Node 1: message to node 2 sent
    00000f14.00001110::2014/11/25-04:01:10.939 DBG   [NODE] Node 1: message to node 3 sent
    00000f14.00002080::2014/11/25-04:01:10.939 DBG   [GEM] Node 1: ProcessAck from node 2 (already acked (1))
    00000f14.00000f94::2014/11/25-04:01:10.939 DBG   [GEM] Node 1: ProcessAck from node 3 (already acked (1 2))
    00000f14.00000f94::2014/11/25-04:01:10.939 DBG   [GEM] Node 1: SendNextMessageSerially
    00000f14.00000f94::2014/11/25-04:01:10.939 DBG   [GEM] Node 1: No more messages in queue
    00000f14.00000f94::2014/11/25-04:01:10.954 DBG   [MRR] Node 1: processing reply <message action='mrr/reply' GemId='0' target='MRRA' sender='3'mrr='28422'/>
    00000f14.00000f94::2014/11/25-04:01:10.954 DBG   [MRR] Node 1: Waiting for RID 28422 stragglers (1 2)
    00000f14.00002080::2014/11/25-04:01:11.079 DBG   [MRR] Node 1: processing reply <message action='mrr/reply' GemId='0' target='MRRA' sender='2'mrr='28422'/>
    00000f14.00002080::2014/11/25-04:01:11.079 DBG   [MRR] Node 1: Waiting for RID 28422 stragglers (1)
    00000f14.00000f88::2014/11/25-04:01:11.110 DBG   [DM] Successfully flushed the log and rewound it
    00000f14.00000f88::2014/11/25-04:01:11.110 DBG   [DM] Committed transaction 128:128:1101525
    00000f14.00000f88::2014/11/25-04:01:11.110 DBG   [DM] Flushing hive with timeout of 300 seconds
    00000f14.00000f88::2014/11/25-04:01:11.157 DBG   [TAA] Timed action completed in time
    00000f14.00000f88::2014/11/25-04:01:11.157 DBG   [DM] Successfully flushed the log and rewound it
    00000f14.00000f88::2014/11/25-04:01:11.157 DBG   [DM] Committed transaction 128:128:1101525
    00000f14.00000f88::2014/11/25-04:01:11.157 DBG   [CORE] Node 1: sending mrr/reply to MRRA at DBSPRD1F
    00000f14.00001118::2014/11/25-04:01:11.157 DBG   [NODE] Node 1: just about to send a message of size 0 to 1
    00000f14.00001118::2014/11/25-04:01:11.157 DBG   [NODE] Node 1: message to node 1 sent
    00000f14.00001118::2014/11/25-04:01:11.157 DBG   [NODE] Node 1: just about to send a message of size 232 to 1
    00000f14.00001118::2014/11/25-04:01:11.157 DBG   [NODE] Node 1: message to node 1 sent
    00000f14.00000f90::2014/11/25-04:01:11.157 DBG   [MRR] Node 1: processing reply <message action='mrr/reply' GemId='0' target='MRRA' sender='1'mrr='28422'/>
    00000f14.00000f90::2014/11/25-04:01:11.157 DBG   [MRR] Node 1: Request RID 28422 is completed
    00000f14.00001928::2014/11/25-04:01:11.157 DBG   [GUM] Node 1: gum.SendRequest(/dm/update) Completed
    00000f14.00001928::2014/11/25-04:01:11.157 DBG   [CM] mscs::RegCheckpoint::SaveCheckpointInternal: After: Checkpoint state for key SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQLServer.
    00000f14.00001928::2014/11/25-04:01:11.157 DBG   [CM] mscs::RegCheckpoint::SaveCheckpointTimerCallback: After: Checkpoint state for key SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQLServer.
    00001724.00004920::2014/11/25-04:01:18.130 WARN  [RES] SQL Server <SQL Server>: [sqsrvres] Failed to retrieve data column. Return code -1
    Tyler Krusenstjerna | Database Administrator

  • SQL 2012 AlwaysON High Availability for SharePoint 2013

    Our Company have 2 Webfront Servers for Sharepoint 2013 and one Database SQL 2012 Server.
    We got one more Server & we don't have Storage so need to configure Always On.
    There are Some Confusions:
    1- Database Server is in production, so how much down time required to Achieve the AlwaysOn?
    2- What are the Changes need to be done on Production Server?
    3- What are the Steps to be followed While Configuring new Database Server?
    Regards,

    Hi Genius1985,
    According to your description, you want to configure a SQL Server 2012 AlwaysOn Availability Group for your database, right?
    Question 1: Database Server is in production, so how much down time required to achieve the AlwaysOn?
    There is no a certain downtime for AlwaysOn, it depends on the configuration of our AlwaysOn Availability Group, normally it can be several seconds or minutes. In order to understand why there is downtime for SQL Server with Microsoft Clustering, please refer
    to the following article:
    http://www.mssqltips.com/sqlservertip/1882/understanding-why-there-is-still-downtime-for-sql-server-with-microsoft-clustering/
    Question 2 and 3: What are the Changes need to be done on Production Server? What are the Steps to be followed While Configuring new Database Server?
    Since AlwaysOn Availability Groups require a Windows Server Failover Cluster, we first need to add the Windows Failover Cluster Feature to all the machines running the SQL Server instances that we will configure as replicas.
    Once the Windows Server Failover Cluster has been created, we need to proceed with enabling the AlwaysOn Availability Groups feature in SQL Server 2012.  This needs to be done on all of the SQL Server instances that we will configure as replicas in our
    Availability Group.
    For more details about Step-By-Step: Creating a SQL Server 2012 AlwaysOn Availability Group, please refer to the following article:
    http://blogs.technet.com/b/canitpro/archive/2013/08/20/step-by-step-creating-a-sql-server-2012-alwayson-availability-group.aspx
    If you have any question, please feel free to let me know.
    Regards,
    Jerry Li

  • RMAN Tips for Large Databases

    Hi Friends,
    I'm actually starting administering a large Database 10.2.0.1.0 on Windows Server.
    Do you guys have Tips or Docs saying the best practices for large Databases? I mean large as 2TB of data.
    I'm good administering small and medium DBs, but some of them just got bigger and bigger!!!
    Tks a lot

    I would like to mention below links :
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28318/partconc.htm
    http://download.oracle.com/docs/cd/B28359_01/server.111/b32024/vldb_backup.htm
    For couple of good advices and considerations for RMAN VLDB:
    http://sosdba.wordpress.com/2011/02/10/oracle-backup-and-recovery-for-a-vldb-very-large-database/
    Google "vldb AND RMAN in oracle"
    Regards
    Girish Sharma

  • How to handle SQL connection if password Active directory always change? (Connection using Active directory via network SQL 2012 )

    I have 3 server (Web server, database sql 2012 server and Active directory). I'm using sqlsvr version 3.0,  PHP version 5.3 ,IIS version 7 and windows server 2008.
    Right now my php connection to SQL 2012 using AD id, so How to handle if password on active directory change?

    Solved : Using Kaberos

  • ISSUE Sharepoint 2013 databases for reporting services on the second server SQL 2012

    Hello,
    I have server A: Operating system windows 2012 standard, SQL server 2012 standard
    instance: Sharepoint contains data for sharepint
    instance: Reporting should be contain databases for reporting
    Server B:
    Windows server 2012 standard contains installation Sharepoint 2013
    Sharepoint works (without reporting services), it is OK - databases are located on server A:
    My issue is:
    When I have installed reporting services on server B, I have already installed SQL server 2012 on server B, it works.
    I am able to create report in report builder adn place it in to sharepoint.
    But I would like to use only one full SQL machine on server A:
    When I reconfigure repoting settings on server A in central administration - manage service aplications,
    On the SQL server A in instance reporting , there is automatically created databases. It is no problem.
    But the first difference is, when I want to manage service aplication for reporting  in
    Provision Subscriptions and Alerts, there is information
    SQL Server Agent state cannot be determined
    When I want to create report in report builder, I have issue:
    server A-7380mw016\reporting it means server A with full SQL server:
    The Test of connection was successful
    Then I have clicked test connection
    I have recieved this screen with fail: Logon faild for user NT Authority\anonymous logon
    My account belongs to SQL admin on server A (A-7380mw016\reporting) I do not know it is not possible to create report, when it is possible to test connection in the first step and in the second step, there is problem...
    Please, can somebody help me?

    Hi,
    Since you are getting an Anonymous Logon error, it appears there may be a problem passing your credentials to the SQL Server Agent Service. This would indicate a Kerberos issue. See this thread for details:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/46b7c773-6a77-435d-b471-cb9a6ec41c43/has-anyone-else-upgraded-reporting-services-to-denali-2012
    Microsoft Virtual Academy: Breakthrough Insights using SQL Server 2012 : Analysis Services and Credible, Consistent data (Module 2) - Configuring and Securing Complex BI Applications in a SharePoint 2010 Environment with Microsoft SQL Server 2012
    http://technet.microsoft.com/en-us/video/Video/hh858469
    Tips from the video:
    We are connecting to Reporting services using Kerberos when using Reporting Services in SharePoint integrated mode
    For the account using reporting services, we just need a dummy SPN. We go to Attribute editor tab in AD for RS account. And then we will be enabled with Delegation tab.
    In Delegation tab. I we are using claims to windows token, we need to use "Trust this user for delegation to specified services only"
    There you have 2 options: "Use Kerberos only": It means I only want to delegate in the situation where the service that is doing the delegation actually has the Kerberos ticket to start with
    "Use any authentication protocol" When we need protocol transition (like from NTLM to claims for intra farm communication)
    We need to delegate this to SQL server.
    Please check out these articles as well:
    How to configure SQL Reporting Services in SharePoint Server for Kerberos authentication
    http://support.microsoft.com/kb/2723587
    Configure Kerberos authentication (Office SharePoint Server)
    http://blogs.technet.com/b/mbiswas/archive/2009/07/10/configure-kerberos-authentication-office-sharepoint-server.aspx
    Thanks.
    Tracy Cai
    TechNet Community Support

  • Recommended way to start a merge replication with big database

    Hi all
    I need to install a merge replication on 2 diferent stores with Sql 2012 server, that are connected via 2 mb vpn and the database is about 4gb. due to the fact we have 2mb for the initial sync and the database is big, What is the recommended way to do that
    without using the snapshop agent step? Can I take a backup of the db and restore it in the second server and setup the merge replication ? If so, where I tell the wizards that the databases are already there and do not use the snapshop agent and just start
    to replicate ?
    Thanks in advance.
    James

    Create the publication and snapshot. Zip up the snapshot and send it via FedEx to the subscriber. Apply the snapshot on the subscriber by pointing to the unzipped snapshot using the altSnapshotFolder parameter of the merge agent.
    looking for a book on SQL Server 2008 Administration?
    http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search?
    http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941

  • Fulltext search of binary files outside of database in SQL 2012/Server 2012

    This may be more of a Windows Server 2012 question but I'm not sure.
    I have a system that holds large amounts of binary files (pdf, doc, etc.).  The files themselves are held outside the database in a folder and a SQL table holds the metadata.  I used the Indexing Service available through Windows Server 2008 to
    create a catalog called "EFCATALOG" to index the contents of the external folder, then created a linked server called MYIDXS which allowed me to query that external indexing catalog from within SQL with a query like this:
    EXEC sp_addlinkedserver MYIDXS, 'Internal App', 'MSIDXS', 'EFCATALOG'
    SELECT * FROM MYDOCS
    LEFT JOIN OPENQUERY(MYIDXS,'SELECT FILENAME FROM SCOPE() WHERE CONTAINS (''test'')') AS MYTBL
    ON MYDOC_FILE_NAME = MYTBL.[FILENAME]
    With Windows Server 2012, I'm missing the functionality to create the indexing service catalog.  I've added the Windows Search Service and see how I can configure folders for searching, but there is no naming functionality for this and I don't see how
    I can get the above query/structure to work in Windows Server 2012/SQL Server 2012 environment.  In fact, there isn't much at all online regarding the search service or the relationship back to the older versions in 2008 and before.
    Is there any way to continue this structure in 2012?  I would like to avoid recoding my application to work with a different structure.  I'm afraid that changing everything to work with the FILETABLE/FILESTREAM functionality added in SQL 2012
    will be necessary which is fine long term, but not convenient right now.
    Thanks in advance for any suggestions/help.

    Thank you Fanny Liu, based on your link the syntax has changed dramatically. I need to query SYSTEMINDEX now and the structure is very different.    It still seems that this new syntax requires creating a linked server of a different type. 
    I've tried:
    EXEC sp_addlinkedserver @server = 'TEST', @provider = 'Search.CollatorDSO.1', @datasrc = 'SYSTEMINDEX', @srvproduct = '', @provstr='Application=Windows'
    SELECT FileName FROM OPENQUERY("TEST", 'SELECT Filename FROM SYSTEMINDEX')
    Msg 7302, Level 16, State 1, Line 1
    Cannot create an instance of OLE DB provider "Search.CollatorDSO.1" for linked server "TEST".
    I've also tried using just "Search.CollatorDSO"as the provider since that is the provider name listed in management studio but basically the same error comes back.
    So I have 2 questions:
    1) Is it possible for my original process to work in Windows Server 2012 in any way (meaning that the OPENQUERY example I provided can remain relatively unchanged)?
    2) If change is necessary using this new SYSTEMINDEX and linked server combination, why is my linked server definition failing?  I'm using SQL Server 2012....Microsoft SQL Server 2012 - 11.0.2100.60 (X64)
     Feb 10 2012 19:39:15
     Copyright (c) Microsoft Corporation
     Express Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: ) (Hypervisor)
    Thank you.

  • SQL 2012 and later will fail to publish a database for any tables with a default constraint that references a user defined function.

    Script will create database, 3 database objects and publish. 
    The error is due to the generation script to create the conflict tables that is not stripping out default constraints that reference a UDF. 
    As you can see below, the failure is on the generation script for the conflict table.
    The conflict table should be a bucket table that shouldn’t enforce data integrity. 
    See how the default constraints for the columns someint and somestring were stripped out of the generation logic however the default constraint that utilizes a UDF persist and uses the same object name that was used on the production table (The
    bold line) , this occurs if I explicitly name the constraint or let the system generate the name for me like in the example posted. 
      The only way I could see getting around this right now is to drop all default constraints in the system that uses a UDF, publish then add the constraints back which is vulnerable to invalid data and a lot of moving
    steps.  This all worked with SQL 2000, 2005, 2008, 2008r2, it’s stopped working in SQL 2012 and continues to not work in SQL 2014. 
    Error messages:
    Message: There is already an object named 'DF__repTable__id__117F9D94' in the database.
    Could not create constraint. See previous errors.
    Command Text: CREATE TABLE [dbo].[MSmerge_conflict_MergeRepFailurePublication_repTable](
            [id] [varchar](8) NULL CONSTRAINT [DF__repTable__id__117F9D94]  DEFAULT ([dbo].[repUDF]()),
            [somedata] [varchar](64) NULL,
            [rowguid] [uniqueidentifier] ROWGUIDCOL  NULL,
            [someint] [int] NULL,
            [somestring] [varchar](64) NULL
    Parameters:
    Stack:    at Microsoft.SqlServer.Replication.AgentCore.ReMapSqlException(SqlException e, SqlCommand command)
       at Microsoft.SqlServer.Replication.AgentCore.AgentExecuteNonQuery(SqlCommand command, Int32 queryTimeout)
       at Microsoft.SqlServer.Replication.AgentCore.ExecuteDiscardResults(CommandSetupDelegate commandSetupDelegate, Int32 queryTimeout)
       at Microsoft.SqlServer.Replication.Snapshot.YukonMergeConflictTableScriptingManager.ApplyBaseConflictTableScriptToPublisherIfNeeded(String strConflictScriptPath)
       at Microsoft.SqlServer.Replication.Snapshot.BaseMergeConflictTableScriptingManager.DoConflictTableScriptingTransaction(SqlConnection connection)
       at Microsoft.SqlServer.Replication.RetryableSqlServerTransactionManager.ExecuteTransaction(Boolean bLeaveTransactionOpen)
       at Microsoft.SqlServer.Replication.Snapshot.BaseMergeConflictTableScriptingManager.DoConflictTableScripting()
       at Microsoft.SqlServer.Replication.Snapshot.MergeSmoScriptingManager.GenerateTableArticleCftScript(Scripter scripter, BaseArticleWrapper articleWrapper, Table smoTable)
       at Microsoft.SqlServer.Replication.Snapshot.MergeSmoScriptingManager.GenerateTableArticleScripts(ArticleScriptingBundle articleScriptingBundle)
       at Microsoft.SqlServer.Replication.Snapshot.MergeSmoScriptingManager.GenerateArticleScripts(ArticleScriptingBundle articleScriptingBundle)
       at Microsoft.SqlServer.Replication.Snapshot.SmoScriptingManager.GenerateObjectScripts(ArticleScriptingBundle articleScriptingBundle)
       at Microsoft.SqlServer.Replication.Snapshot.SmoScriptingManager.DoScripting()
       at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.DoScripting()
       at Microsoft.SqlServer.Replication.Snapshot.MergeSnapshotProvider.DoScripting()
       at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.GenerateSnapshot()
       at Microsoft.SqlServer.Replication.SnapshotGenerationAgent.InternalRun()
       at Microsoft.SqlServer.Replication.AgentCore.Run() (Source: MSSQLServer, Error number: 2714)
    Get help: http://help/2714
    Server COL-PCANINOW540\SQL2012, Level 16, State 0, Procedure , Line 1
    Could not create constraint. See previous errors. (Source: MSSQLServer, Error number: 1750)
    Get help: http://help/1750
    Server COL-PCANINOW540\SQL2012, Level 16, State 0, Procedure , Line 1
    Could not create constraint. See previous errors. (Source: MSSQLServer, Error number: 1750)
    Get help: http://help/1750
    Pauly C
    USE [master]
    GO
    CREATE DATABASE [MergeRepFailure]
    ALTER DATABASE [MergeRepFailure] SET COMPATIBILITY_LEVEL = 110
    GO
    USE [MergeRepFailure]
    GO
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    create view
    [dbo].[repView] as select right(newid(),8) as id
    GO
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE FUNCTION [dbo].[repUDF]()
    RETURNS varchar(8)
    BEGIN
    declare @val varchar(8)
    select top 1 @val = id from [repView]
    return @val
    END
    GO
    create table repTable
    id varchar(8) default([dbo].[repUDF]()),
    somedata varchar(64) null,
    rowguid uniqueidentifier ROWGUIDCOL default(newid()),
    someint int default(1),
    somestring varchar(64) default('somestringvalue')
    GO
    insert into reptable (somedata) values ('whatever1')
    insert into reptable (somedata) values ('whatever2')
    go
    /*test to make sure function is working*/
    select * from reptable
    GO
    /*Publish database*/
    use [MergeRepFailure]
    exec sp_replicationdboption @dbname = N'MergeRepFailure', @optname = N'merge publish', @value = N'true'
    GO
    declare @Descrip nvarchar(128)
    select @Descrip = 'Merge publication of database ''MergeRepFailure'' from Publisher ''' + @@servername +'''.'
    print @Descrip
    -- Adding the merge publication
    use [MergeRepFailure]
    exec sp_addmergepublication @publication = N'MergeRepFailurePublication', @description = N'@Descrip',
    @sync_mode = N'native', @retention = 14, @allow_push = N'true', @allow_pull = N'true', @allow_anonymous = N'true',
    @enabled_for_internet = N'false', @snapshot_in_defaultfolder = N'true', @compress_snapshot = N'false', @ftp_port = 21,
    @ftp_subdirectory = N'ftp', @ftp_login = N'anonymous', @allow_subscription_copy = N'false', @add_to_active_directory = N'false',
    @dynamic_filters = N'false', @conflict_retention = 14, @keep_partition_changes = N'false', @allow_synctoalternate = N'false',
    @max_concurrent_merge = 0, @max_concurrent_dynamic_snapshots = 0, @use_partition_groups = null, @publication_compatibility_level = N'100RTM',
    @replicate_ddl = 1, @allow_subscriber_initiated_snapshot = N'false', @allow_web_synchronization = N'false', @allow_partition_realignment = N'true',
    @retention_period_unit = N'days', @conflict_logging = N'both', @automatic_reinitialization_policy = 0
    GO
    exec sp_addpublication_snapshot @publication = N'MergeRepFailurePublication', @frequency_type = 4, @frequency_interval = 14, @frequency_relative_interval = 1,
    @frequency_recurrence_factor = 0, @frequency_subday = 1, @frequency_subday_interval = 5, @active_start_time_of_day = 500, @active_end_time_of_day = 235959,
    @active_start_date = 0, @active_end_date = 0, @job_login = null, @job_password = null, @publisher_security_mode = 1
    use [MergeRepFailure]
    exec sp_addmergearticle @publication = N'MergeRepFailurePublication', @article = N'repTable', @source_owner = N'dbo', @source_object = N'repTable', @type = N'table',
    @description = null, @creation_script = null, @pre_creation_cmd = N'drop', @schema_option = 0x000000010C034FD1, @identityrangemanagementoption = N'manual',
    @destination_owner = N'dbo', @force_reinit_subscription = 1, @column_tracking = N'false', @subset_filterclause = null, @vertical_partition = N'false',
    @verify_resolver_signature = 1, @allow_interactive_resolver = N'false', @fast_multicol_updateproc = N'true', @check_permissions = 0, @subscriber_upload_options = 0,
    @delete_tracking = N'true', @compensate_for_errors = N'false', @stream_blob_columns = N'false', @partition_options = 0
    GO
    use [MergeRepFailure]
    exec sp_addmergearticle @publication = N'MergeRepFailurePublication', @article = N'repView', @source_owner = N'dbo', @source_object = N'repView',
    @type = N'view schema only', @description = null, @creation_script = null, @pre_creation_cmd = N'drop', @schema_option = 0x0000000008000001,
    @destination_owner = N'dbo', @destination_object = N'repView', @force_reinit_subscription = 1
    GO
    use [MergeRepFailure]
    exec sp_addmergearticle @publication = N'MergeRepFailurePublication', @article = N'repUDF', @source_owner = N'dbo', @source_object = N'repUDF',
    @type = N'func schema only', @description = null, @creation_script = null, @pre_creation_cmd = N'drop', @schema_option = 0x0000000008000001,
    @destination_owner = N'dbo', @destination_object = N'repUDF', @force_reinit_subscription = 1
    GO

    More information, after running a profile trace the following 2 statements, the column with the default on a UDF returns a row while the other default does not.  This might be the cause of this bug.  Is the same logic to generate the object on
    the subscriber used to generate the conflict table?  
    exec sp_executesql N'
    select so.name, schema_name(so.schema_id)
    from sys.sql_dependencies d
    inner join sys.objects so
    on d.referenced_major_id = so.object_id
    where so.type in (''FN'', ''FS'', ''FT'', ''TF'', ''IF'')
    and d.class in (0,1)
    and d.referenced_major_id <> object_id(@base_table, ''U'')
    and d.object_id = object_id(@constraint, ''D'')',N'@base_table nvarchar(517),@constraint nvarchar(517)',@base_table=N'[dbo].[repTable]',@constraint=N'[dbo].[DF__repTable__id__117F9D94]'
    exec sp_executesql N'
    select so.name, schema_name(so.schema_id)
    from sys.sql_dependencies d
    inner join sys.objects so
    on d.referenced_major_id = so.object_id
    where so.type in (''FN'', ''FS'', ''FT'', ''TF'', ''IF'')
    and d.class in (0,1)
    and d.referenced_major_id <> object_id(@base_table, ''U'')
    and d.object_id = object_id(@constraint, ''D'')',N'@base_table nvarchar(517),@constraint nvarchar(517)',@base_table=N'[dbo].[repTable]',@constraint=N'[dbo].[DF__repTable__somein__1367E606]'
    Pauly C

  • Moving Service Manager Database From SQL 2008 R2 SP2 to SQL 2012 SP1

    Hi Guys,
    Just looking for some clarification about moving our Service Manager 2012 R2 database to a new SQL Server.
    Our Service Manager database is currently on a remote SQL server, shared with other databases, running SQL 2008 R2 SP2. It was originally setup this way as we only deployed Change Management but we are now wanting to deploy everything, fully
    utilising SCSM/Orchestrator and Cireson's suite. Due to the limited resources available on that SQL server we are seeing performance issues before even getting it all up and running.
    I want to move the Service Manager database to a new dedicated SQL server running SQL 2012 SP1. I am aware of the official DB move procedure but it does not specifically mention moving up SQL versions. I have seen some comments around here that
    it is fine to do but some feedback would be good, it is not something I have done before. 
    All servers in this are fully patched Windows 2008 R2. Also, we do not currently have a Data Warehouse so do not need to worry about that. It was dropped and uninstalled before upgrading to Service Manager 2012 R2 and will be reinstalled after this DB move
    using a separate dedicated SQL server.
    Thanks, Chris.

    As long as your collations and permissions are the same as before it
    should not be a problem. That sad i could not find any other documentation saying it's not supported. 
    I have moved SCSM databases between different SQL-versions before and it has worked fine if the collations etc are correct. 
    Cheers,
    Thomas Strömberg
    System Center Specialist
    Blog:  
    Twitter:   LinkedIn:
    Please remember to 'Propose as answer' if you find a reply helpful

  • Sql Service and Databases won't start on two of my databases SQl 2005

    getting the errors below
    In Event viewer I have Event ID 17120 SQL Server Could not Spawn FRuncm thread check the sql server error log and the windows event logs for information about possible related problems.
    Event id 17826 Could not start the Network Library because of an internal error in the netwpork library. To determine the cause review the errors immediately preceding this one in the error log.
    Also Event id 17182 TDSSN1 Client initialization failed with error 0x2,
    status code 0x1
    I think this post could help me but I do not know
    what is the domain login account for the SQL service is in sql 2005.
    Please see the post below
    1. added our domain login account for the SQL service to the local group SQLServer2005MSSQLUser$HSPCSVR03$MSSQLSERVER
    2. added the domain login account for the Agent service to SQLServer2005SQLAgentUser$HSPCSVR03$MSSQLSERVER
    3. added both accounts to the local computer Administrators group.
    4. deleted C:\Documents and Settings\<user>\Application Data\Microsoft\Microsoft SQL Server\90\Tools\Shell\mru.dat.I hope someone can help me with this. this broken Backup exec Database
    has become a nightmare. Two of the sql databases, both the bkup exec one and one called MS SQlserver will not start under services and the local system account or the Administrator account.
    Droid Hacker

    Hello,
    Did you refer to the folloing blog to troubleshooting this issue?
    Error Messages of SQL Server 2005 Start Up Failure
    According to the blog above, "TDSSNIClient initialization failed with error 0x2" , 0x2 is the OS error. Typing "net helpmsg 2" in command prompt return:The system cannot find the file sepcify. Status code 0x1 is general status code. You can review error
    log which start from error:17182 in SQL Server error log and mapping status code to specific problem.
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Upgrade FIM 2010 R2 Sp1 Databases from SQL 2008 R2 to SQL 2012

    Hi,
    I want to upgrade my SQL from 2008 R2 to SQL 2012.
    FIM Databases   
    1) FIMService Database 
    2) FIMSynchronizationService Database 
    Mentioned above are my FIM databases running on SQL server 2008 R2 . Now I was looking for some article which could tell me if SQL can be upgraded without affecting my existing databases of FIM or if i can move these databases to a new server having SQL
    2012
    Activity I want to perform :  Create a fresh  Server of SQL 2012 and move my FIM 2010 databases over it by restoring the backups. but as per the link below it seems not possible!
    http://social.technet.microsoft.com/wiki/contents/articles/5465.fimilm-how-to-move-the-backend-sql-server-synchronization-service-database.aspx

    Hi Shivam,
    Please take a look here: Release Notes for Forefront Identity Manager 2010 R2 SP1.
    In the table you have tasks to upgrade SQL for FIMService and FIMSych.
    FIM Service:
    Upgrade FIM Service servers to FIM 2010 R2 SP1
    Stop FIM Service on all servers
    Backup Database [in case rollback needed]
    Upgrade SQL to SQL Server 2012
    Start FIM Service on all servers
    FIM Synch:
    Upgrade FIM Sync to FIM 2010 R2 SP1
    Stop FIM Sync
    Backup Database [in case rollback needed]
    Upgrade SQL to SQL Server 2012
    Start FIM Sync
    If you are not making in-place upgrade, I would do something like here:
    Stop FIM Services
    Backup the databases at SQL 2008
    Restore backed up databases on SQL 2012
    Make sure SQL Agent Jobs are moved (FIMService)
    Make sure Broker is enabled on FIMService database
    On FIM machines create SQL alias using cliconfg utility. Alias should have the name of "old(sql2008) SQL" and point to new name/instance.
    Start FIM Services - they would use "old" name to connect, but it would be translated to new location. So they would start.
    If you found my post helpful, please give it a Helpful vote. If it answered your question, remember to mark it as an Answer.

  • SQL 2012 database behaves differently with a unique index and ignore_dup_key = on when inserting data. It works on SQL 2008 db

    If you have a table with a unique index and ignore_dup_key = on and you INSERT rows into that table with an ORDER BY clause (because you want to control which of the duplicate
    key rows gets inserted),  the wrong row gets inserted in SQL2012.  It works correctly in SQL 2008.
    We have recently migrated  a database from SQL 2008 to SQL 2012.  We do have few other dbs which are in compatability mode 100.  The above operation works fine
    in SQL 2008 dbs but not SQL 2012.
    I've even tried applying the latest patch for SQL 2012 SP2 with CU2. Still the problem exists.  I'm going to call MS support, but want to know if anyone has come across this problem ?

    The MS documentation doesn't guarantee that the first row of the duplicates will always be inserted and the next duplicate row(s) get(s) ignored. Where did you find it in the MS documentation? I think you were just lucky that it was always inserting the
    first row in SQL 2008 (and ignoring the rest of the duplicates) - I don't think this is guaranteed
    Satish Kartan http://www.sqlfood.com/

  • RE: Database (SQL-SERVER) access problem

    Have you used NT Control Panel/ ODBC to set up the ODBC data source name?
    You have to define the data source (database) SecTrade as well as the
    driver to be used (SQL Server). This can be done by selecting the Add
    button on the Data Sources screen in Control Panel/ ODBC.
    Hope this helps.
    Sanjay Murthi
    Indus Consultancy Services, Inc.
    From: Administrator
    Sent: Wednesday, August 13, 1997 6:49 PM
    To: "'[email protected]'"
    Cc: murthis; thyagarajm; thyagarm; vasasm; chandraa
    Subject: Database (SQL-SERVER) access problems
    MCI Mail date/time: Mon Aug 11, 1997 10:28 pm EST
    Source date/time: Mon, 11 Aug 1997 19:25:34 +0530
    Hi Forte-Users,
    We have a setup a Sql-Server database on a NT server. In the Forte
    EConsole,
    we have
    setup a ODBC-type Resource for this server, named SERVER2_ODBC. This NT
    server
    is configured as a Client Node in the active Forte environment. Note
    that
    Server2 is not
    the Forte server, but has Forte installed. There is another NT server
    which
    acts as the
    Forte server. NODEMGR and Sql-Server are running on SERVER2.
    In our application, we have a DBSession SO with the database source
    as SERVER2_ODBC, Userid=ForteInstructor. When running the application,
    Forte
    throws an exception, the gist of it being as follows:
    USER ERROR: (This error was converted)
    Failed to connect to database: SecTrade, username: ForteInstructor.
    [Microsoft][ODBC Driver Manager] Data source name not found and no
    default
    driver specified
    We have tried
    1) Installing ODBC drivers on the NT server (Server2)
    2) Accessing local databases from Forte clients which works fine
    3) Accessing the Sql-Server database through Isqlw (Sql-Server Client
    s/w) -
    It works.
    Could someone suggest what we should try to get rid of this problem?
    Thanks for any help,
    Kishore Puvvada

    Rajsarawat wrote:
    Dear sir/mam,
    I have installed sql server 2005 (server) and on another computer installed client. It installed successfully but on client side it does not seen, from where should i start it. so please send me procedure to install sql server 2005 on both side(client and server).You have to turn on network (external to your computer) access.
    Under programs->sql server look for "surface"

Maybe you are looking for

  • How do i add more than 1 folder of photos to my iphone please?!

    clicking selected folders has become unclickable and i can only use all folders. i want to sync a few photo folders. how do i add these to my iphone please?

  • High quality images in indesign CS6 get pixelated

    I have been using indesign CS6 for a while now. Recently, when I place some images into a document, they are pixelated. They are high quality images with a high resolution. Even when I shrink it down considerably to fit in the document, it still gets

  • HT4623 I have updated my software from 4.1 to 6.3 . But i can't get network. What should i do ?

    I have a 3GS iPhone. It's IOS version wass 4.1. Then I updated the version to 6.0.1. When I finished my update i can't use my phone now. It can't activate. What should I do to solve this problem ?

  • PCUI - Sort order in columns

    Hi, I am trying to get a list in PCUI to be sorted by date, but descending. Right now I can check the "sorted" property in the field group, but thant only allows me to have the list sorted ascending by this field on load. Any idea on how to reverse t

  • Extract image in Photoshop CS4

    Hello, I'd like to extract an image in Photoshop CS4, but I can't find the Extract tool. I saw an online tutorial that says it's under the Filter Menu > Extract. But it's not there. Any thoughts? Thank you.