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

Setting up Replication on a database that is part of an AlwaysOn Availability Group

$
0
0

We have 2 SQL Servers in an AlwaysOn Availability Group - SRV1 and SRV2

We want to replicate some tables to another SQL machine - SRV4

Replication must work in the event of a failover or if any of the machines (SRV1 or SRV2) goes down.

I followed this blog post: https://blogs.msdn.microsoft.com/alwaysonpro/2014/01/30/setting-up-replication-on-a-database-that-is-part-of-an-alwayson-availability-group/

SRV1 is the Original Publisher

When SRV1 is primary and manual failover to SRV2 is performed, the data is replicated to SRV4. If failover back to SRV1 is performed, data is stil replicated. This works as expected.

If SRV1 is primary and SRV2 is turned off, data is replicated to SRV4 (I had to set Trace flag 1448 to true for this; see https://msdn.microsoft.com/en-us/library/hh403414%28v=sql.110%29.aspx?f=255&MSPPError=-2147217396)

However, if SRV1 is turned off, data isn't replicated to SRV4 anymore (yes, I ran steps 5 and 6 from the tutorial to Redirect the Original Publisher to the AG Listener Name)

Other people are reporting the same issue in the comments - if the Original publisher is turned off, replication stops.

My questions is this: is there any way in which the Replication / AlwaysOn Availability can be set up so that replication continues to work after the Original publisher is turned off?

Regards,

Lucian


SQL Server 2012 SP3 Replication components wrong version

$
0
0

Due to several issues with merge replication between SQL Compact 3.5 SP2 subscribers on Windows Mobile Pro 6.5.3 and SQL Server 2012 SP3
I found that some SQL Server 2012 Database Services Core Shared files included on SQL Server 2012 Standard Edition with Service Pack 3 (x64) - DVD (English)
are RTM version 11.0.2100 (like mergetxt.dll, Replagnt.dll ...).
Some of them were correctly updated in 11.0.5655.0 version with Cumulative Update Package 13 for Microsoft SQL Server 2012 Service Pack 2 (SP2) version but not
the file "Microsoft.SqlServer.Replication.BusinessLogicSupport" (the last known version is 11.0.5655.0 with Cumulative Update Package 13 for Microsoft SQL Server 2012 Service Pack 2 (SP2)).
How can I get and upgrade the right version of this file ?

Cannot view the Subscription created. Cannot add the new one as I get 'This Subscription Already exsit'

$
0
0

Hi Experts,

I am stuck with an issue.

I just have created a new subscription. Once I created, I could see the agent job created but not the subscription in the subscription folder. I checked on both subscriber end and distributor end but could not see the subscriber.

When I proceed to the create a new subscriber I could not as  I get the message saying 'This subscriber already exists'.

Can anyone please suggest how I can view the subscribers using the transact sql or any other approach.

How I can delete the new subscription?

Thanks in advance.

Regards,

Shyam.

Creating a Replication Conflict manager for our clients.

$
0
0

I work with a decent size SQL Server footprint with an ever increasing set of customers that are using replication.  After looking at some conflicts that our clients are having with their replication topologies, my coworker asked me if there was a "simple" way for us to offer a "conflict resolution" handler that could be used as a "service" for our growing list of customers that use the varying types of replication models.

I found out about the "business logic handler" and the "COM-based custom resolver" on Microsoft's website and read a few blogs.  I'm not a C# expert, I dabble, but I'm certainly no expert.  I'm pretty decent with PowerShell, and its fair to say that the rest of my SQL team is similarly capable. 

So... My question is about feasibility and skillset. 

1. For a C# expert, what is the level of difficulty/amount of time to create your own handler based on the existing .NET documentation on Microsoft's websites, and some blogs? 

2. For a DBA of our skillset, what is the level of difficulty/amount of time to create your own handler based on the existing .NET documentation on Microsoft's websites, and some blogs?

3.  Are the SQL Server Stored procedure options full featured, or are the C# the better alternative?

4. How feasible is it to "hand off" these handlers to a non DBA team set of customers?

Thanks for your consideration,

Keith

Delivering replicated transactions - Replication seems stuck

$
0
0

Hi,

We are trying to set up replication for a very big partitioned table on SQL Server 2012. It was not possible to initialize the replication from backup so had to follow snapshot option.  Concurrent snapshot was generated and same was delivered on subscriber but after that replication monitor shows 'Delivering Replicated Transactions' from last three days. 

Checked further and found concerned SPID was executing beiow stored procedure, please note appcrm is the schema and callDetails_new is the table on subscriber. On further investigation, SPID was executing multiple threads and prominent wait was CXPACKET Wait and I could see logical read count was increasing continuously. 

[dbo].[sp_MSins_appcrmCallDetail_New_msrepl_ccs]

Looked at execution plan for SP and found estimated number of row to be "1" and missing index details - it was non-clustered index that I had disabled so to fasten non-SELECT DML operations. This is first time we are trying to set up replication for such big table and our hands are tied to go with our options - please let us know if you got a clue on this. As expected, post bulk loading the table , Primary key was created - will it help not to have PK on subscriber during set up ? Shall we update the stats for concerned table on subscriber ? Are their any specific guidelines for replication set up for big tables?

Appreciate your help. Thank you ! 

Replication between remote sites

$
0
0

Greetings,

We have a 2 TB Database operating in a site and we are opening another site overseas will use the same database over there

Should we run a replication between the sites ? or is it better to have one source for this database ?

How long replication should take to replicate the data over there for them to start working ? putting into consideration that the speed between the sites is not that good

SQL Server Database Migration

$
0
0

We have a project where we have to migrate our SQL Server to a new, remote SQL Server. We have been purchased by another organization and we need to move our SQL Server and data and objects from our site to the new site. And it is across the country.

Has anyone ever done anything like this before? Perhaps there are some central tools and repository available that would allow us to turn off at our site, load the SQL Server on the West Coast with our data and objects, and over a weekend of time. This is a large migration...millions and millions of rows. So we need quick access speed in order to extract and load. It would have to be done over a weekend in order not to disrupt the business and be as transparent as possible. And we deal with dozens of third parties that rely on our data extracts for data.

I'm sorry if this is not in the correct forum. And I appreciate your review and am hopeful for a reply.

Transactional Replication SQL2012

$
0
0

I have an issue with data getting replicated wrongly through transactional replication set up on databases in high availability group on SQL Server 2012,SP3,CU3. I have multiple publications set up on the databases as transactional replication and the subscriptions are pull subscription on another server.The distributor is also set up separately. I am finding data for a database in another database entirely. I have  scripted out the publications and subscriptions and they are pointed correctly to the databases involved. This looks like data bleed  and i need possible causes and solutions even though the set up looks correct to me.

Thanks


How to Restore a corrupted backup file

$
0
0

Hi experts,

I have a backup database (.bak)  which was taken from one machine which consists of sql version 2012. This server was inactive from past 2 years. We are trying to restore this backup file in the new machine (server) but the verification is failed. I tried to test the backup file whether it is healthy or not by "restore filelistonly", "restore headeronly" etc; i am getting an error 13, it seems my backup file got corrupted. If I want to take a new backup, that server is no more. Is there any way to get rid of this backup database to be worked? 

Moreover, I have tried some of the 3rd party tools such as Sql backup recovery, stellar phoenix sql database repair, etc but no use. It is prompting on which sql version that the backup has taken. I selected 2012 for all softwares and tested accordingly, but no use.

Please help how to get rid of this db backup file? 


Failover sql server publisher to one of subscriber

$
0
0

Hello Team,

I have design question on transactional replication with one publisher and 5 subscribers ( sql server standard 2014). replicating entire database for horizontal scaling.Publication size is more than 3 TB. We setup push replication with initialize with backup method.

During time of disaster recovery, whats the quick way to restore application when we publisher is crashed. Is there any quick way to promote one of the subscriber as master and re-configure replication.

Possible known options

1) Break replication, configure publication on one of the subscriber and re-configure replication with backup restore method
Drawback :- It takes 30 hrs to re-configure ( backup and restore)
2) save replication meta data, add subscriptions with @sync_type = N'replication support only'
Drawback :- If there is any latency between nodes before we breaking replication, then there could be data conflict issues

