Quantcast
Channel: SQL Server Replication forum
Viewing all 4054 articles
Browse latest View live

Trying to report bug in SQL Server Replication with sp_MSdetect_nonlogged_shutdown stored procedure

0
0

I've just tried to "Submit Feedback" but the page just gives me an error which means nothing to anyone which says "You are not authorized to submit the feedback for this connection.". Why am I not authorised how do I become authorised etc etc. Anyway :-)

I've trying to report that the stored procedure in Sql Server Replication in 12.0.2000 has an issue with data type lengths. This procedure sp_MSdetect_nonlogged_shutdown uses data lengths of nvarchar(2048) but the MSDB sysjobhistory table has a message field length of 4000. Which causes the above stored procedure to crash.

Best Regards

Richard


REPLICATION ERROR Object reference not set: when copying permissions on stored proc in non DBO schema

0
0

Trying to create replication on a SQL 2008 R2 database.

Can replicate all tables, views, and UDFs with "copy permissions" set to true with no issue.

If I try to replicate any stored procs which aren't in dbo schema the Generate Snapshot process fail with the error

Error messages:
Source: Microsoft.SqlServer.Replication
Target Site: Void Script()
Message: Object reference not set to an instance of an object.
Stack:    at Microsoft.SqlServer.Replication.Snapshot.SmoScriptingManager.TextModeOnObjectScripter.Script()
   at Microsoft.SqlServer.Replication.Snapshot.SmoScriptingManager.GenerateNonTableArticleSchScript(Scripter scripter, BaseArticleWrapper articleWrapper, SqlSmoObject smoObject, Boolean quotedIdentifierOn, Boolean ansiNullsOn, Boolean textMode)
   at Microsoft.SqlServer.Replication.Snapshot.SmoScriptingManager.GenerateStoredProcedureArticleScripts(ArticleScriptingBundle articleScriptingBundle)
   at Microsoft.SqlServer.Replication.Snapshot.TransSmoScriptingManager.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.SqlServerSnapshotProvider.GenerateSnapshot()
   at Microsoft.SqlServer.Replication.SnapshotGenerationAgent.InternalRun()
   at Microsoft.SqlServer.Replication.AgentCore.Run() (Source: Microsoft.SqlServer.Replication, Error number: 0)
Get help: http://help/0

An example of one of the stored procs is:

CREATE proc [TIMEZONE].[getDSTStartAndEndDate] (
 @currentDate datetime
)
as

select DSTStart_LST, DSTEnd_LST
from [TIMEZONE].DSTStartEndDate
where Year = Year(@currentDate)
for XML AUTO

GO

The only permission being set is:

GRANT EXECUTE on [TIMEZONE].[getDSTStartAndEndDate] to [public];

All the users, schemas and tables exist at the destination.  if the grant SQL is run on the destination it runs without error.


unable to change Log Reader Agent Profile

0
0

Hi,

i am not able to change my Log Reader Agent Profil.

I select PROFILE A and try to exit the gui with OK, the "hook" jumps to PROFILE B.

I tried to delete PROFILE A and recreated it from Default Agent Profil. But i am still not able to change the Log Reader Agent.

Can anybody tell me, what is going wrong?

I have about 8 Publishers & Publications, and only 1 Log Reader Agent has this special error.

Thanks

Kind regards,

Andreas

Distribution Database is Growing - Distribution Cleanup Job Suddenly Failing

0
0

I started receiving DB Mail notifications like the ones below.  I looked in the Job Activity Monitor and could see that the distribution cleanup job stopped working for some reason.

DATE/TIME:        11/9/2014 11:26:57 PM

DESCRIPTION:   Replication-@rowcount_only parameter must be the value 0,1, or 2. 0=7.0 compatible checksum. 1=only check rowcou: agent distribution@rowcount_only parameter must be the value 0,1, or 2. 0=7.0 compatible checksum. 1=only  scheduled for retry. Could not clean up the distribution transaction tables.

COMMENT:        (None)

JOB RUN:             (None)


I looked in a number of places and found some code to clear out old data sitting in the distribution database that had already been received by the subscriber.  When I run the code no rows are cleared out and the database continues to grow. The oldest transaction is from 11/6/14 during the 11pm hour.  What do I need to do?

SELECT TOP 50 * FROM [distribution].[dbo].[MSrepl_transactions](nolock) ORDER BY entry_time ASC;
GO
SELECT COUNT(*) FROM [distribution].[dbo].[MSrepl_transactions];
GO

  EXEC dbo.sp_MSdistribution_cleanup @min_distretention = 0, @max_distretention = 144;
  GO

Here is the error message from the job History:

Deactivated initial snapshot for anonymous publication(s). New subscriptions must wait for the next scheduled snapshot. [SQLSTATE 01000] (Message 21077)  Could not remove directory '\\MachineName\Snapshot\unc\NAVISION_ISS 2009_CRMSYNCHRONIZATION\20141106213358\'. Check the security context of xp_cmdshell and close other processes that may be accessing the directory. [SQLSTATE 42000] (Error 20015)  Replication-@rowcount_only parameter must be the value 0,1, or 2. 0=7.0 compatible checksum. 1=only check rowcou: agent distribution@rowcount_only parameter must be the value 0,1, or 2. 0=7.0 compatible checksum. 1=only  scheduled for retry. Could not clean up the distribution transaction tables. [SQLSTATE 01000] (Message 14152).  The step failed


