SQL Server 2005 Transaction Replication

May 11, 2007

We are implementing 2005 transaction replication on source database to target staging subscring database but we want to keep all transaction changes from source within staging subscribing tables.
If source column gets updated we want to keep old record and new updated record in staging subscriber. Transaction replication synchronizes but does not keep history on subscriber. Do we update stored proc's
anyone have examples of code or ideas??

View 20 Replies


ADVERTISEMENT

How To Skip Snapshot In Transaction Replication (from SQL Server 2005 To 2000)

Jun 13, 2006

We have two SQL Server 2005 production DB at remote sites. Due to network bandwidth issue, we need to replicate these DBs (publishers and distributers) to central corporate SQL 2000 DB (subscriber for backup and possible reporting (and in rare case as a failover server).

We would start out with backup from SQL 2000 db restored on remote SQL 2005 DBs. When we have DB issue on remote 2005 DB, we want to restore it from central corp. 2000 DB backup. Since two DBs are replicating to central DB, we DO NOT want combined db back up data on restored remote 2005 db. We can restore the db and delete unwanted data before we turn on replication from this restored server. So, this is not a problem.

The real problem is how to avoid snapshot replication (during initialization) when we create a transaction replication on this restored server to avoid over writing data on the central subcriber sql 2000 DB???

HELP!!



View 5 Replies View Related

I Need Away To Show The Pending Transaction From Transaction Replication In A User Friendly Format.

Jul 11, 2007



I want to list out the pending transaction for transaction replication by publication.



Help needed.

View 1 Replies View Related

Skipping Transactions In SQL Server Transaction Replication

Jun 14, 2007

I'm trying to create a transaction replication from SQL Server 2000 to 2005. Basic replication between the servers works just fine. However, what I want to accomplish is to be able to skip some of the transactions. Example - from time to time we want to purge some of the historical data from the main database (the publisher). We don't want the same purging to occur on the destination database, which will be used for reporting purposes and needs to include all the historical information. I wanted to simply stop the replication log reader, purge the records, backup the transaction log with truncation and then restart the reader. The only problem - the truncation on the replicated database keeps the transactions of the purging until they are replicated, so the transaction log backup doesn't help. Any ideas would be greatly appreciated!

View 5 Replies View Related

SQL Server 2008 :: Transaction Replication Functionality Within Mixed SPs

Jul 1, 2015

Currently, we are on SQL2008R2 EE SP1 CU13 across the board.

We are planning on upgrading the primary SQL server to SP3.

Question: Will transactional replication continue to work properly even if the Publisher is upgraded to SP3 but the subscribers remain at SP1 CU13 ?

View 2 Replies View Related

Transaction Replication && Data Archiving On SQL Server 2000

Jul 23, 2005

Hi techiesI have set up a Transaction replication from My Primary Server toSecondary Server on Orders table.Thousand of records gets inserted on Orders every hour which getreplicated on the secondary server. it works finereporting apps uses Secondory server's Orders table data for generatingreports .The Problem :Let say if i want to Remove older records from Orders table in theprimary serverwith out reflecting this change on the secondary server.is there a way to PREVENT this operation /transaction to be propogatedto the secondary server.Note : i am moving the records to another table (orders_Archive ) anddeleteing the rows from orders table . Also I need all the rows to bepresent on the secondary server table.Please advice ASAPRegards,Raj

View 4 Replies View Related

SQL 2012 :: Setup Of Transaction Replication Between One Publisher And Subscriber In Same Server

Jul 30, 2014

I have a setup of transaction replication between one publisher and subscriber in the Same server.Now, I need to add a new subscriber to the existing publisher. So publisher database name is DB_A and Subscriber 1 name is DB_B. So the new subscriber will be DB_C. Is this kind of setup possible on one server?

If yes then at the time of reinitialization is it going to apply the snapshot on DB_B as well as DB_C?Also let say if due to disk error DB_B gets corrupted then will data be still replicated between DB_A and DB_C? (Assuming publisher, subscriber 1 and 2 are sitting on individual disks).

View 1 Replies View Related

SQL Server Admin 2014 :: Skip Schema Changes For Transaction Replication

Jun 6, 2015

Whenever I am doing reinitialization, publisher table schema is applying at subscriber level

I don't want to apply all changes ...

How can I skip the schema changes for transaction replication ...

View 1 Replies View Related

Replication :: Difference Between Snapshot And Transaction And Merge Replication?

May 26, 2015

What is the main difference between snapshot and transactional and merge replication?

View 5 Replies View Related

SQL 2005 Server (SP2) To SQL 2005 Express (SP2) Replication Looping/Excessive Repl Times

Sep 25, 2007

We have a large number of clients attempting to replicate two publications on 2005 Express databases (2 publications subscribed to the one subscriber database) with our 2005 Server (9.00.3042.00 SP2 Standard Edition) and experiencing two significant problems:

1) Users experience the following message:

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