Thanks in advance,

Regards,

Chaitanya Konduri

unable to disable replication from SSMS wizard

$
0
0

Hi there,I am working with replication  in sql 2012 in local machie that was set up by others and want to disable
replication from ssms wizard but getting following error:-

Invalid object name 'dbo.syssubscriptions'.
Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 0, current count = 1.
Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 0, current count = 1.
Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 0, current count = 1.
Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 0, current count = 1.
Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 0, current count = 1.
Changed database context to 'master'. (.Net SqlClient Data Provider)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=11.00.3000&EvtSrc=MSSQLServer&EvtID=208&LinkId=20476

------------------------------
Server Name: WIN23
Error Number: 208
Severity: 16
State: 1
Procedure: sp_MSrepl_dropsubscription
Line Number: 103


------------------------------
Program Location:

   at Microsoft.SqlServer.Management.Common.ConnectionManager.ExecuteTSql(ExecuteTSqlAction action, Object execObject, DataSet fillDataSet, Boolean catchException)
   at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)

______________________________________________________________________________________________

 I did check that somehow my both publication and subscription are not available under local publication and local subscription nodes in ssms respectively. Distribution database has also got deleted.and when I tried to drop database 'DB1' which is publisher db it is not allowing me to drop it as it is configured for replication.
I am not aware which database is acting as a subscriber database.

