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 | .... | 141 | 142 | (Page 143) | 144 | 145 | .... | 181 | newer

    0 0

    Hi,

    So, merge replication does not work for me. Too many deadlock

    updatable transact does not work either at the moment as I end up with being unable to update at the subscriber and it would be a poor choice as changes will be 50/50 between subscriber and publisher. (http://sqlblog.com/blogs/hilary_cotter/archive/2011/10/28/implementing-bi-directional-transactional-replication.aspx)

    So, am trying to setup bidirectional, and I end up with:

    There already exists a 'first' trigger for 'update'

    Also, the stored procedures for insert, update, delete are generated even though I have remove 0x02 from the schema_options (but then again, my English might be mis interpreting the description of the flag)

    Here is what I use to setup the publisher:

    use [DB]
    exec sp_addpublication @publication = N'DB_TRANSAC_DO', @description = N'Transactional publication of database ''DB'' from Publisher ''DO''.', @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'false', @immediate_sync = N'false', @allow_sync_tran = N'true', @allow_queued_tran = N'true', @allow_dts = N'false', @replicate_ddl = 1, @allow_initialize_from_backup = N'false', @enabled_for_p2p = N'false', @enabled_for_het_sub = N'false'
    GO
    
    exec sp_addpublication_snapshot @publication = N'DB_TRANSAC_DO', @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'user', @job_password = 'pass', @publisher_security_mode = 1
    
    use [DB]
    exec sp_addarticle @publication = N'DB_TRANSAC_DO', @article = N'document', @source_owner = N'dbo', @source_object = N'document', @type = N'logbased', @description = null, @creation_script = null, @pre_creation_cmd = N'none', @schema_option = 0x0000000008035F9D, @identityrangemanagementoption = N'manual', @destination_table = N'document', @destination_owner = N'dbo', @vertical_partition = N'false'
    GO
    
    

    What did I miss ?

    Thanks

    EDIT:

    If I create the transactional replication on one server, setup the publisher and subscriber and then try to create the publication on the second server sp_addarticle throws:

    Msg 15130, Level 16, State 1, Procedure sp_settriggerorder, Line 173

    There already exists a 'first' trigger for 'update'.



    0 0

    Can I have some help with snapshot agent not being able to create snapshot. Is there any limitation in number for publications or replication jobs?

    0 0

    Can anyone shed any light on the duration column in msmerge_articlehisatory ?

    This is allegedly the 'length of time that the agent processed an article, in seconds' , but it doesn't seem to bear much relation to the time as evidenced by the output from sp_replmonitorhelpmergesessiondetail - what exactly does it represent and is it good for any monitoring purposes ?

    Thanks ! 


    0 0

    Hello All,

    We have implemented SQL-Server 2012 R2 for our website. It contains 50 million records. Initially website performance was slow which we schedule daily job to rebuild index in the night time
    which increases the website prformance. The solution worked for us.

    Now the problem starts when try to intiate the log shipping for which we have to take take the logs backup to ship to the DR website. But after the rebuild index and update statistics the logs back-up comes around
    250 GB or 100 GB.

    Note : We have not shrink the database or log file in any activity.

    Please help to resolve this situation as log shipping of 250 GB is very difficult.


    Navdeep Madan
    http://navdeep19.wordpress.com


    0 0

    Hi all,
    I'm try to understand how implement a transitional replication between 2 different network.
    I've create a Publication on SERVER A (type transitional) with  FTP activation.

    I don't understand if is possible, for the subscriber, get updates via FTP or this way in only for the initial snapshot data.

    Please someone can give a clearly feedback or some useful link.

    Thanks ALEN, Italy


    0 0
  • 10/29/15--09:33: Why bother with Peer 2 Peer?
  • Greetings. Over the last couple days I've read various articles on "Merge vs Peer 2 Peer" replication, etc. I just did some testing on Merge replication with one Publisher and two Subscribers. I was thinking that an update at one Subscriber would NOT make it to the other Subscriber, and that was where P2P would be useful. However, my testing just debunked that for me. I created both Subscriptions with the Server type, and data updated at any location makes it to the other two servers. That said, how would P2P ever be advantageous over Merge? I realize that Merge will only replicate the final changes, and Transactional will replicate all of them. I can only think of one extremely unique circumstance where that would be useful (not that there aren't others of course). P2P also requires it's own Distribution DB, so I suppose that could be counted as either a negative or positive. Also, if "continuous" is selected as the subscription type for Merge, the latency probably isn't any higher than in P2P.

    Overall, just really trying to understand why I'd ever use P2P over Merge?


    Thanks in advance! ChrisRDBA


    0 0
  • 03/08/10--06:14: Reserved Column Names ?
  • I am attempting to define a Transactional Publication with Updateable Subscriptions. One of the articles in the definition has a column called "insertDate"

    The attempt fails with

    "A .NET Framework error occurred during execution of user-defined routine or aggregate "sp_MSmakeconflicttable_sqlclr"
    System.Data.SqlClient.SqlException: Column names in each table must be unique. Column name insertdata in table 'conflict_<PublicationName>_<TableName>' is specified more than once

    Does sp_MSmakeconflicttable_sqlclr attempt to create a derived table with this additional column.

    Must I rename my column.

    Are there any other names I should watch out for (other than the standard reserved keywords)

    Regards

    Henrietta

    0 0
  • 11/02/15--11:02: Security Error
  • I have security error No codes warns me not to shut down or restart I don't no what this is and at the bottom it gives me Cynest Technologies.com

     

    0 0

    Hi Everybody,

    I am testing a two case scenarios to get myself confident at sql replication topology especially with retention periods used by Distribution Agent clean up job. From MSDN forums and books online, I came to know that the parameter "immediate_sync" plays key role in this clean up process. And to better optimize the SQL replication in terms of size and volume, we should take a close look at this job. So moving on, here are my results.

    Note: The tables I'm referring below are MSrepl_commands and Msrepl_Transactions

    Test 1 with below settings:

    Immediate Sync = 0 (False)

    Min_distretention = 1

    Max_distretention = 24

    Observations:

    1) Created a Publication and Subscription with independent agent 

    2) Inserted some values in the article

    3) Checking Clean up Job every 10 min - ALL replicated Commands/ Transactions are being deleted EVEN the min_distretention is 1 Hour. This is a expected behavior because I set immediate_sync to FALSE.

    4) Later added NEW subscription and synced 

    5) Manually DISABLED dist agent for this subscription ( TESTING PURPOSE )

    6) Clean up JOB - NO commands/transactions are deleted UNTIL they have reached max_distretention 24 hr. 

    7) REINT second SUB and synced

    8) -- THIS IS THE PART I'M CONFUSED -- : In Subsequent runs Clean up Job is not deleting the rows that were replicated to Subscriber. Instead It is deleting the commands which are older than min_retention 1 hr. IS IT NORMAL BEHAVIOR ?

    I thought if parameter IMMEDIATE_SYNC set to FALSE, transactions will be purged at every Clean up run.  Am I missing anything?

    Thanks in advance.


    Harsha


    0 0

    Hello everybody,

    I have setup a snapshot replication between two servers : the Publisher is a SQL Server 2012 server and the Subscriber is a SQL Server 2008 R2 server. The replication is basic : no filter, Replicate schema changes = Yes.

    The snapshot is done every night. It runs for more than one year.

    Over the past year, I had twice the error :

    Replication-Replication Distribution Subsystem: agent PublishDataOnERP-3 failed. The process could not bulk copy into table '"dbo"."Product"'.

    I don’t see any detail in the distribution agent job history about the error.

    If I start the Snapshot agent again the day after, it works.

    The real problem is the impact of that error : on the Subscriber database, the tables are left empty.

    The Products and other replicated tables are used to update our corporate website.

    As the tables are empty, the website loses nearly all its data. This is a major issue for me.

    My question is : how to prevent it? As anyone seen that problem?

    I checked the articles option "Action if name is in use" : it’s set with default value “drop existing object and create a new one”.

    I would have expected that the whole Replication process is done in a single transaction to be able to rollback to previous state (before Replication starts) if it fails.

    But as the option is “drop existing object and create a new one”, I suppose that no rollback can restore the table before it was dropped.

    If I change the option to “truncate all data in the existing object”, a rollback of the entire process seems possible, but is it the way it would work?

    I don’t see a way to test it, as I don’t manage to reproduce the problem.

    Thank you in advance for your advice.


    0 0

    I have dedicated distribution server and my publisher and subscriber are in AG.

    1. Is it possible to set up the SQL Cluster for distribution server
    2. Can we set up the two node SQL Cluster with both nodes in different datacenter but in same domain?

    Rahul


    0 0

    TITLE: View Synchronization Status
    ------------------------------

    SQL Server is unable to complete the operation.

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=11.0.3000.0&EvtSrc=Microsoft.SqlServer.Management.UI.SubscriptionSyncErrorSR&EvtID=CantComplete&LinkId=20476

    ------------------------------
    ADDITIONAL INFORMATION:

    An error occurred while attempting to access the subscription. (View Synchronization Status)

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

    To synchronize, you must first create an agent job for this subscription.  (View Synchronization Status)

    ------------------------------
    BUTTONS:

    OK
    ------------------------------


    Thanks


    0 0

    After I watch a video for how to create MS SQL Replication, I configure distribution and create the publication. The problem comes from subscription. If I create a "PUSH" subscription, it works fine. However, when I create a "PULL" subscription, I got the following error. I just wonder if anyone know where I should look for solution for this error. Many thanks. 


    0 0

    I have a database with replication (Transaction and Snapshot). I wants to bring my Publisher DB into Single user mode for some DBCC Consistency repair. Now my questions are:

    1- Will it allowed me to put that DB into Single user mode?
    2- Would there be any impact on Single user mode due to log reader agent? 

     

    0 0
  • 03/31/11--09:17: Unable to Drop Subscription
  • Hi All,

    This is the error message please explain me how to solve this issue,

    'XXXXX\SQLExpress' is not defined as a Subscriber for 'PUBLISHERNAME'.
    The subscription could not be dropped at this time.
    Changed database context to 'DATABASENAME'. (.Net SqlClient Data Provider)

    And also


    TITLE: Microsoft SQL Server Management Studio
    ------------------------------

    Could not delete the subscription at Subscriber 'XXXXXX\SQLExpress' in database XXXXXX'.

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600.1&EvtSrc=Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.Replication.ReplicationMenuItem&EvtID=CantDeleteSubscriptionAt&LinkId=20476

    ------------------------------
    ADDITIONAL INFORMATION:

    An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

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

    'XXXXXXX\SQLExpress' is not defined as a Subscriber for 'XXXXXXXX'.
    The subscription could not be dropped at this time.
    Changed database context to 'XXXXXXX'. (Microsoft SQL Server, Error: 20032)

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.00.2531&EvtSrc=MSSQLServer&EvtID=20032&LinkId=20476

    ------------------------------
    BUTTONS:

    OK
    ------------------------------

     

    When i try to remove the subscription from Publisher

    TITLE: Microsoft SQL Server Management Studio
    ------------------------------

    Could not delete the subscription at Subscriber 'XXXXX\SQLExpress' in database 'XXXXX'. The subscription record does not exist at Subscriber.

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600.1&EvtSrc=Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.Replication.ReplicationMenuItem&EvtID=CantDeleteSubscriptionAtSubscriber&LinkId=20476

    ------------------------------
    BUTTONS:

    OK
    ------------------------------

    XXXXX\SQLExpress' is not defined as a Subscriber for 'DBNAME'.
    The subscription could not be dropped at this time.
    Changed database context to 'DBNAME'. (.Net SqlClient Data Provider)

    when i run the delete prorcedure manually

    I ran this query :

    exec

    sp_dropmergesubscription@publication=N'CatalogPublication', @subscriber =N'XXXXXX\SQLExpress', @subscriber_db =

    N'XXXXXXX'

    GO

    Error Occured:

    Msg 20032, Level 16, State 1, Procedure sp_MSdrop_merge_subscription, Line 72

    'XXXX\SQLExpress' is not defined as a Subscriber for 'XXXXXXX'.

    Msg 14056, Level 16, State 1, Procedure sp_dropmergesubscription, Line 482

    The subscription could not be dropped at this time.

    PLease suggest me what to do...

    PLease consider this a urgent issue.

    Regards

    JAK

     

     I have changed the database names due to security reasons. But the content not changed.


    Regards Jak

    0 0

    I need to setup subscriber again without overwrite the target database and its simple push transactional replication in sql server 2008


    Thanks


    0 0

    Good afternoon,

    I'm having a bit of trouble with CDC.

    We are using CDC to transfer the net data change from server to server, but have come across an issue with a particular table.  The users perform an insert into our Source table which consists of a bit of text (stored as varchar(500) and an image stored in a text column).  Upon pressing Submit they receive an error.  I was able to use profiler to pull out the error message below:


    Length of LOB data (133928) to be replicated exceeds configured maximum 65536.

    So, obviously this is an issue with the Max Text Size for Repl (B) setting in SQL Server.  

    We didnt want to change the default setting, so instead looked through the columns and found what we thought was the offending column (the text column which is used to store a photo).

    So, we recreated the CDC on that table, and omitted the "text" column from the capture.  (leaving only the data we actually want, a max data size of around 1600B if all columns were filled)

    We ran the test again and go the exact same error.  

    Why would we be getting this error if we are no longer capturing the DocumentBody column?

    Is the only solution to increase the Max Text Size for Repl value?

    Regards,

    Andy


    0 0
  • 11/09/15--12:25: One publisher 2 subscribers
  • Hello,

    Is it possible to replicate data from one publishers to a multiple subscribers in transaction replication? In other words I have Server A, Server B, Server C with databases A,B,C respectively. I need to replicate 10 articles from A to B but only 1 from A to C. In other words I want to use the same publisher but select one article from that publisher instead of all 10 to Server C/database C.

    If it is possible what will be the drawbacks of such implementation? Will performance be a hit?

    Thanks


    0 0

    Hello all,

    Do we have any confirmation from Microsoft that the article limit for merge replication is still 256? I've seen numerous posting that people are running with 400-700+ articles and not having any problems.  Just looking for actual confirmation that this is supported from Microsoft and they just haven't corrected the documentation to reflect a higher limit in newer versions of SQL server.

    Thanks, Brandon


    0 0

    SQL2008R2 Enterprise - Transaction Replication

    I setup verbose profiles for both LogReader & Distribution agents. both agents are reporting their statistics "Since Last Stats". However, only Distribution agent is also reporting statistics "Since Agent Started".

    Is there something that need to be enabled for LogReader to do the same .. i.e. Reporting stats since agent started??

    Thanks


older | 1 | .... | 141 | 142 | (Page 143) | 144 | 145 | .... | 181 | newer