This problem should not apparently occur with SQL Server 2005 (or 2005 Express) instances with SP2 applied. All clients experiencing this problem have SP2 installed as does our Server and the retention period is 30 days. The subscribers have been replicating well under that.


2) Replications never succeed after appearing to replicate/loop around for hours

This issue is the most critical as we have clients who have been installed and re-installed with new instances of SQL Server 2005 Express, new empty databases (on subscriber before snapshot extraction), and using fresh snapshots (less than an few hours old) which cannot successfully replicate.

Interestingly there is at least 1 instance where several computers are subscribed and successfully replicating the same database as another where replication refuses to succeed.

To test we have taken a republished database from another 2005 Server which is working fine and restored it to the same server as the one holding the database with which we are experiencing problems and subscribed to it. This test worked fine and replication of both publications went through fast and repeatedly without showing any signs of problem.

This indicates that the problem is perhaps data related as it appears localised to that database.

Below are two screenshots which may assist.

Screenshot 1 Shows that on the server side the replication attempts look like they are succeeding despite the fact that the subscriber end does not indicate success. Also the history indicates the the subscription has spent all it's time initialising and not merging any changes.

Screenshot 2 Shows a rogue process which has appears on many of the problem child subscribers. It shows a process running with no end time even though the job indicates failure in the message and even though other replication attempts appear to have succeeded after it. This process stays in the history showing that it is running even when I can find no corresponding process for it.

Can anyone suggest a further course of action/further testing/further information required which may assist?

This is extremely urgent and any assistance would be greatly appreciated!

Thanks in advance!

Scott

View 5 Replies View Related

How Do I Measure Bandwith Usage For Merge Replication SQL 2005 To Sql Server Mobile 2005?

Jan 24, 2007

Hi,

Is there any way to measure bandwith usage during merge replication between sql server 2005 and sql server mobile 2005 running on a cradled wm5 mobile device.

Attaching the windows performance monitor to the network connection established over usb would work although I was wondering if there was something specific for this case integrated into Sql server 2005 / sql server mobile 2005 / Sql server management studio / third party tools that i could use ?

thnx,

pdns.

View 4 Replies View Related

Merge Replication - SQL Server 2005, Windows Vista And MSVisual Studio 2005

Jul 11, 2007

Hello everybody!

I hope that someone could help me.

I have a problem when i start sincronyzing with the emulator of MSVS2005 to SQL2005 in Windows Vista. I have the same program in the emulator, but sincronyzing with windows XP Pro and no problem...



I configure the connection to use the IUSR.



The source code that i use:



repl.InternetUrl = @"http://laptop/SQLMobileIIS/sqlcesa30.dll";

repl.Publisher = @"laptop";

repl.PublisherDatabase = @"database";

repl.PublisherSecurityMode = SecurityType.NTAuthentication;

repl.Publication = @"Pubdatabase";

repl.Subscriber = @"SQLMobile";

repl.SubscriberConnectionString = @"Data Source='" + nomeFicheiroBD + "';Password='3409'";



The error that returns is:



"Failure to connect to SQLServer with provided connection information. SQL Server does not exist, access is denied because the IIS user is not a valid user on the SQL Server, or the password is incorrect"