how to find out the name of subscriber database from catalog views and also how to forcefully clear my replication.

 Thanx in advance


srm_2010

table cannot be created

$
0
0

I am trying to create database and related tables. Everything works except from 'EmployeeDocuments' table (database and 4 tables were created) . It gives an error like; There is already an object named 'FK_Employees_Companies1' in the database.

My codes are as below;

________________________-

private void UserEntryForm_Activated(object sender, EventArgs e)

{ CheckIfDBExist();

}

int i;

private void CheckIfDBExist()
        {
            SqlConnection tmpConn = new SqlConnection("server=(local)\\SQLEXPRESS;user=sa;pwd=123");
       
            string sqlCreateDBQuery = string.Format("if not exists (select name from sys.databases where name = 'Devrimer_v2222')create database Devrimer_v2222");
             SqlCommand sqlCmd = new SqlCommand(sqlCreateDBQuery, tmpConn);
            string constr = Tools.Baglanti.ConnectionString.ToString();
            try
            {
                tmpConn.Open();
                int sonuc = sqlCmd.ExecuteNonQuery();
                if (sonuc != 0)

                {
                    tmpConn.Close();
                    string query = "if not exists(select * from sys.tables where name = 'Companies' ";
                    query += ")";
                    query += "CREATE TABLE [dbo].[Companies]([Id][int] IDENTITY(1, 1) NOT NULL,";
                    query += "[Name][nvarchar](100) NULL,";
                    query += "[Adress][nvarchar](500) NULL,";
                    query += "[TelNo][char](20) NULL,";
                    query += "[Active][bit] NOT NULL CONSTRAINT[DF_Companies_Active] DEFAULT((1)),";
                    query += "CONSTRAINT[PK_Companies] PRIMARY KEY CLUSTERED([Id] ASC ) WITH(PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF,";
                    query += "IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON,";
                    query += "ALLOW_PAGE_LOCKS = ON) ON[PRIMARY] ) ON[PRIMARY]";
                    query += " SET ANSI_PADDING OFF";

                    using (SqlConnection con = new SqlConnection(constr))
                    {
                        using (SqlCommand cmd = new SqlCommand(query))
                        {
                            cmd.Connection = con;
                            con.Open();
                            cmd.ExecuteNonQuery();
                            con.Close();
                        }
                    }
                    string docQuery = "if not exists(select * from sys.tables where name = 'Documents' ";
                    docQuery += ")";
                    docQuery += "CREATE TABLE [dbo].[Documents]([Id] [int] IDENTITY(1,1) NOT NULL,";
                    docQuery += "[Name] [nvarchar](50) NULL,";
                    docQuery += "[Description] [nvarchar](500) NULL,";
                    docQuery += "[ValidPeriod] [int] NULL,";
                    docQuery += "[PeriodType] [nchar](10) NULL,";
                    docQuery += "[Active] [bit] NOT NULL CONSTRAINT [DF_Documents_Active]  DEFAULT ((1)), ";
                    docQuery += "CONSTRAINT [PK_Documents] PRIMARY KEY CLUSTERED ( [Id] ASC )WITH (PAD_INDEX = OFF, ";
                    docQuery += "STATISTICS_NORECOMPUTE = OFF, ";
                    docQuery += "IGNORE_DUP_KEY = OFF, ";
                    docQuery += "ALLOW_ROW_LOCKS = ON, ";
                    docQuery += " ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]) ON [PRIMARY]";
                    using (SqlConnection con = new SqlConnection(constr))
                    {
                        using (SqlCommand cmd = new SqlCommand(docQuery))
                        {
                            cmd.Connection = con;
                            con.Open();
                            cmd.ExecuteNonQuery();
                            con.Close();
                        }
                    }
                    string EmpQuery = "if not exists(select * from sys.tables where name = 'Employees' ";
                    EmpQuery += ")";
                    EmpQuery += "CREATE TABLE [dbo].[Employees]( [Id] [int] IDENTITY(1,1) NOT NULL,";
                    EmpQuery += "[Name] [nvarchar](50) NULL,";
                    EmpQuery += "[SurName] [nvarchar](50) NULL,";
                    EmpQuery += "[Title] [nvarchar](50) NULL,";
                    EmpQuery += "[Gender] [tinyint] NULL,";
                    EmpQuery += "[MaritalStatus] [tinyint] NULL,";
                    EmpQuery += "[Tckn] [char](11) NULL,";
                    EmpQuery += "[ReportTo] [int] NULL,";
                    EmpQuery += "[BirthDate] [date] NULL, ";
                    EmpQuery += "[TelNo] [char](20) NULL, ";
                    EmpQuery += "[Adress] [nvarchar](500) NULL, ";
                    EmpQuery += "[Email] [nvarchar](250) NULL, ";
                    EmpQuery += "[CompanyID] [int] NULL,";
                    EmpQuery += "[StartWorkingDate] [date] NULL, ";
                    EmpQuery += "[Active] [bit] NOT NULL CONSTRAINT [DF_Employees_Active]  DEFAULT ((1)), ";
                    EmpQuery += " CONSTRAINT [PK_Employees] PRIMARY KEY CLUSTERED ( [Id] ASC )WITH (PAD_INDEX = OFF, ";
                    EmpQuery += "STATISTICS_NORECOMPUTE = OFF, ";
                    EmpQuery += "IGNORE_DUP_KEY = OFF, ";
                    EmpQuery += "ALLOW_ROW_LOCKS = ON, ";
                    EmpQuery += "ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] ";
                    EmpQuery += ";";
                    EmpQuery += "SET ANSI_PADDING OFF ";
                    EmpQuery += "ALTER TABLE [dbo].[Employees]  WITH CHECK ADD  CONSTRAINT [FK_Employees_Companies1] FOREIGN KEY([CompanyID]) REFERENCES [dbo].[Companies] ([Id]) ";
                    EmpQuery += ";";
                    EmpQuery += "ALTER TABLE [dbo].[Employees] CHECK CONSTRAINT [FK_Employees_Companies1] ";
                    using (SqlConnection con = new SqlConnection(constr))
                    {
                        using (SqlCommand cmd = new SqlCommand(EmpQuery))
                        {
                            cmd.Connection = con;
                            con.Open();
                            cmd.ExecuteNonQuery();
                            con.Close();
                        }
                    }
                    string userQuery = "if not exists(select * from sys.tables where name = 'Users' ";
                    userQuery += ")";
                    userQuery += "CREATE TABLE [dbo].[Users]( [Id] [int] IDENTITY(1,1) NOT NULL, ";
                    userQuery += "[EmployeID] [int] NULL, ";
                    userQuery += "[UserName] [nvarchar](50) NULL, ";
                    userQuery += "[Password] [nchar](10) NULL, ";
                    userQuery += "[Active] [bit] NOT NULL CONSTRAINT [DF_Users_Aktif]  DEFAULT ((1)), ";
                    userQuery += " CONSTRAINT [PK_Users] PRIMARY KEY CLUSTERED ( [Id] ASC )WITH (PAD_INDEX = OFF, ";
                    userQuery += "STATISTICS_NORECOMPUTE = OFF, ";
                    userQuery += "IGNORE_DUP_KEY = OFF, ";
                    userQuery += "ALLOW_ROW_LOCKS = ON,";
                    userQuery += "ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] ";
                    using (SqlConnection con = new SqlConnection(constr))
                    {
                        using (SqlCommand cmd = new SqlCommand(userQuery))
                        {
                            cmd.Connection = con;
                            con.Open();
                            cmd.ExecuteNonQuery();
                            con.Close();
                        }
                    }
                    string docEmpQuery = "if not exists(select * from sys.tables where name = 'EmployeeDocuments' ";
                    docEmpQuery += ")";
                    docEmpQuery += "CREATE TABLE [dbo].[EmployeeDocuments]( [EmployeeID] [int] NOT NULL, ";
                    docEmpQuery += "[DocumentID] [int] NOT NULL, ";
                    docEmpQuery += "[GivenDate] [date] NULL, ";
                    docEmpQuery += "[LastValidDate] [date] NULL, ";
                    docEmpQuery += "CONSTRAINT [PK_EmployeeDocuments] PRIMARY KEY CLUSTERED ( [EmployeeID] ASC, ";
                    docEmpQuery += "[DocumentID] ASC )WITH (PAD_INDEX = OFF, ";
                    docEmpQuery += "STATISTICS_NORECOMPUTE = OFF, ";
                    docEmpQuery += "IGNORE_DUP_KEY = OFF, ";
                    docEmpQuery += "ALLOW_ROW_LOCKS = ON,";
                    docEmpQuery += "ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY]";
                    docEmpQuery += ";";
                    docEmpQuery += "ALTER TABLE [dbo].[EmployeeDocuments]  WITH CHECK ADD  CONSTRAINT [FK_EmployeeDocuments_Documents1] FOREIGN KEY([DocumentID])REFERENCES [dbo].[Documents] ([Id]) ";
                    docEmpQuery += ";";
                    docEmpQuery += "ALTER TABLE [dbo].[EmployeeDocuments] CHECK CONSTRAINT [FK_EmployeeDocuments_Documents1] ";
                    docEmpQuery += "; ";
                    docEmpQuery += "ALTER TABLE [dbo].[EmployeeDocuments]  WITH CHECK ADD  CONSTRAINT [FK_EmployeeDocuments_Employees1] FOREIGN KEY([EmployeeID]) REFERENCES [dbo].Employees] ([Id]) ";
                    docEmpQuery += ";";
                    docEmpQuery += "ALTER TABLE [dbo].[EmployeeDocuments] CHECK CONSTRAINT [FK_EmployeeDocuments_Employees1] ";

                    using (SqlConnection con = new SqlConnection(constr))
                    {
                        using (SqlCommand cmd = new SqlCommand(docEmpQuery))
                        {
                            cmd.Connection = con;
                            con.Open();
                            cmd.ExecuteNonQuery();
                            con.Close();
                        }
                    }

                }
            }
            catch (Exception hata)
            {
                MessageBox.Show(string.Format(sqlCmd.CommandText.ToString() + "\n\nHata: " + hata.Message.ToString()));
            }
            finally
            {
                tmpConn.Close();
            }

        }
    }