Lee Markum


Merge replication metadata deletion error MSSQL_REPL-2147199402

0
0

I setup merge replication about 3 weeks ago between a few databases all running SQL 2008 SP1:

  • DB1 - This database is the publisher and distributor.
  • DB2 - This database is a write-only subscriber (-EXCHANGETYPE 1) to DB1.
  • DB3 - This database is a write-only subscriber (-EXCHANGETYPE 1) to DB1.
  • DB4 - This database is a write-only subscriber (-EXCHANGETYPE 1) to DB1.
  • DB5 - This database is a read-only subscriber (-EXCHANGETYPE 2) to DB1.
  • DB6 - This database is a read-only subscriber (-EXCHANGETYPE 2) to DB1.

Everything was running fine, then suddenly one at a time the replication jobs for DB2, DB3, and DB4 all started reporting the error:

The Merge Agent failed after detecting that retention-based metadata cleanup has deleted metadata at the Publisher for changes not yet sent to the Subscriber. You must reinitialize the subscription (without upload). (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147199402)

I was able to manually upload data from DB2, DB3, and DB4 to DB1 then reinitialize the subscriptions.  However, I don't understand why only those three subscriptions failed.  I have other merge replication jobs between the same SQL instances that are still running fine.  The only unique thing I can determine about the failed subscriptions is that they are write-only.  I really don't want to make them read/write, as it would cause a lot of unnecessary network traffic to flow between them.

Based on what I've been able to gather, the subscriptions were marked as expired which caused this problem.  If I change subscriptions to never expire to get around this problem, is that going to cause my distribution DB to grow unchecked?  Are there other ways to solve this problem?

Thanks,

Matt

sp_showpendingchanges: How to replicate these pending changes in merge replication

0
0

Hi ,

sp_showpendingchanges this command shows how many changes are pending to replicate in merge replication.

is there any way to replicate these changes to manually.

Because i have merge replication which is not replicating the data from past 3 days . and I see the status as replicating.

Any help would be appreciated

Thanks in advance.

Log Shipping not working due to error, "Executed as user: Domain\Username. The step failed"

0
0

Hello Everyone,

I'm trying to learn how to setup Log Shipping within two sql servers. I've backed up and restored the database I'm working with to the secondary server using Restore with standby, I then Enabled the log shipping configuration but it does not work. I'm seeing the following error on the SQL Server Agents log history:

"Executed as user: Domain\Username. The step failed"

My initial thought was that there is a security issue. The account running the SQL Server Agent doesn't have access to something. I verified that the account is an admin and has rights to the folder the transaction files should be saved it. I also checked to make sure the account is also a sysadmin in SQL and is a db owner for the database I'm working with. 

Also, you should know that I'm working with a SharePoint content database.

Can anyone give me any help on why I'm getting this error.


Help needed on Fixing replication latency issues

0
0
Hi Team,
Good day!!!
I am new to replication setup and I am working on the issues with replication latency.
Can you please provide us your experience and expertise on fixing and troubleshooting replication issues.
Below are some queries on that,

1) How to check the replication errors?
2) how to find out the replication latency?
3) What are the steps to fix the replication latency?
4) how to teoubleshoot the issues coming on replication latency?

Awaiting your valuable response and replies.

Thanks in advance,
Sarvan.N

Pul subscription has millions of pending transactions in replication monitor

0
0

Distribution to subscriber has millions of pending transactions ,

and then it automatically start clearing those pending transactions, and this happens multiple times of the day,

when i start getting complains about replicated outdated data i restart the replicated server and transactions start syncing over .

this is about push subscription.

any solution please.


k

Document Map difference between SSRS 2005 and SSRS 2008

0
0

Hi,

We migrated our SSRS reports from SSRS 2005 to SSRS 2008. During testing, we came to know that there 
is difference between the formatting of Document map when the report is exported in Excel. 

The issues here is that SSRS 2005 Excel contains all the data in one column (Column A) where as in 
SSRS 2008, the data is getting shifted in Column B and Column C. 

Can someone please help me to fix this issue.

Thanks,

Harshad


Harshad ----------------------------------------------------------- Please mark as answer if the post helped you.

Transactional Replication: Alter view changes are not reflect on Subscription database

0
0

Hi All,

we are configured transactional replication in our environment on sql server 2008 R2 , Yesterday I made a view alter on publisher database the view also present in replicated articles but unfortunately the changes not reflect in subscription, I already have checked the : Replicate Schema change option in Subscription option its also true, there is not latency exist in replication monitor , i have checked the blocking on subscription and publication. one more thing I tested the changes on replicated table its working fine

Please help me to fix the issue.

Regards,

Pawan Singh


Thanks

How the replication latency is calculated?

0
0

Hi All