Does anybody knows what i can do?

HELP I NEED SOMEBODY TO HELP!

Thanks!

View 1 Replies View Related

Help Needed In Merge Replication, SQL Server 2005 Mobile Edition And VC# 2005

Apr 10, 2008

I have written following code in my application

I just want to display all the data of a Single table into a Data Grid, I know that we can drag and drop the table on to a form and datagrid is generated, but here I want to retrive those values through my code, how should i do that

I am getting following errors while running the program
Error 1) Error No. 28037, MS SQL Server 2005 Evrywhere Edition
Error: A request to send data to the computer running IIS has failed. For more information see HRESULT
Error 2) Error No. 0, SQL Server 2005 Evrywhere Edition ADO.Net Data Provider
Error: The specified table does not exist [ JobLists ].

Can anybody please tell me, where I went wrong ??? In this code anywhere else????

Note: While adding a Data Source of SQL Server 2005 Mobile Edition, I have added that .sdf file into my project, thats why I have written the Data Source as : .DbFile.sdf



@"Data Source = .DbDotNetCF.sdf";


The code is as follows:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlServerCe;

namespace DeviceApplication1
{
public partial class Form1 : Form
{
string filename = @".DbDotNetCF.sdf";

private DataSet dsJobLists;

public Form1()
{
InitializeComponent();
}

private void DeleteDB()
{
if (System.IO.File.Exists(filename))
{
System.IO.File.Delete(filename);
}
}

private void Sync()
{
SqlCeReplication repl = new SqlCeReplication();

repl.InternetUrl = @"http://localhost/WebsiteDotNetCF/sqlcesa30.dll";
repl.Publisher = @"RAHU";
repl.PublisherDatabase = @"DotNetCF";
repl.PublisherSecurityMode = SecurityType.NTAuthentication;
repl.Publication = @"PubDotNetCF";
repl.Subscriber = @"SubDotNetCF";
repl.SubscriberConnectionString = @"Data Source='" + filename + "';Max Database Size=128;Default Lock Escalation =100;";
try
{
if (!System.IO.File.Exists(filename))
{
repl.AddSubscription(AddOption.CreateDatabase);
}
repl.Synchronize();
}
catch (SqlCeException ex)
{
DisplaySQLCEErrors(ex);
}
finally
{
repl.Dispose();
}


// Display Same Data In Another DataGrid : dataGrid1
SqlCeConnection cn = new SqlCeConnection(@"Data Source='" + filename + "'");

SqlCeDataAdapter daJobLists = new SqlCeDataAdapter("SELECT JobListsID, JobID, PersonID FROM JobLists", cn);
if (dsJobLists == null)
{
dsJobLists = new DataSet();
}
try
{
dsJobLists.Clear();
daJobLists.Fill(dsJobLists, "JobLists");
dataGrid1.DataSource = dsJobLists.Tables["JobLists"];
}
catch (SqlCeException ex)
{
DisplaySQLCEErrors(ex);
}
}

private void DisplaySQLCEErrors(SqlCeException ex)
{
for (int i = 0; i < ex.Errors.Count; i++)
{
MessageBox.Show("Index #" + i.ToString() + ""
+ ex.Errors.Source + ""
+ "Error: " + ex.Errors.Message,
"Error No. " + ex.Errors.NativeError.ToString());
}
}

private void Form1_Load(object sender, EventArgs e)
{
Sync();
DeleteDB();

if (DbDotNetCFDataSetUtil.DesignerUtil.IsRunTime())
{
// TODO: Delete this line of code to remove the default AutoFill for 'dbDotNetCFDataSet.JobLists'.
this.jobListsTableAdapter.Fill(this.dbDotNetCFDataSet.JobLists);
}
}
}
}



I have created a merge replication correctlly( I suppose, there were no errros)
Please help

Your help will be appriciated

View 1 Replies View Related

Transaction Troubles With SQL Server 2005

Mar 29, 2006