Snapshot and Transactional replications under one distribution database ?

$
0
0

Hi there,

We have 20 tables (no primary key) to replicate from one server to other. We created two snapshot replications hourly and daily, in which 10tables are associated with hourly replication tables and the remaining 10 tables are with daily replication tables. We are planning to change the type of replication from Snapshot to transactional replication for these 20 tables in order to minimize the latency. Previously we don’t have primary key to these 20 tables, in order to work with transactional replication we need to have a pk so I created a new database and  added the tables with primary key and  identity property to all, and dumped these tables in the new database.

We are working with a live stage server where the snapshot replication already exists (running) with those 20 tables. I used this newly created database tables to replicate from this stage server to other for testing, so I created two transactional replications hourly and daily on the stage server with those 20 tables (with pk). And I maintained the scheduled jobs between the tables for snapshot and transactional replication with minimum gap of 4 hours (for daily replication tables) and ½ an hour (for hourly replication tables).

The transactional replication is successful, as our target to reduce the latency as compared to snapshot replication. But the problem is, the other jobs in this live stage server are running slow (sometime after creation) as compared to earlier. I am not sure, after I created the transactional replication, is  this problem got raised or do we have any dependency while using the same tables with different schema?

Please help me. The version I am using is sql server 2012. 

MSRepl_command table growing - cleanup job failing