Currently we have some 3-peer replication setup(SQL 2012). Everything works fine, all tracers can be inserted and we have a total latency of less than 10 seconds. However, once in a while we can see Performance Critical in the replication monitor (up to 10 minutes latency). When we view the details we can't see any pending commands. This will fix itself randomly after some time (usually 30 mint or 2 hours). During all of this time everything just worked fine. 

I am curious as to how the latency is calculated. Has anyone seen the same behavior and if it is save to ignore this.

Cheers

Error in configuring subscription for merge replication

0
0
When i try to configure subscription for the merge replication, i get the error message as
(But subscription get completed successfully). I click the view detail in Replication monitor it display error like this.

Error messages:
The process could not connect to Subscriber 'SOFTENGER'. (Source: MSSQL_REPL, Error number: MSSQL_REPL20084)

Login failed for user 'TESTSOFTENGER\SOFTE$'. (Source: MSSQLServer, Error number: 18456)

The subscription to publication 'MergeOperation' could not be verified. Ensure that all Merge Agent command line parameters are specified correctly and that the subscription is correctly configured. If the Publisher no longer has information about this subscription, drop and recreate the subscription.  (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147201019)


Regards,
RM Thirunavukkarasu
www.thiruna.blog.com

Connection has stopped

0
0

Hi,

We migrated a SQL Server database to a new server and updated from 2005 to 2008.  A Java servlet application running through Tomcat on Windows connected to the database using a JNDI connector tag in the context.xml file and all worked well.  Except since the migration the JNDI connection to the SQL server database has stopped working even with the new connection details.  I know the connection details work because I can create a connection through the SQL Server management studio on my PC.  Is there a SQL server configuration setting that would stop this connecting?

Replication over internet between two companies.

0
0

I need to transaction replicate between two companies over the internet.
Even though there is a trusted tunnel between the companies, neither company wants to expose their infrastructure to the outside world. 

So company A has build an remote distributor on a DMZ-public area to send data to company B.

Now, company B wants to have a similar capability, instead of having the Subscriber receiving the data directly from the outside tunnel (exposing the companies infrastructure), they need to receive the data on a DMZ zone and then replicate to their internal network.  What I am looking here is :

Company A
(Publisher) .... firewall..... => (DMZ - Remote Distributor) => .....internet tunnel .......

Company B
(DMZ - Stage Area) ....firewall.... => (Subscriber)

Could you help me figure it out the best approach for this scenario ?

I would much appreciate any help on this. Thanks




How to configure Web Synchronization diffrents server envoiremet (MSSQL Server 2012)

0
0

How to configure Web Synchronization different server retirement (MSSQL Server 2012)  , Server are located two physical environment, can be accessible via internet. I need to replicate database between two servers, I tested this is local domain environment it is working well, but between live server is not working because windows user account is not identical because of servers not connected to any domain.

Please refer the below



System Support Engineer i-Context Content Convergence (Pvt) Ltd

Recommendations for creating a replication of a linked server

0
0

We have a SQL Server linked server connection to our legacy database.  I would like to replicate the linked server to a separate database for reporting purposes, but it does not appear a linked server can be the publisher for a replication.  Can anyone recommend the best practice for creating a separate SQL server database from a linked server connection?

REPLICATION MONITOR DOES NOT DISPLAY NOTHING !!!

0
0

Hi everybody ! i have the follow issue with the sql server replication monitor, does not show nothing on the window :( !!!,

if you know any solution for this problem, please !! let me know !!

thanks in advance....... there is a picture of the error, as you can ca see nothing is displayed u.u

sp_replmonitorsubscriptionpendingcmds data to temp table

0
0

HI Team:

Dump the output to #temp table. my target is like if the pendingcmdcount > 0, mail should be trigger.

Hence i m planning to insert the values to temp table but it is throwing error message:

Msg 8164, Level 16, State 1, Procedure sp_replmonitorsubscriptionpendingcmds, Line 139
An INSERT EXEC statement cannot be nested.

Even i searched for google, someone suggesting for this openrowset., i want to this without openrowset.

Please let me know if any option to do this.

My code likes below:

CREATE TABLE #test (pendingcmds int, estimatedprocesstime int)
 INSERT into #test(pendingcmds,estimatedprocesstime)
 exec sp_replmonitorsubscriptionpendingcmds  
 @publisher ='PUBSrv',
 @publisher_db = 'Repl_Test',
 @publication ='Repl_Test',
 @subscriber ='SubSrv',
 @subscriber_db ='Repl_Subc',
 @subscription_type ='1' --0 for push and 1 for pull

Thanks,


Thanks, Satish Kumar. Please mark as this post as answered if my anser helps you to resolves your issue :)

SQL Replication : What type to use

0
0

Hello all,

We have a requirement to set up a new sql server (2014) and have the data from that one available to another sql server (2014). Both are geographically apart but will have a 8Mbits connection between them.

Primary SQL will have more or less 10-15 GB of daily data with a lot of transactions taking place. We need to have those data replicated to the other database. We are wondering if replication is the correct way to go and if yes what kind of replication to use. The secondary database will be used only for quering and reporting purposes where the primary one will hold all the transactions. 

Can anyone offer any insight on this? 

Viewing all 4054 articles
Browse latest View live




Latest Images