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 | .... | 144 | 145 | (Page 146) | 147 | 148 | .... | 181 | newer

    0 0

    can not connected to subscriber

    0 0
  • 12/28/15--00:58: SQL Server Replication
  • Hello Experts,

     

     

    A customer is in the process of deploying a distributed application across 3 different sites (Sites might/will increase in the near future), this application is required to send incremental data changes/insertion to the  “MAIN site” from just one table in a database at near real time(Many-to-one). A deployment consideration for this will be “AlwaysOn Availability Groups” however, considering the fact that we have 3 different autonomous sites using AOAG might not fit into this scenario.

     What then comes to mind is using SQL Server Merge Replication, however, I haven’t worked with this feature extensively  and my ask is considering the requirement above is SQL Server replication the best fit for this requirement or SSIS would be much better fit?

    Also, the current solution would have 50:50 ration in terms of read/writes activity. We have considered Failover Cluster Instances from an HA perspective. I am thinking this should be changed to AOAG and then read activities should be pushed to a secondary replica, in order to reduce the workload as replication would come into the picture.

    Kindly advise


    R,

     



    0 0

    Hi Guys,

    I have 2 MSSQL 2008 R2 STD servers over 2 Geo locations.

    I have small amount of changes each day in the DB.

    Can I make a full backup once on server1 and copy it to server2. Then copy only the transaction logs without the next full backups?

    Will the transaction logs that are written after the next daily full backup will be able to be restored on server2?

    Like this example:

    Server1 - Full-Backup---TRN1---TRN2---TRN3---TRN4---TRN5---TRN6---TRN7---TRN8---TRN9...TRN10...
    Server2 - Full-Backup---TRN1---TRN2---TRN3---Full-Backup---TRN4---TRN5---TRN6---TRN7---TRN8---TRN9---Full-Backup---TRN10...

    Thanks,

    Michael

     


    0 0

    Hi All,

    Today I am seeing high cpu consumption by logread.exe, I am using below sql edition:

    Microsoft SQL Server 2005 - 9.00.4053.00 (Intel X86)   May 26 2009 14:24:20   Copyright (c) 1988-2005 Microsoft Corporation  Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 2) 

    I am not seeing any latency issue in replication but not sure why logread agent is consuming high cpu, there are two rows of logread.exe in processes under task manger.

    I had seen also some Microsoft link and they pointed that it could be bug but we have already using 9.00.4053.00 version.

    Help if anyone have idea?

    Bobby


    0 0

    when i add an index to a table which is in replication, will i have to reinitialize all subscription to make it available on subscriber table??


    SQL Server DBA


    0 0

    transaction replication runs fine and no error found, however in error log deadlock details are captured. so my question is Would the deadlock have caused the replication to run slower than usual?

    0 0

    I have 2 identically configure SQL 2005 servers running the same version, patch level and collation (SQL_Latin1_General_CP850_CI_AS) and transactional replication is set up between the two with basic default article publication settings and table schemas are identical.  Where I'm encountering an issue, users must be cutting and pasting extended ascii characters like char(255) to represent an empty string into a non-null required notes column.  The transaction replicates to the subscriber, but during the process, replication converts the char(255) value to char(152) ( 'y' with 2 dots above it) on the subscriber and then replication validation check throws an error because the records are no longer the same.

    Where in the process is SQL converting this CHAR(255) character to CHAR(152)? Is there an easy fix to keep these tables in sync with extended ascii characters being passed?


    0 0

    HI

    I have a VPS with public IP '192.xx.xx.xx'. when i installed sql server the sql server default name was the same as my vps let's say it's 'MYVPS' 

    now when i try to connect to sql server i use the public IP '192.xx.xx.xx' as server name and i had no problem with it.

    the problem is when i try to configure a distribution on the sql server i got this message :

    " server is unable to connect to server '192.xx.xx.xx'. ........ Specify the actual server name , 'MYVPS'. (Replication Utilities) "

    So i tried to change sql server name to be similar to my public ip '192.xx.xx.xx'  then i was able to see the configure distribution wizard BUT at the end of the wizard i got the error message :

    " SQL SERVER could not configure '192.xx.xx.xx' as a Distributor. ...... Could not connect to server 'MYVPS' because 'distributor_admin' is not defined as a remote login at the server "

    on a desperate try i create a new user on my vps  computer with the name 'distributor_admin' and a new login with name 'distributor_admin' but nothing changed

    Please help


    0 0

    Hi

    i have a sql server on a server with public ip address , (security don't matter to me it's for learn purposes )

    connection to sql server via ip address is established but replication is not possible because i'm connecting via ip address (i think it's for security)

    is there a way to make this possible??




    0 0

     

    Hi, it is little different to other problemas with the same title.

     

    (SQL2005)

    My problem is that i romoved Replication in the server, but the tables who used to be part of one article, cant be droped or changed. It server was used like source (distribuitor not suscriber and there is other like coordinator)... i search (SSMS) "visually" and I found nothing about replication... my questions is about, what system tables should i look, maybe it wasn't clean with the remove replication and i have to do by my self.

     

    I found this in web from Microsoft http://support.microsoft.com/kb/326352 but it doesn't work... any other advise?

     

    Thanks


    0 0

    We have configured merge replication with synchronization property 'bidirectional'.

     

    I have changed the synchronization property to Download-only to Subscriber, prohibit Subscriber changes and i applied the snapshot again, but the property has not been changed to prohibit Subscriber changes.

    Still it is showing Bidirectional

    Please let me know how to change this property.

     

    Thanks

    venkat



    venkat reddy

    0 0

    Hi

    I will be installing a new database sql 2014 system, which is based on our current 2005 database system.
    The new system will be on a completely new infrastructure when we go live, leaving the current infrastructure available for rollback should we encounter any issues.

    The business requires that a rollback option be available for 2 weeks minimum. Therefore in the event of a disaster scenario we would be required to switch back to the 2005 database system. So the challenge I have is replicating the data upon going live with the 2014 database system.

    I am looking for a way to replicate the data (not necessarily the schema) from the 2014 system to the 2005 system.

    I am not really a fan of SQL Server Replication and my preference is not to use this. My understanding is that this is not an option for us anyway due to the versions being too far apart, and therefore not supported.

    I want to reach out to the community to find out if any tools are available to achieve this type of replication.
    It may be possible for us to implement a schema change freeze if this helps in finding the right solution.

    Please can you advise what options are available to us, if any? Or should we look to develop a bespoke system internally?

    Are you aware of any Microsoft partners that might achieve this for us through a solution already developed?

    Thanks in advance for any advice.

    Joe

    0 0

    Hello Experts,

    Are there any concerns setting up SQL Server Transactional replication with AlwaysOn Availability Groups to replicated data to another SQL Server database located in another site that's not part of the availability group.

    I need a bit of clarity on what happens when a failover occurs from the primary replica where the publishing database was configured to the secondary replica. How would the replication pick up on the secondary replica and how.

    R


    0 0

    Hi Folks,

    Hope you can help... I have a database running on Microsoft SQL Server 2008 R2 (SP1)  that has been happily log shipping to standby (along with a bunch of others) for 5 years. Occasionally a user or developer will screw up and need the primary to be restored from backup at which point I'll disable the log shipping, do the primary restore and then re-enable the log shipping with a full backup. I've never run into any issues before.

    Yesterday I needed to restore a backup from a couple of days previous. When I re-enable the log shipping the database backs up and restores fine, the scheduled backup, copy and restore jobs are created and both the backup and copy jobs work fine. However the tran log restore job is failing. It's skipping old tran log files as expected, then finding one that it verifies, tries to apply, then fails as the tran log is from before this restore. I can manually apply logs from after the restore with no issues, but I can't get the LSrestore/sqllogship.exe job to skip further than this particular old log and start applying logs from the correct point.

    Log msgs:

    "Error: Could not apply log backup file <old log file name> to secondary database <databasename>" 

    "This backup set cannot be applied because it is on a recovery path that is inconsistant with the database." 

    "The log backup file was verified but could not be applied to secondary database <databasename>."

    So far I've tried simply renaming the offending log to move it out of the way but then it fails saying it can't find it.

    I also tried setting the primary database to simple recovery then back to full recovery, followed by dumping the log then running the re-enable/restore again. No joy.

    I've deleted the database at the standby side to remove the history. No joy.

    Does anyone have any ideas? I've hunted high and low for information on where the restore is getting the restore sequence from but either I'm not understanding it or not finding it. Yes, I'm looking through BOL... Everything I'm reading suggests that a full backup/restore ought to start the sequence from the correct point.

    Any help greatly appreciated!

    A bit more info... (I've masked the path/filenames)

    This is the old log it's failing on:

    restore headeronly from disk ='xxxxxx_20160105101505.trn'
    FirstLSN  LastLSN  ChkptLSN DBBkpLSN
    387176000001509900001 387177000000060200001 387176000001503100144 387176000001503100144

    this is the new backup and subsequent logs

    restore headeronly from disk = 'xxxxxx.bak'
    387176000001915300040 387176000001916900001 387176000001915300040 387176000001912700040

    restore headeronly from disk ='xxxxxx_20160106151504.trn'
    387176000001917700001 387176000001917700001 387176000001915300040 387176000001915300040

    restore headeronly from disk ='xxxxxx_20160106153004.trn'
    387176000001917700001 387176000001917700001 387176000001915300040 387176000001915300040

    restore headeronly from disk ='xxxxxx_20160106154504.trn'
    387176000001917700001 387176000001917700001 387176000001915300040 387176000001915300040

    After checkpoint on primary...

    restore headeronly from disk ='xxxxxx_20160106175539.trn'
    387176000001918700001 387176000001921700001 387176000001918700070 387176000001915300040





    0 0

    Hi,

    Since Monday our transact replication is slowing down for some reasons I can4t identify yet. I have eliminated network, disks, cpu, memory. Also the application using that DB is seeing less traffic than in November and December.

    Using verbose lvl 2 on the distributor agent from the source server to the destination server, I get a state 2 and it says that it is slow to write to the subscriber. However If I restart the replication, and as long as there is less than 250k cmd pending, it catches up pretty fast and then a little later on it starts slowing down again.

    Any idea as to where to look for the reason of the slow down ?

    Tanks


    0 0
  • 01/07/16--12:07: Replication issue.
  • Hi Experts,

    I am in a situation where I need to find below:

    1. To document each publication, each subscription to this publication.
    2. Type of replication for these publication, whether it is a pull or push?
    3. frequency of the jobs (if snapshot is scheduled, how often?
    4. Does distribution job run continuously or on what frequency?

    I did google to get publication with their corresponding subscription, I got below query:

    USE Distribution 
    GO 
    --SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED 
    -- Get the publication name based on article 
    SELECT DISTINCT  
    srv.srvname publication_server  
    , a.publisher_db 
    , p.publication publication_name 
     --a.article 
    --a.destination_object 
    , ss.srvname subscription_server 
    , s.subscriber_db 
    , da.name AS distribution_agent_job_name 
    FROM MSArticles a  
    JOIN MSpublications p ON a.publication_id = p.publication_id 
    JOIN MSsubscriptions s ON p.publication_id = s.publication_id 
    JOIN master..sysservers ss ON s.subscriber_id = ss.srvid 
    JOIN master..sysservers srv ON srv.srvid = p.publisher_id 
    JOIN MSdistribution_agents da ON da.publisher_id = p.publisher_id  
         AND da.subscriber_id = s.subscriber_id 
    ORDER BY 1,2,3  

    And to get type of replication I found this query below:

    SELECT
         P.Publication,P.Publication_type,S.Subscriber_ID,S.Update_ModeFROM MSPublications PINNERJOIN MSSubscriptions SON P.Publication_ID = S.Publication_ID

    Now can I get a single query where I can get all the above information what I need, can someone please help me in finding me query.

    Thanks in advance.


    0 0

    I am on sql server version 2008 (10.0.5794) and when I try to add a field to a table, it is not automatically added and propagated to the subscriber.  I have tried the following:

    EXECsp_changepublication@publication='your_publication_name',@property ='allow_anonymous', @value='false' GO

    EXECsp_changepublication@publication='your_publication_name',@property ='immediate_sync', @value='false' GO

    And then running the snapshot agent but it resnaps the entire publication.

    Is there an issue with the version that I am running sql server on with trying to add a field to a table or do I have a corrupt publication?


    0 0

    Hi guys, in advance, I am not a DBA so forgive me if the question it's not gong to be totally clear. Anyway:

    I have several subscription made by a dba, let's say database Seattle, database Athens, database Honolulu. I query all the database every day and it works fine but now I got the impression that the database Honolulu is out of date. I was told that the database should have had only five minutes gap but it does not look in this way. How can I check? I tried using the table in the db but I can't find any data column that can really help me. Is there something I can check db engine side?

    Thanks


    0 0

    Hello All,

    When i am trying to configure Transnational replication for 3TB of database manually i am getting below error message when ever i perform any Alter Table statement after i configure replication.

    Msg 3609, Level 16, State 2, Line 14
    The transaction ended in the trigger. The batch has been aborted

    Steps Followed :

    1. Configure Publication Manually.
    2. Change Subscription to "Initialization from Backup Files".
    3. Perform Full Backup and Subsequent 2 Log backups.
    4. Then run SP_AddSubscription to Initialization from Backup.

    Every thing works fine with out any errors. All Distributor, Log reader agent jobs are created. I get above error message only when i perform any ALTER table statement once replication is set up. My Subscriber is Readonly.

    Surprisingly i get same error message even if run ALTER statement in SUBSCRIBER directly from SSMS.

    I created below SP to generate replication script dynamically.
    CREATE PROC [dbo].[Create_Replication] @Database_Name sysname , @Publication_Name varchar(20) = Null
    AS
    BEGIN
    	--  Declare and Set values to Local variables
    	Declare @DB_Name sysname
    	Declare @Pub_Name varchar(20)
    
    	SET @DB_Name = @Database_Name
    	IF @Publication_Name IS NULL
    		SET @Pub_Name = @DB_Name
    	ELSE
    		SET @Pub_Name = @Publication_Name
    
    	PRINT 'USE ' + @DB_Name
    	PRINT 'GO'
    
    	--Set Publication property to True
    	PRINT 'PRINT ''Set Publication property to True'''
    	Print 'EXEC sp_replicationdboption @dbname = N''' + @DB_Name + ''', @optname = N''publish'', @value = N''true'''
    	PRINT 'GO'
    	PRINT ''
    	-- Add Log Reader Agent
    	PRINT 'PRINT ''Add Log Reader Agent'''
    	PRINT 'EXEC '+ @DB_Name+'.sys.sp_addlogreader_agent @job_login = null, @job_password = null, @publisher_security_mode = 1'
    	PRINT 'GO'
    	PRINT ''
    
    	-- Add Transcational Publication.
    	PRINT 'PRINT ''Add Transcational Publication'''
    	PRINT 'EXEC sp_addpublication @publication = N''' + @DB_Name + '''
    		, @description = N''Transactional publication of database' + @DB_Name + ' from Publisher ' +  @@SERVERNAME +'''
    		, @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
    			, @ftp_login = N''anonymous''
    			, @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''false''
    			, @allow_sync_tran = N''false''
    			, @autogen_sync_procs = N''false''
    			, @allow_queued_tran = N''false''
    			, @allow_dts = N''false''
    			, @replicate_ddl = 1
    			, @allow_initialize_from_backup = N''true''
    			, @enabled_for_p2p = N''false''
    			, @enabled_for_het_sub = N''false'''
    	PRINT 'GO'
    
    	--Add SnapShot Agenet.
    	PRINT 'PRINT ''Add SnapShot Agenet'''
    	PRINT 'exec sp_addpublication_snapshot @publication = N''' + @Pub_Name + '''
    			, @frequency_type = 1
    			, @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 = 0
    			, @active_end_date = 0
    			, @job_login = null
    			, @job_password = null
    			, @publisher_security_mode = 1'
    	PRINT 'GO'
    
    	PRINT 'EXEC sp_grant_publication_access @publication = N''' + @DB_Name + ''', @login = N''distributor_admin'''
    	PRINT 'GO'
    
    	PRINT ''
    	-- Adding Articles
    	Declare @addar nvarchar(max)
    	Declare @Tbl varchar(250)
    	DECLARE tbl_cursor CURSOR FOR
    	Select distinct Name from sys.tables where is_ms_shipped = 0 and name not like 't_properties_%' and OBJECTPROPERTY(OBJECT_ID,'TableHasPrimaryKey') = 1
    
    	OPEN tbl_cursor
    	FETCH NEXT from tbl_cursor into @Tbl
    
    	WHILE @@FETCH_STATUS = 0
    	BEGIN
    	--- Add Articles to Publication.
    	PRINT 'PRINT ''Working on Table ' + @Tbl + ''''
    	PRINT 'USE ' + @DB_Name
    
    	select @addar =  'Exec sp_addarticle @publication = N''QAFORUMJobs''
    		, @article = N''' + t.name + '''
    		, @source_owner = N''' + s.name + '''
    		, @source_object = N'''+ t.name + '''
    		, @type = N''logbased''
    		, @description = N''
    		, @creation_script = N''
    		, @pre_creation_cmd = N''drop''
    		, @schema_option = 0x000000000803509F
    		, @identityrangemanagementoption = N''manual''
    		, @destination_table = N''' + t.name + '''
    		, @destination_owner = N''dbo''
    		, @status = 24
    		, @vertical_partition = N''false''
    		, @ins_cmd = N''CALL [sp_MSins_' + s.name + t.name + ']''
    		, @del_cmd = N''CALL [sp_MSdel_' + s.name +  t.name + ']''
    		, @upd_cmd = N''SCALL [sp_MSupd_' + s.name +  t.name + ']'''
    	from sys.tables as  t   inner join sys.schemas as s on t.schema_id = s.schema_id where t.name = @Tbl
    	 Print @addar
    	 PRINT 'GO'
    	 Print ''
    	 FETCH NEXT from tbl_cursor into @Tbl
    	 END
    
    	 CLOSE tbl_cursor
    	DEALLOCATE tbl_cursor
    END
    
    GO
    2. Subscription creation Script.
    EXEC sp_addsubscription
    @publication = N' ',
    @subscriber = N' ',
    @destination_db = N' ',
    @sync_type = N'initialize with backup',
    @backupdevicetype='Disk',
    @backupdevicename='z:\Backup\log_2.trn',
    @subscription_type = N'push',
    @update_mode = N'read only'



     


    0 0

    Hi

    I have a till that tries to replicate back to main server over a VPN but it runs but no data actually uploads. It keeps getting stuck on a certain table and just keeps repeating it.

    Here is the output from command line:

    2016-01-10 18:19:23.078 Enumerating deletes in all articles
    2016-01-10 18:19:23.187 Enumerating inserts and updates in article 'LayawayHeade
    r'
    2016-01-10 18:19:27.078 Enumerating deletes in all articles
    2016-01-10 18:19:27.218 Enumerating inserts and updates in article 'LayawayHeade
    r'

    2016-01-10 18:19:31.062 Enumerating deletes in all articles

    Any ideas why it keeps doing this?

    Thanks,

    Mark


older | 1 | .... | 144 | 145 | (Page 146) | 147 | 148 | .... | 181 | newer