$
0
0

 

I have a separate distribution server - SQL 2005.

 

My Distribution cleanup job is failing with the following error:

Executed as user: <user>. Could not remove directory '\\<server>\REPLDATA_BK\unc\LNGOKCSQLP003_BANKRUPTCY_BK-SMALLER TABLES A-C\20071203122870\'. Check the security context of xp_cmdshell and close other processes that may be accessing the directory. [SQLSTATE 42000] (Error 20015).  The step failed.

 

However the error in the agent log says this:

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.

 

When I log in as the agent service account (also the account the job is running under) and exec the following:

exec

xp_cmdshell'dir d:\'

There is no problem.

 

I saw one other thread marked "answered" on here about this same issue, but no answers.

 

Can someone help?

 

Thanks,

Deb

Not able to connect to Remote Distributor from Publisher using Administrative Link Password

$
0
0

I am not able to connect to Remote Distributor from Publisher using Administrative Link Password. I have configured the Distributor on 1 m/c and Publisher on another m/c. When i use the wizard to configure the publisher using remote distributor. I have also specified the same Admin Password link (distributor_admin) in the distributor m/c.

 

I am getting the following message:

 

 

TITLE: New Publication Wizard
------------------------------

SQL Server could not connect to the Distributor using the specified password.

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.06&EvtSrc=Microsoft.SqlServer.Management.UI.ReplUtilitiesErrorSR&EvtID=CantConnectAdminPassword&LinkId=20476

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