Hi to all.I'm trying to transact from an ASP.NET application in a machine with an SQL Server 2005 placed in a different machine. I can connect without problems from my application to the database, but the problems are when I need to transact with it. The error message I receive is "Network access for Distributed Transaction Manager (MSDTC) has been disabled. Please enable DTC for network access in the security configuration for MSDTC using the Component Services Administrative tool." (at code I'm using the TransacionScope object).On the first machine, where we have the Visual Studio 2005 and the application web environtment is placed, is an standard Windows XP Professional. On the MSDTC configuration I have checked outgoing and the firewall is down. On the second machine, where is placed my SQL Server 2005, I have all the checkboxs checked at the MSDTC Configuration, and I have the Windows Firewall enabled with the SQL Server and the MSDTC as exceptions, with the ports 1433 and 135 as exceptions too. At the SQL Server Configuration Manager I have as enabled the TCP/IP, the Named Pipes and Shared Memory at Protocols for MSSQLSERVER.When I'm using an SQL Server 2000 database the code works fine and I don't have problems.Any one can help me?Thanks in advance.Jesús

View 12 Replies View Related

SQL Server 2005 Transaction Exception

Apr 19, 2007

Dear All,
I am getting SQL Server 2005 unable to resume transaction Exception


Please guide and help


Thanks,
Waheed.

View 2 Replies View Related

Transaction Deadlock In SQL Server 2005

Mar 3, 2007

HI,

I have a framewrok that runs tests and keeps updating the status of the tests to the DB. They are approx 20 tests whose status will be updated simultaneously. Recently i have seen the follwoing error


{"Transaction (Process ID 84) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction."}

I am using SQL server 2005. Any suggestions?

Thank you



View 1 Replies View Related

Auditing SQL Server 2005 Through Transaction Log

Jun 4, 2007

Hello,



We are maintaining an internal ASP.NET v2.0 website which is quite big and already in production. The underlying SQL Server 2005 database contains 350+ tables.



Recently, we have been asked to implement a new feature which seems functionally quite simple. We have to track every single data modification, which includes insertions, deletions and modifications. This information should be presented to power users in the form of readable strings right in an admin section of our website.



Our team of architects is working on a way to make it possible without putting the SQL Server to a crawl. One thing is for sure, SQL Server 2005 already does the job through its transaction log. It should be a good idea to use it directly instead of managing our own log based on triggers. Why put more pressure on the server to write data that is already logged by the database engine? We have heard that Microsoft's SQL Server team do not support this concept and are wondering why...



It's quite easy to find queries on the web that output very useful information such as date of transactions and what they have done. Although, the data involved in those transactions seems to be stored in a binary field which can be retrived using this query: SELECT "log record" FROM ::fn_dblog(null,null)



3rd parties such as Apex SQL are already doing a great job at decrypting it for us. This is very useful but not efficient since those tools do a very generic job. We would like to optimize it for our needs. All we need to know is who made the modifications, when, in which tables and what are the new values.



We believe that we would have to decrypt the "log record" field from the ::fn_dblog(null, null) table. Is there any way to get basic documentation about how to do it?





Thanks!



Marc Lacoursiere

RooSoft Computing

View 9 Replies View Related

Help Needed For Transaction Support In SQL Server 2005

Jun 21, 2006

