Hi All,
can i resync publication/subscription through query? Actually currently i doing it through right click on pub/subs from replication monitor.
Please provide query.
MnSap
Hi All,
can i resync publication/subscription through query? Actually currently i doing it through right click on pub/subs from replication monitor.
Please provide query.
MnSap
I need to cleanup a partial setup of replication that failed. When I try to disable the replication I get the following message. Can anyone tell me how to remove the distribution database.
TITLE: Microsoft.SqlServer.ConnectionInfo
------------------------------
SQL Server could not disable publishing and distribution on 'ASH-DB'.
------------------------------
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
Invalid object name 'dbo.syssubscriptions'.
Transaction count after EXECUTE indicates that a COMMIT or ROLLBACK TRANSACTION statement is missing. Previous count = 0, current count = 1.
Transaction count after EXECUTE indicates that a COMMIT or ROLLBACK TRANSACTION statement is missing. Previous count = 0, current count = 1.
Transaction count after EXECUTE indicates that a COMMIT or ROLLBACK TRANSACTION statement is missing. Previous count = 0, current count = 1.
Transaction count after EXECUTE indicates that a COMMIT or ROLLBACK TRANSACTION statement is missing. Previous count = 0, current count = 1.
Transaction count after EXECUTE indicates that a COMMIT or ROLLBACK TRANSACTION statement is missing. Previous count = 0, current count = 1.
Changed database context to 'master'. (Microsoft SQL Server, Error: 208)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=208&LinkId=20476
------------------------------
BUTTONS:
OK
------------------------------
Hi All,
We have configured replication and wanted to remove it hence without any checklist we have deleteddistribution database and wanted configure newly but couldn't find "configure distribution". Later we tried to disable publishing and distribution finally we received the below error. Please share your views on this and suggest on how to configure replication at this scenario. Thank You
TITLE: Microsoft.SqlServer.ConnectionInfo
------------------------------
SQL Server could not disable publishing and distribution on 'WIN-KPDO'.
------------------------------
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
Database 'distribution' does not exist. Make sure that the name is entered correctly.
Changed database context to 'master'. (Microsoft SQL Server, Error: 911)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=11.00.3368&EvtSrc=MSSQLServer&EvtID=911&LinkId=20476
------------------------------
BUTTONS:
OK
------------------------------
Regards,
Kalyan
----Learners Curiosity Never Ends----
Currenty we have publisher as Oracle 12C and Subscriber as SQL Server 2017.
I wanted to know if SQL Server 2017 Replication supports replication from Oracel 12C Database to SQL Server 12C database.
Request you to share details regarding the same , in case if there are supporting facts please do share them as well.
Thanks in Advance
I try to add subscription at the Publisher with initialize from backup file, but keep getting the error below. I can clearly do RESTORE HEADERONLY from the backup file
EXEC sp_addsubscription
@publication ='Pub_TestDB',
@subscriber = 'MSQLSQLINSTANCE\INSTANCE01,1419',
@destination_db ='TestDB',
@sync_type = 'initialize with backup',
@backupdevicetype = 'disk',
@backupdevicename = 'e:\mssql\testDB.bak'
Msg 18782, Level 16, State 1, Procedure sys.sp_MSextractlastlsnfrombackup, Line 207 [Batch Start Line 40]
Could not locate backup header information for database '[MSQLSQLINSTANCE\INSTANCE01,1419].[TestDB]' in the specified backup device. Specify a backup device that contains a backup of the Publisher database.
Thank you in advance for any advise and help.
Kevin
Hello Everyone, not sure if this is the right place to post this, I was playing with SQL Data Sync between Azure SQL Database and SQL Server on-premises; until my azure account ran out money :-), I removed my azure test environment and now I can't unregister my on-premise database from the "Microsoft SQL Data Sync" since I no longer have a key from the Azure Sync Agent.
Is there a way to manually unregister the on-premise database?, or I need to recreate the whole thing again?
Thank you in advance
Luis
Luis
I currently have a table with a 3 column composite PK, due to business reasons I need to add another column to that PK. However the table is replicated and I am therefore unable to just simply add it to the PK without it giving me an error.
Is there a way to do what I need to do without taking the table out of replication, dropping the table, recreating the table and adding the table back into replication?
Thank you for any assistance.
Wayne E. Pfeffer
On a DB server (Publisher & distributor is same) Distribution DB grew to it's full until it used full of space of drive. I had to extend drive and make replication (transnational) sync manually.
Now below is the space of distribution DB, I have few question I would like to clear.
1. As I can see MDF file of distribution shows around 83 GB is free, does it mean distribution cleanup job worked successfully ?
2. Will clean-up job reduce size of actual MDF file from total MB ? Or I have to manually shrink MDF ?
3. This was fine till Friday, suddenly distribution grow to full, how can I correlate the reason of this frequent growth.
there are two windows servers and no longer the same LAN.
i want to configure server2 as the remote distibutor
in the server2,i added server1 as a publisher in the Configure Distribution Wizard and set the password
in the server1,i configures distribution like this>> select Add buttons and Login with distributor_admin
results:
"server1 name" is not enabled as publisher at the distributor. "server2 ip". Contact the adminstrator of the Distributor to enable this server as a publisher
Snapshot Agent History shows:
[98%] The process is running and is waiting for a response from the server.
Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Background:
The replication used to work just fine. There are no blocking processes. I've increased the timeout period via the agent profile to 1 hour. There's plenty of space in the snapshot file share.
Details:
I can see a long running query from the Snapshot Agent SMO Connection "application" in the Activity Monitor. It shows this query:
(@_msparam_0 nvarchar(4000),@_msparam_1 nvarchar(4000))SELECT
SCHEMA_NAME(tbl.schema_id) AS [Table_Schema],
tbl.name AS [Table_Name],
i.name AS [Index_Name],
p.name AS [Name],
CAST(p.value AS sql_variant) AS [Value]
FROM
sys.tables AS tbl
LEFT OUTER JOIN sys.periods as periods ON periods.object_id = tbl.object_id
LEFT OUTER JOIN sys.tables as historyTable ON historyTable.object_id = tbl.history_table_id
INNER JOIN sys.indexes AS i ON (i.index_id > @_msparam_0 and i.is_hypothetical = @_msparam_1) AND (i.object_id=tbl.object_id)
LEFT OUTER JOIN sys.key_constraints AS k ON k.parent_object_id = i.object_id AND k.unique_index_id = i.index_id
INNER JOIN sys.extended_properties AS p ON p.major_id=CASE (i.is_primary_key + 2*i.is_unique_constraint) WHEN 0 THEN i.object_id ELSE k.object_id END AND p.minor_id=CASE (i.is_primary_key + 2*i.is_unique_constraint) WHEN 0 THEN CAST(i.index_id AS int)
ELSE 0 END AND p.class=CASE (i.is_primary_key + 2*i.is_unique_constraint) WHEN 0 THEN 7 ELSE 1 END
ORDER BY
[Table_Schema] ASC,[Table_Name] ASC,[Index_Name] ASC,[Name] ASC
I've traced that query and the parameters passed in are '0' and '0'. Running the query in a query editor window with the parameters indeed exhibit the same results - a long running query that never finishes. The number of logical reads will surpass the billions and continues climbing until it times out. I am 100% sure it's this query that's causing the problem and cannot work around it since the query is internal to the snapshot process - narrowing it down to the ugly case statements in the joins. Is there any way I can get around this? Might be a bug. I may have the option to upgrade to CU20.
Currently on SQL Server version 14.0.1000.169
I'm investigating the slowdown of a system and am finding sp_MSunmarkreplinfo is blocking.
It is trying to get a schema modify lock but is being blocked by other things. This is then blocking a lot of other processes on the system that are trying to get schema shared locks. It is different SPs that are blocking sp_MSunmarkreplinfo so I don't think there is anything that can be done about that.
I would have thought that sp_MSunmarkreplinfo is only called when removing a table from replication? Should I be looking for someone/something that is trying to alter replication or is this sometimes called as part of the replication processing?
hi,all
i have added servername\repl_logreader,servername\repl_snapshot in sqlserver Logins.. and done everything for creating publications
using remote distributor:
int the last step in Publication wizad,erros happen as follows:
Proxy "servername\repl_logreader" is not a valid Windows user.Changed database context to "publication db"
mark: there is nothing errors when using local distributor
Afternoon,
Having a strange issue where transx replication is running for one of our larger publication and is going along smoothly then an error hit ...
TCP Provider: An existing connection was forcibly closed by the remote host.
The sync then initializes again and starts delivery the rest of the transactions neededing to be pushed out.
Added to this is that our alerting tool (DELL Spotlight) fires off a call to the oncall DBA saying the instance is down BUT everything is fine.
I do not see anything in the WIN App or Sys event logs at that time.
Wondering what I need to look at to figure this out or get more details.
Thanks ALL!
Hi everyone,
i created a transactional replication (SQL Server 2019) with two different servers.
there are in different domain.
Server 1 should only be the Publisher.
Server 2 should be the Distributor and the Subscriber.
In server2. I configured the distributor and added server1's ip and server name as publisher
In server1. I finished New Publication settings. Main steps as follows:
using server2 ip as distributor.
using SQL Server Agent in Agent Security settings
but i can't start Snapshot Agent and Log Reader Agent..
errors:
why?
Hi,
I have pull transactional replication setup. When there is a little load of transactions it starts failing with below error.
Agent message code 10054. TCP Provider: An existing connection was forcibly closed by the remote host.All server (pub\sub and dist) are on SQL 2016 SP2. Have other replication setup also between the servers but only one particular distributor agent is failing. Have verified the connection status between the serve when we encounter the error, network drivers are also up to date. No such auto close property is on.
What could be the possible reason and solution for the same?
Error messages:
TCP Provider: An existing connection was forcibly closed by the remote host. (Source: MSSQLServer, Error number: 10054)
Get help: http://help/10054
TCP Provider: An existing connection was forcibly closed by the remote host. (Source: MSSQLServer, Error number: 10054)
Get help: http://help/10054
Communication link failure (Source: MSSQLServer, Error number: 10054)
Get help: http://help/10054
TCP Provider: An existing connection was forcibly closed by the remote host. (Source: MSSQLServer, Error number: 10054)
Get help: http://help/10054
Communication link failure (Source: MSSQLServer, Error number: 10054)
Get help: http://help/10054
Protocol error in TDS stream (Source: MSSQLServer, Error number: HY000)
Get help: http://help/HY000
And Some time:
Message
2020-06-30 02:52:51.043 Copyright (c) 2016 Microsoft Corporation
2020-06-30 02:52:51.043 Microsoft SQL Server Replication Agent: distrib
2020-06-30 02:52:51.043
2020-06-30 02:52:51.043 The timestamps prepended to the output lines are expressed in terms of UTC time.
2020-06-30 02:52:51.043 User-specified agent parameter values:
-Publisher SERVERS1
-PublisherDB XYZ_DBSchema
-Publication XYZ_Reporting_REPL
-Distributor SERVERS2
-SubscriptionType 1
-Subscriber SERVERS1
-SubscriberSecurityMode 1
-SubscriberDB XYZ_Reporting
-Continuous
-XJOBID 0xB5B1C0883E31AB4CBA4638D9DE82779A
-XJOBNAME SERVERS1-XYZ_DBSche-XYZ_Reporting_-SERVERS1-XYZ_Reporting-0CF91B86-EBE3-4360-98FE-506C20656804
-XSTEPID 1
-XSUBSYSTEM Distribution
-XSERVER SERVERS1
-XCMDLINE 0
-XCancelEventHandle 0000000000001DF4
-XParentProcessHandle 0000000000001AAC
2020-06-30 02:52:51.043 Startup Delay: 4595 (msecs)
2020-06-30 02:52:55.652 Connecting to Subscriber 'SERVERS1'
2020-06-30 02:52:55.668 Connecting to Distributor 'SERVERS2'
2020-06-30 02:52:56.293 Parameter values obtained from agent profile:
-bcpbatchsize 2147473647
-commitbatchsize 100
-commitbatchthreshold 1000
-historyverboselevel 1
-keepalivemessageinterval 300
-logintimeout 15
-maxbcpthreads 1
-maxdeliveredtransactions 0
-pollinginterval 5000
-querytimeout 1800
-skiperrors
-transactionsperhistory 100
2020-06-30 02:52:56.605 Initializing
2020-06-30 02:53:04.199 101 transaction(s) with 3062 command(s) were delivered.
2020-06-30 02:53:04.652 100 transaction(s) with 194 command(s) were delivered.
2020-06-30 02:53:04.918 100 transaction(s) with 214 command(s) were delivered.
2020-06-30 02:53:13.168 Agent message code 10054. TCP Provider: An existing connection was forcibly closed by the remote host.
2020-06-30 02:53:13.308 Category:NULL
Source: Microsoft SQL Server Native Client 11.0
Number: 10054
Message: TCP Provider: An existing connection was forcibly closed by the remote host.
2020-06-30 02:53:13.340 Category:NULL
Source: Microsoft SQL Server Native Client 11.0
Number: 10054
Message: Communication link failure
2020-06-30 02:53:13.371 Category:NULL
Source: Microsoft SQL Server Native Client 11.0
Number: 10054
Message: TCP Provider: An existing connection was forcibly closed by the remote host.
2020-06-30 02:53:13.402 Category:NULL
Source: Microsoft SQL Server Native Client 11.0
Number: 10054
Message: Communication link failure
2020-06-30 02:53:13.434 Category:NULL
Source: Microsoft SQL Server Native Client 11.0
Number: 10054
Message: TCP Provider: An existing connection was forcibly closed by the remote host.
2020-06-30 02:53:13.480 The agent failed with a 'Retry' status. Try to run the agent at a later time.
Thank you,
Udham Singh
Our sysadmin approved a WSUS push of SSMS 18.5 last week. I believe I had been running 17.92. My normal morning routine starts with launching SSMS and starting Replication Monitor (RM).
When I did that RM connected to only one server, the one I was connected to when I started it. I have over 30 publishers scattered all over the world. It now takes better than 15 minutes to do what used to be done automatically in under 2 minutes.
All the publishers have the "Connect automatically when Replication Monitor starts" option selected.
I have tried removing several publishers and re-adding them, turning the autoconnect option off and back on, temporarily disabling the A/V suite, and rebooting the PC the customary three times.
This sure looks like a bug to me.
Anyone know of a workaround to get this working again?
Hi Team,
we have 1 replication setup on production server.Publisher and distribution are on same server and subscriber is at other end.
We are getting above error lots of time. Data has been transfer from publisher to distribution but it is not transferring from distribution to subscriber.Replication monitor showing around 25262718 pending from distribution to subscriber.
Error Messages :-
TCP Provider: An existing connection was forcibly closed by the remote host. (Source: MSSQLServer, Error number: 10054)
Get help: http://help/10054
Communication link failure (Source: MSSQLServer, Error number: 10054)
Get help: http://help/10054
Thanks
Aniket N