Connection to server [SANMENON] failed.
OLE DB provider "SQLNCLI" for linked server "D956CF83-AE2E-4FC5-83DD-BE90D84A3950" returned message "Login timeout expired".
OLE DB provider "SQLNCLI" for linked server "D956CF83-AE2E-4FC5-83DD-BE90D84A3950" returned message "An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.". (Microsoft SQL Server, Error: 21670)

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

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

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


Msg 14004 $s must be in the current database - but it is

$
0
0

Hi, I'm using sp_addarticle to help manage table replication.  This works very nicely - for most tables.  For some, it inexplicably (to me at least!) fails with a Msg 14004 error.

   Msg 14004, Level 16, State 1, Procedure sp_MSrepl_addarticle, Line 290

   <table name> must be in the current database.

I can run the same code for tables alphabetically before or after those that fail.  The same tables always have the same result, either the article is added or it doesn't. For example, it works for NAV table 'Purch. Cr. Memo Hdr.' and 'Posted Document Dimension' but not for 'Purch. Cr. Memo Line', 'Purch. Inv. Header' or 'Purch. Inv. Line'.

Note: This is NAV multi-company.  The results are the same for all companies - i.e. adding an article for table Purch. Cr. Memo Line fails for each of the companies in the database. Adding an article for Purch. Cr. Memo Hdr. works for exah of the companies!

Can anyone shed any light on this?

The alternative is to use the GUI which is painfully slow due to the large number of items displayed in the Objects to Publish panel.


SQL Server Licence

$
0
0
We are preparing to set up an SQL Server in Azure as a passive replicated DR and would not be active until a DR situation occurred. We will need to use SQL Enterprise licensing which is regular pricing is prohibited for the application, is it possible to use our MSDN licence  for this particular application?

SQL Server Replication: Data not replicating to Subscriber

$
0
0

I am using SS2008R2, SP1 - 10.50.2500.0 - Standard Edition.

I created a publisher via transactional replication. When I insert data on one of the tables, the data shows on Publisher and not replicating on Subscriber.

The Article Properties I set are:
@type = N'logbased', @pre_creation_cmd = N'delete', @schema_option = 0x000000010003008D, @identityrangemanagementoption = N'manual', @vertical_partition = N'false', @ins_cmd = N'CALL sp_MSins_dboAddress', @del_cmd = N'CALL sp_MSdel_dboAddress', @upd_cmd = N'CALL sp_MSupd_dboAddress'

On Replication MOnitor, when I try to insert tracer, Pub to Dist shows latency but DIst to Sub is 'Pending' forever...

I have been stuck with this for over a week now. This was working fine before, but not anymore.

About Snapshot Replication

$
0
0

Hi Everyone,

My Questions is about Snapshot Replication, After configured Snapshot Replication what types of jobs run on Distributor, Public er and  Subscriber. I newly in Replication. So Please give me all job name which created after snapshot replication. 

Thanks For Your Reply.


SQL Server 2008 Merge Replication - Snapshot File Location Is Incorrect

$
0
0

I've searched far and wide, and so far have not been able to find any reference to this issue.

There is a merge replication setup on a SQL 2008 server, setup to replicate to SQL 2008 Express edition. We have similar setups in SQL 2005 AND SQL 2008 without issues. The setup is that the current merge replication snapshot file location is \\<ServerName>\Repldata\UNC\<SERVER_PUBLICATION>\20101229112828 which represents the file location of the latest snapshot which was just generated due to an obsolete snapshot.

The issue comes in when attempting to replicate against the server. The replication says that the schema script could not be propogated to the subscriber. Under normal circumstances I would say it's due to security issues with being able to read to the above folder, however this is not the case. The additional error that comes up is stating that it could not read the file along with an OS error 3 (The system cannot find the path specified).

What is unique about this, is that the subscriber is trying to download the snapshot from an old and now non-existent snapshot folder. Here is an copy of the error, noting the file location of "20091121130613" which no longer exists and is from an old snapshot.

The process could not read file '\\<servername>\repldata\unc\<Server_Publication>\20091121130613\Administration_21.sch' due to OS error 3. (Source: MSSQL_REPL, Error number: MSSQL_REPL0)

I either need to find out how to change on the distributor, publisher or subscriber the location of the folder, or find out how to reset it. Deleting the subscriber database and subscription from the server and setting them both up again has no affect, which points to me that it is stored somewhere in either the distribution database, publisher database, or msdb database on the subscriber. I have also tried reinitializing the subscriptino multiple times, again with no success.

Thanks, Don

Viewing all 4054 articles
Browse latest View live




Latest Images