Hi,I have 2 stored procedure 1st insert the data in parent tables and return the Id. and second insert child table data using that parent table id as paramenter. I have foreign key relationship between these two tables also.my data layer methods somewhat looks likepublic void Save(order value){using (TransactionScope transactionScope = new TransactionScope(TransactionScopeOption.Required))         {              int orderId =  SaveOrderMaster(value);            value.OrderId = orderid;              int childId = SaveOrderDetails(value);             //complete the transaction              transactionScope.Complete();        }}here  1. SaveOrderMaster() calls an stored procedure InserOrderData which insert a new record in order table and return the orderId  which is identity column in Order table.2. SaveOrderDetails() call another sotored procedure which insert order details in to table "orderdetail" using the foreign key "orderid".My Problem:Some time the above method works correctly but when i call it repeatledly (in a loop) with data,  some time it gives me foreign key error which state that orderid is not existsin table Order. This will happen only randomly. I am not able to figureout the reason. does some one face the same problem. if yes, what could be the reason and/or solution.

View 5 Replies View Related

How To Set SQL Server 2005 Transaction Timeout Programatically

Nov 26, 2007



Hello,
I need to execute a stored procedure from the data layer, that uses a transaction. And I have to override the default transaction timeout for this traansaction
I know how to change the transaction timeout form Management Studio, but I need to be able to change it only for that specific transaction (from the stored procedure's code or from the data layer)

Thanks in advance

View 2 Replies View Related

A Call To SQL Server Reconciler Failed. SQL Server 2005, SQL Server Mobile Merge Replication

Oct 2, 2005

Hi,

View 36 Replies View Related

Transaction Replication Help

Apr 5, 2006

Dear all,
I set up a transaction replication (from server A to server B) for tables and stored procedures. When I update the data at server A, the data at server B will be updated by replication. However, the stored procedure can't update at server B no matter what I changed at server A's stored procedure. How can I update the stored procedure using transaction replication?
The other question is the table schema. As I know, the transaction replication will be created a snapshot to project all needed tables and stored procedures at the first time. If I created a new table, stored procedure or changed the table schema (e.g. add/delete a new column), the transaction replication didn't update the new objects to the server B. What can I do to update the transaction replication except creating a new subscription?
 
Thanks.
epjames

View 1 Replies View Related

Transaction Replication

Dec 3, 2001

Good Morning to all,
I am new to SQL Server.Here is my question. I have set up transactional replication with immediately updating subscriber between to servers A & B. A is publisher/Distributor and B is subscriber. In the event A fails the applications will be directed towards B. My problem is suppose A has faliled and my data is now written to B. How can i syncronise data in A and b when A is again online and what should i do ?

thanks in advance.

Minesh.

View 1 Replies View Related

Transaction Replication

Dec 6, 2001

Hi all,
I am using SQL 2k on two seperate servers on win 2k advance servers without any service packs. My problem is i am using transactional replication between two servers (SML1 and SML2), SML1 is publisher/Distributor and SML2 is subscriber. My db name on both the server is same. when i am inserting data in db on SML1 it replicates immediately on SML2 but vice versa in not happening. Any help in setting up two way replication is highly appreciated. (There is no timestamp column on table which is used as article and there is PK).

thanks in advance.

Minesh.

View 1 Replies View Related

Transaction Replication Help!!!

Aug 4, 2000

I keep getting this error message even though I have droped and recreated
the replication several times. Has anybody had the same problem?

error message.
"Another snapshot agent for the publication is running"


Thanks for your time.

View 2 Replies View Related

Transaction Replication

Jun 7, 2000

My Transaction Replication fail with this error message pls help.

This is the error message The process could not create file 'SQLMS1d$MSSQL7ReplDatauncSQLMS1_AFT_National_EMN _National - Transaction - Changes at Both Sides - EMN to Local Only20000607090006Benefit.sch'.

View 2 Replies View Related

TRANSACTION REPLICATION

Dec 22, 2000

I it possible to setup transaction replication between two sql servers if both Sqlerveragents runs under different accounts and the servers are in different domains


Thanks in advance


Langel

View 1 Replies View Related

Transaction Replication-Help

Oct 23, 1999

I am attempting to set up transactional replication between a production server (SQL1) and a “reports” server (SQL2). The production server is the publisher, the “reports” server is the distributor and the first subscriber, other subscribers will be added later. There are multiple databases on the production server; selected tables from each will be replicated to corresponding databases on the other servers. Both are SQL7, no SP (yet).

I have set up the replication on two databases so far. The initial snapshot replication runs fine; the tables and data are duplicated on the reports server.

For one DB the transaction replication fail the other still reports “No replicated transactions are available”, which is probably true.

The failing log reader agent history reports: “The process could not execute ‘sp_replcmds’ on SQL1“ (five time, 10 minutes apart). The session details shows 2 items, “Initializing” and the same error message. The error details show it as an ODBC error timeout.

After the fifth time the log agent history reports “The process could not execute ‘sp_Msadd_repl_commands27hp’ on SQL2 ” The session details show 3 items , “Initializing”, “No replicated transactions are available” and the same error message. The error details show the following (Category, Source, Number, Message): Agent, blank, 2000, “IDistPut Interface has been shut down.”; Agent, SQL1-JCL1, 20007,” No replicated transactions are available.” ( 26 times); Data Source, SQL2, 1007 “Cannot insert duplicate key row in object 'MSrepl_transactions' with unique index 'ucMSrepl_transactions'.Cannot insert duplicate key row in object 'MSrepl_transactions' with unique index 'ucMSrepl_transactions'.”

I can restart the agent, but after two hours the same thing appears. These were set up with EM using the wizzards

Any suggestions would be greatly appreciated.

View 2 Replies View Related

Transaction Log Replication

Sep 13, 1999

I had established a transaction log replication ,it's not immediate-updated.
on next 2 days,it's normal.but now,it's not available ,and haven't any warning,error,informatin.
I have very trouble about the 'log reader' is running but i change the data in articles it's no effect.
please tell how i do?

View 1 Replies View Related

Transaction-Replication

Aug 24, 2000

Hi,
Every one
Can I add coulmn in my existing table which i am using for replication. This article is i am using for transaction replication. I added column to both articles , publisher & subscriber, But now it is giving me error that, Insert error.
I checked in Create & Manage publications property on E.M , that cloumn is not checked & it is not allowing me to do from E.M , Does any one know
which store proc I require to execute from QA.

Appreciate Your Help
Thanks
Nirmal.

View 2 Replies View Related

Transaction Replication

Mar 1, 2001

I am trying to setup real time transaction replication between two databases on two different sql server 7.0.The ideas is to replicate all the objects from the first database to the second database including table, stored procedures and views. Both SQL servers’ runs under different service NT account.
The sql server that I want to replicate runs an application that create additional tables when the application is running.

How do I schedule a transaction replication so that all the objects plus those additional tables and stored procedures that the application creates at run time are also going to get replicated in real time?

Thanks in advance.

JACK

View 2 Replies View Related

Transaction Log Does Not Truncate And Shrink Using A SQL Server 2005 Maintenance Plan

May 15, 2006

We are using SQL Server 2005 (SP1). I have created a maintenance plan that backs up up the datebase every night. The problem is that the transaction log is continuing to grow. I have been told that a full backup will automatically truncate and shrink the transaction log. However, this is not happening. How can I truncate and shrink the transaction log after a full backup as part of our maintenance plan. Thank you.

View 29 Replies View Related

Transaction Not Commiting Using Microsoft SQL Server 2005 JDBC Driver 1.1

Feb 14, 2007

I have some code that should execute multiple statements and then commit. I am using the Microsoft SQL Server 2005 JDBC Driver 1.1.

The statements only commit ifI close the connection to the SQL Server 2005 instance. I've looked at the example given at http://msdn2.microsoft.com/en-us/library/ms378931.aspx and it doesn't require closing the connection in order to commit.

Example:

public void doCall(Connection con) {
try {
/*Turn off AutoCommit.*/
con.setAutoCommit(false);

/**Call Two Stored Procedures.*/
Statement stmt = con.preapareCall(/*Java Code*/);
stmt.setObject(/*Java Code*/);
stmt.execute();

Statement stmts = con.preapareCall(/*Java Code*/);
stmt2.setObject(/*Java Code*/);
stmt2.execute();



/**Commit the transaction.*/
con.commit();

}
catch (SQLException ex) { //If some error occurs handle it.
ex.printStackTrace();
try {
con.rollback();
}
catch (SQLException se) {
se.printStackTrace();
}
}
}

My transaction never commits, and when I try to query the associated database tables in Microsoft SQL Server Management Studio 2005 my query hangs.

View 7 Replies View Related

RMO: Replication Between SQL Server 2005 Amd SQL Server 2005 Express

Sep 6, 2005

Hi!

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved