Are you the publisher? Claim or contact us about this channel


Embed this content in your HTML

Search

Report adult content:

click to rate:

Account: (login)

More Channels


Showcase


Channel Catalog


Channel Description:

Discussions on SQL Server Replication

older | 1 | .... | 170 | 171 | (Page 172) | 173 | 174 | .... | 181 | newer

    0 0

    We are haing issues while adding article on existing subscription.

    The replication is setup with Initialize from backup=true.

    Below is the command I tired to use aftet transfering the rows thru export import wizard but the table on the subscriber isnt refreshing.

    exec sp_addarticle @publication = N'marcus8rpl' , @article = N'appnames' , @source_owner = N'dbo' , @source_object = N'appnames' , @type = N'logbased' , @description = null , @creation_script = null , @pre_creation_cmd = N'NONE' , @identityrangemanagementoption = N'manual' , @destination_table = N'appnames' , @destination_owner = N'dbo' , @vertical_partition = N'false' , @ins_cmd = N'CALL sp_MSins_dboappnames' , @del_cmd = N'CALL sp_MSdel_dboappnames' , @upd_cmd = N'CALL sp_MSupd_dboappnames'


    0 0

    When I tried to add the distributor via the Wizard I got this error suggesting it already existed and I should remove it first.  When I tried to run the prod to Drop it it said: The Distributor is not installed.   I tried manually and got the same results.  Any ideas?  Anything special in Azure VMs I saw a hint at configuring a listener in the configuration manager .

    SQL Server could not configure 'SQ LOS as a Distributor

    The server '(null)' is already defined as a Distributor To reconfigure the server as a Distributor you

    must first uninstall the exjsiting Distributor use the stored procedure sp dropdisthbutor. or use the

    Disable Publishing and Distribution Wizard

    Changed database to 'master' (Microsoft SQL Server Emor 14099) 

    sp_adddistributor @@servername 
    GO 
    --Msg 14099, Level 16, State 1, Procedure sp_adddistributor, Line 109 [Batch Start Line 6]
    --The server '(null)' is already defined as a Distributor. To reconfigure the server as a Distributor, you must first uninstall the exisiting Distributor. Use the stored procedure sp_dropdistributor, or use the Disable Publishing and Distribution Wizard.

    exec master..sp_dropdistributor @no_checks = 1, @ignore_distributor = 1

    --Msg 21043, Level 16, State 1, Procedure sp_dropdistributor, Line 50 [Batch Start Line 11]
    --The Distributor is not installed.

    sp_adddistributiondb 'distribution'
    GO
     
    --Msg 14114, Level 16, State 1, Procedure sp_adddistributiondb, Line 169 [Batch Start Line 16]
    --The server 'SQL05' is not configured as a Distributor.

    Thanks

    ...Ray


    ...Ray


    0 0

    I need to understand the proper process for changing the CDC captured columns without losing history.  I have searched many places and found many different responses.

    I am working with SQL Server 2016 SP1 (Standard) which according to MS does support CDC as of 2016 SP1.

    I need to change the captured columns list without losing historical information in the capture tables.  Please tell me the correct procedure for changing the captured columns list without losing history.

    Thanks in Advance


    0 0

    Hello,

    I have databases with merge replication in SQL 2014 enterprise. Whenever I restore the replicated databases, both the publication & subscription is getting dropped. How can I restore the databases without causing any replication issues? Thanks.


    sqldev


    0 0

    Don't know how this occurred but there are one or more active save points preventing me from setting up a database for replication with the error "Cannot promote the transaction to a distributed transaction because there is an active save point in this transaction".

    Is there a mechanism whereby I can clear any and all active save points or at least get a list of them so I can pick them off one by one?  TIA

    0 0

    Hello, I am in the process of migrating off an old SQL 2000 system and I have done some compares of the objects in the newer system which is 2008 R2 and I am finding some, not all of the sp_MS insert update and delete procs on the subscriber have the SET ANSI_NULLS OFF on my test system (subscriber which is 2008 r2 in test) where as on the production (again subscriber is 2008 r2) there is no ANSI_NULL setting when you script out the procs. I am using Red-Gate SQL Compare to verify the differences. Any insight appreciated.

    0 0

    Dear All,

    The Repl-LogReader job is currently blocking distribution cleanup job sql; would there be a way of resolving the issue without restarting the service please?

    Thank you in advance!


    0 0


    Question regarding the ansi null setting in insert/update/delete stored procedures on subscribers in transcactional replication. I am testing an upgrade from an old sql 2000 distributor to a 2008 distributor and I am finding some of the insert/update/delete procs generated on the subscribers differ in their ansi nulls settings. In both of the environments, the subscribers are 2008 and the publishers are 2000. The difference in the environments is the distributor. 

    In produciton, some of the publisher tables have ansi nulls off and some have it set on. When the publisher has ansi nulls on and the subscriber has ansi nulls on the IUD procs are consistent and have ansi nulls set on when you compare the procs in my upgrade environment to production. When the publisher has ansi nulls off and the subscriber has ansi nulls on there are inconsitencies where in the upgrade enviornment the IUD procs have ansi nulls off in my upgrade environment and ansi nulls are on in the procs on production.  I had thought these settings were created based on the publisher tables. My question is where does this setting come from for the procedures  and why would the production subscribers procs have the ansi null setting on and in my upgrade enviornment it is off?

    0 0
  • 06/22/18--16:50: Replication SQL Server 2014
  • Hello, I am trying to perform a mix replication between 2 servers with SQL Server 2014 ..

    I have already configured the Distribucion y publicador, but at the moment I want to add a subscriber I get an error.

    "SQL Server replication requires that the real name of the server establish a connection to the server, specify the real name of the server, SVR-2. (Replication.Utilities)"


    Any idea what I can do to solve it?

    Thank you.

    0 0

    I have a publisher with around 15 subscribers and every now and then, one of the subscribers drops out of replication with the above error - in the replication manager it says something like:

    9 retention period units have passed since the last sync for this subscriber. If this value is less than the retention value 14, the last sync was done within the retention period and SQL Server should not have raised this error. A false error indicates a Replication infrastructure problem.

    Note that the number of retention period is less than the retention value so it does point to a replication infrastructure problem but my question is, how do I find out what the issue is?

    Re-initialising gets everything back up and running which is great but ideally I'd like to stop it from happening in the first place.  I've searched through the docs and all I can find is references to "update to 2008 SP___" but I'm on SQL Server 2014 so I don't think this applies!

    Any help would be greatly appreciated.


    0 0

    The 'Distribution clean up: distribution' job has been set to run every 10 minutes but lately, it seems to run continuously. The things I have looked at so far are:

    1. If the 'Transaction retention' is set the same as whats on the script on the job e.g. EXEC dbo.sp_MSdistribution_cleanup @min_distretention = 0, @max_distretention = 72

    2. The size of the [dbo].[MSrepl_commands] table, which understandably is growing as a result of the job not completing

    Is there anything which could be done to resolve this issue?

    Thank you in advance!


    0 0

    Hello replication experts,

    Can someone please explain, How do I check in msrepl_transactions and msrepl_commands tables to see if my transaction/command got successfully replicated or not to subscriber? 

    The reason to ask this question is, I have a msrepl_transactions table with 276980560 records and the distribution clean-up is not removing those records for some reason. The issue is only with msrepl_transactions table. The clean-up for msrepl_commands is working fine. It has only 23000 records. So trying to understand why it is behaving like this. My SQL Server version on publisher, distributor and subscriber is Enterprise Edition(12.0.4100.1).

    How do I troubleshoot this? Any help would greatly be appreciated.


    0 0
  • 06/27/18--01:24: Sql Server 2012 issue
  • i installed sql server 2012 on a server having windows 2012 R2 Standard the issue which i am facing is after the installation it works for 20 to 30 minutes properly and then starts giving error xprepl.dll is not loading while when i restart it works again peroprly for 20 to 30 minutes and then again same error occurs ...what is the problem  ???

    0 0

    I have a SQL database that is accessed via ODBC from an application.

    After applying Merge Replication (which adds a rowguid column) some of the queries from the application via ODBC are failing.

    The queries are basically "select * from table where column = 'abc'". The query actually executes without error but the error "4149 [Microsoft][ODBC Driver Manager] Program type out of range" occurs when the it attempts to access the first row of the query result. I have obtained the query text from a debug log and it returns at least one a row in SSMS.

    I have seen a similar issues with select into queries that use select *, due to the addition of the rowguid column. The fix was to change the select statement to use specifically named columns. Could something similar be happening in ODBC (sqlclient11 by the way).


    R Campbell




    0 0

    We have 103 publications. We have a DR solution where the Prod DR needs to replicate to DW DR. I copied the script to create the replication and related objects and was successful to set the replication. Now the snapshot agents need to be started. They do not start all in one go. I have to wait hours and manually start each one after a previous one is complete. 

    I tried to create a script using waitfor delay, but it too is cranking. 

    Is there a easy way to get all the agents to start and sync all at once. 


    0 0

    Hello, 

    I'm maintaining a merge replication with the publisher MS SQL Server 2008 R2 and the subscriber SQL Server CE 3.5 installed the PDA through web synchronization. I am really lost on the problem on the subscription expiration. 



    As the document SQL server said, in case of the subscription expired after the retention period passed, the subscription will be deactivated, however we can reinitialize the subscription to avoid the subscription dropped by the Expired subscription clean up job. (https://docs.microsoft.com/en-us/previous-versions/sql/sql-server-2008-r2/ms151188%28v%3dsql.105%29)



    So I wanted to reinitialize after passing the retention period, but the synchronization doesn't work with these errors messages :

     - On the publisher side : The snapshot for this publication has become obsolete. The snapshot agent needs to be run again before the subscription can be synchronized.

    - On the subscriber side : A call to SQL Server Reconciler failed. Try to resynchronize. SQL CODE 29006



    I've got to know that after regenerate the snapshot, the synchronization works well. But it is not the goal to generate manually whenever it happens. So I wonder 

    - Why the snapshot always become obsolete after the expiration of subscription? Even though there is no change on the schema but only on the data. 

    - Is there a way to run the regeneration of snapshot before synchronization on C# sqlSeverCE?

    - On the current status, the generationg snapshot runs every 2 weeks, if i run it every days at 5am, it will create too much metadata?

    Thanks,



    0 0

    In our AlwayOn environment I have two SQL servers 2012 Ent.edition (SERVER A, and SERVER B). I setup a transaction replication for [database A ], pointing to listener which shouldn't cause any issue if a failover happened. Tested, worked just fine after a failover, but when I shut off one of the servers in AOAG ,in test environment, replication stops working. There is no error on the replication monitor. For testing purpose,I have inserted few records on the database it works fine on AOAG, but on the Subscriber the data modification is not replicated until I bring up the other server. Once the server is up, then the replication start to work. I'm pretty sure, I might be missing something, this can't be this way by design.

    Any Idea/recommendation ?

    Here is what I have for Replication on AOAG.

    Distribution Server A ( contains Distribution database ) - SQLSERVER 2012 This on a remote server.
    two subscribers - Sv1 and sv2 - SQLSERVER 2012 Enterprise
    Publishers ( SERVER A and B - from AOAG ) - SQLSERVER 2012


    0 0

    Reading the MSDN documentation for transactional replication statement delivery it notes " by default, transactional replication propagates changes to subscribers through a set of stored procedures that are installed on each subscriber". I have tried to find reasons to use this approach rather than the SQL option which just replicates the sql commands but have not found any clear benefits to using the proc's rather than the straight SQL commands. I understand the ability to customize the I/U/D changes at the subscriber in the procedures but outside of that if there are no performance benefits, it seems to only add a large number of stored procedures to each subscriber. 

    I would also like to know if anyone by chance knows if the default changed somewhere along the way as SQL has progressed through versions. I see that the default for non-sql subscribers is the SQL commands and wondered if this is how it was in SQL Server at some point.

    Thanks



    0 0

    I am working with setting up Replication Publishers in AlwaysOn Availability Groups, and after running sp_redirect_publisher, there is a new stored procedure in SQL 2012 called sys.sp_validate_replica_hosts_as_publishers that validates your configuration is correct.  Occording to BOL this procedure creates a temporary linked server to the nodes in the Availability Group and validates they are suitable for handling replication and uses the windows credentials of who is currently logged in.  I am logged in as a windows account that is both domain admin as well as SQL sysadmin on all my instances but keep getting an error when running this procedure.

    Here is the code I am running from the distributor

    declare @redirected_publisher sysname
    exec sys.sp_validate_replica_hosts_as_publishers 
         @original_publisher = 'SQL1', 
         @publisher_db = 'TestPub', 
         @redirected_publisher = @redirected_publisher output
    select @redirected_publisher

    I am getting the following error.  I am running SQL 2012 SP1 and am wondering is I am missing some sort of security configuration or if this is a bug that needs to be filed

    Msg 21892, Level 16, State 1, Procedure sp_hadr_validate_replica_hosts_as_publishers, Line 60
    Unable to query sys.availability_replicas at the availability group primary associated with virtual network name 'CHAD-PUB-AGList' for the server names of the member replicas: error = 18456, error message = Error 18456, Level 14, State 1, Message: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'..',



    Convert DTS to SSIS | Document SSIS | 30+ SSIS Tasks | Real-time SSIS Monitoring | Quick Starts | BI Blitz


    0 0

    Hi, I am trying to set up replication using SQL Server 2017 Developer edition. The publisher, distributor, and subscriber are all local. I have been (faithfully) following the tutorial here: 

    https://docs.microsoft.com/en-us/sql/relational-databases/replication/tutorial-replicating-data-between-continuously-connected-servers?view=sql-server-2017

    In the section "Configure the publisher for transactional replication" after completing step 13 and clicking "Finish",which should create the initial snapshot for replication, the New Publication Wizard reports there was an Error Creating Publication 'AdvWorksProductTrans'. The message is clickable and launches a dialog that reads as follows:

    --------------------------------------------------------------------------------------------------------------------------------------------

    SQL Server could not create publication 'AdvWorksProductTrans'.

    Additional information:

    -> An exception occurred while executing a Transact-SQL statement or batch.

        (Microsoft.SqlServer.ConnectionInfo)

        -> The current transaction cannot be committed and cannot support operations that write to the log file. Roll back the transaction.

             The current transaction cannot be committed and cannot be rolled back to a savepoint. Roll back the entire transaction.

             Changed database context to 'AdventureWorks2012'. (Microsoft SQL Server, Error: 50000)

    --------------------------------------------------------------------------------------------------------------------------------------------

    Any help will be greatly appreciated. Thanks!




older | 1 | .... | 170 | 171 | (Page 172) | 173 | 174 | .... | 181 | newer