Showing posts with label servers. Show all posts
Showing posts with label servers. Show all posts

Friday, March 30, 2012

Replication to the Non Default File Group

Hi,

I have a snapshot replication set up on a SQL 2K Server publishing to other SQL 2K servers. The publisher database has mutliple file groups - which is structured the same as the subscriber databases. The snapshot has been set to delete and recreate the tables on the subscribers - this is a performance decision as the tables are large and this is the better approach. The tables reside in their own file groups (but not the default). I want the replication agents to recreate these tables in the original file groups and not the default.

Is there a method within Replication to specify which file group to recreate the table in so it doesn't fill up the default file group?

Thanks in advance,

Pete

Hi Pete,

The tables on the subscriber will only be created on the default filegroup. The options are either to not drop tables and use delete instead or modify the default filegroup of the destination databases.

You can create a job that does the following:

1. sets the default filegroup of the subscriber database to secondary filegroup.

2. Agent starts and does the job.

3. Once agent job has finished and call a new job that will set the filegroup backup to primary.

In SQL 2005 you have the option to specify the scriptts that you want to execute before and after the snapshot is applied.

Jag

|||

There is a third option. After the snapshot has been created, edit the script files on the distributor which hold the CREATE TABLE commands and correct them to use the correct file groups.

You can also setup a T/SQL script which can be run after the snapshot has been delivered. Write a script which rebuilds the clustered indexes of the tables on the correct file group. By rebuilding the clustered index and moving it to another file group you will move the tables to that file group as well.

Replication to SQL 2005

Hello all,
We have merge replication setup between 3 servers. SQL1, SQL2 and SQL3.
We have installed SQL2005 on a ReportingServer and want to be able to
popluate the database on SQL2005 with data from SQL1. How can we set this up?
We want to avoide setting up the whole replication process again as the
database is 25 GB and SQL3 is updated via a telephone line.
Thanks
Regards
Ishan
Ishan,
if the ReportingServer is RO apart from the replication synchronization, I'd
use transactional replication. I'd also consider dong a nosync
initialization to set things up with a database of this size.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

Replication to a specific IP

If we had two SQL 2000 servers each with 2 NIC's. For each server one network card was pointing to an internal network 172.16.x.xxx we use for production. The other NIC (say its 198.16.x.xxx) we wanted to use just for replication purposes between the two servers in an attempt to lighten the network traffic on the 172 network. My question is, can you set up 2 SQL servers to replicate between themselves on a specific IP or Named Pipe?If both server is in different geographical area or on a WAN, you will face a big threat from anyone in the world who wrote a simple program to guess your user "sa" password or any user account. To post that on a WAN, its preferable to go through a firewall.

There are 2 options:-
1) get a 1gigabit network adapter card and a switch that support 1GB.
2) make use of Client Utility Connection on both SQL server. Configured according to your Server Name with static IP address and specify the port that is use by both server. This will tell the replication agents to call the static ip.

Originally posted by sdonovan
If we had two SQL 2000 servers each with 2 NIC's. For each server one network card was pointing to an internal network 172.16.x.xxx we use for production. The other NIC (say its 198.16.x.xxx) we wanted to use just for replication purposes between the two servers in an attempt to lighten the network traffic on the 172 network. My question is, can you set up 2 SQL servers to replicate between themselves on a specific IP or Named Pipe?

Replication technology question - please help a newbie!

Hi everyone,
I have a question about the replication technology on SQL Server 2000.
Lets say that we have 2 servers (names A & B foir convenicce). Server
"A" is the primary and "B" the backup server.
There exists a transactional replication process - a Central
Publisher/Distributor Model between these servers with "A" acting as
the publisher/distributor and "B" acting as the subscriber,
specifically a "pull" type subscriber.
Lets say Server "A" goes down and "B" kicks in as the backup.
Eventually "A" gets working again. My question is will server "B"
automatically sync any transactions logged in the down time period back
to "A"? Or is there something I'm misiing or not understanding about
this technology?
Any comments/corrections/suggestions really, really appreciated.
Thanking you,
Al.Replication is not primarily designed for fail over. Look at it more like a load balancing
technology. You can offload some work from A onto B, like reporting stuff.
Specifically, B doesn't "kick in as the backup". B is always available for usage, regardless of
whether A is up or not. If you do modifications on B, there is no process of getting those
modification back to A. Transactional is one-way. There are a couple of options with transactional,
"immediate updating" and "queued updating". The later might new to 2005, I'm not sure.
AFAIK, immediate updating means you can modify B and triggers on the tables in B will connect to A
and with assistance of DTC modify A. Modifications on B will not be possible if A isn't up, since
modifications will fail due to these triggers. I might be simplifying a bit, so make sure you read
BOL for more tech details.
Above is for transactional replication. There is Merge as well, which *could* me more suitable for
you, but as Merge is "update anywhere", you should only use it where conflicts and conflict
resolution is acceptable. Again, more info in BOL.
For 2000, I'd suggest Clustering or Log shipping. 2005 adds Database Mirroring, whish is a bit like
log shipping ++. All these three technologies are specifically designed for fail over scenarios.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<almurph@.altavista.com> wrote in message
news:1156759017.702930.219920@.i3g2000cwc.googlegroups.com...
> Hi everyone,
>
> I have a question about the replication technology on SQL Server 2000.
> Lets say that we have 2 servers (names A & B foir convenicce). Server
> "A" is the primary and "B" the backup server.
> There exists a transactional replication process - a Central
> Publisher/Distributor Model between these servers with "A" acting as
> the publisher/distributor and "B" acting as the subscriber,
> specifically a "pull" type subscriber.
> Lets say Server "A" goes down and "B" kicks in as the backup.
> Eventually "A" gets working again. My question is will server "B"
> automatically sync any transactions logged in the down time period back
> to "A"? Or is there something I'm misiing or not understanding about
> this technology?
> Any comments/corrections/suggestions really, really appreciated.
> Thanking you,
> Al.
>|||Tibor,
Thanks a million fof that. The boss is not too keen on clustering
due to the expense but I had never heard of log shipping technology
before. I've done some googleing and have come up trumps.
Thanks once again,
Al.|||This should be a good starting point for comparstion of technologies and methods:
http://www.microsoft.com/technet/prodtechnol/sql/2000/deploy/sqlhalp.mspx
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<almurph@.altavista.com> wrote in message
news:1156770100.831789.299900@.h48g2000cwc.googlegroups.com...
> Tibor,
> Thanks a million fof that. The boss is not too keen on clustering
> due to the expense but I had never heard of log shipping technology
> before. I've done some googleing and have come up trumps.
> Thanks once again,
> Al.
>

Replication technology question - please help a newbie!

Hi everyone,
I have a question about the replication technology on SQL Server 2000.
Lets say that we have 2 servers (names A & B foir convenicce). Server
"A" is the primary and "B" the backup server.
There exists a transactional replication process - a Central
Publisher/Distributor Model between these servers with "A" acting as
the publisher/distributor and "B" acting as the subscriber,
specifically a "pull" type subscriber.
Lets say Server "A" goes down and "B" kicks in as the backup.
Eventually "A" gets working again. My question is will server "B"
automatically sync any transactions logged in the down time period back
to "A"? Or is there something I'm misiing or not understanding about
this technology?
Any comments/corrections/suggestions really, really appreciated.
Thanking you,
Al.Replication is not primarily designed for fail over. Look at it more like a
load balancing
technology. You can offload some work from A onto B, like reporting stuff.
Specifically, B doesn't "kick in as the backup". B is always available for u
sage, regardless of
whether A is up or not. If you do modifications on B, there is no process of
getting those
modification back to A. Transactional is one-way. There are a couple of opti
ons with transactional,
"immediate updating" and "queued updating". The later might new to 2005, I'm
not sure.
AFAIK, immediate updating means you can modify B and triggers on the tables
in B will connect to A
and with assistance of DTC modify A. Modifications on B will not be possible
if A isn't up, since
modifications will fail due to these triggers. I might be simplifying a bit,
so make sure you read
BOL for more tech details.
Above is for transactional replication. There is Merge as well, which *could
* me more suitable for
you, but as Merge is "update anywhere", you should only use it where conflic
ts and conflict
resolution is acceptable. Again, more info in BOL.
For 2000, I'd suggest Clustering or Log shipping. 2005 adds Database Mirrori
ng, whish is a bit like
log shipping ++. All these three technologies are specifically designed for
fail over scenarios.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<almurph@.altavista.com> wrote in message
news:1156759017.702930.219920@.i3g2000cwc.googlegroups.com...
> Hi everyone,
>
> I have a question about the replication technology on SQL Server 2000.
> Lets say that we have 2 servers (names A & B foir convenicce). Server
> "A" is the primary and "B" the backup server.
> There exists a transactional replication process - a Central
> Publisher/Distributor Model between these servers with "A" acting as
> the publisher/distributor and "B" acting as the subscriber,
> specifically a "pull" type subscriber.
> Lets say Server "A" goes down and "B" kicks in as the backup.
> Eventually "A" gets working again. My question is will server "B"
> automatically sync any transactions logged in the down time period back
> to "A"? Or is there something I'm misiing or not understanding about
> this technology?
> Any comments/corrections/suggestions really, really appreciated.
> Thanking you,
> Al.
>|||Tibor,
Thanks a million fof that. The boss is not too keen on clustering
due to the expense but I had never heard of log shipping technology
before. I've done some googleing and have come up trumps.
Thanks once again,
Al.|||This should be a good starting point for comparstion of technologies and met
hods:
http://www.microsoft.com/technet/pr...oy/sqlhalp.mspx
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<almurph@.altavista.com> wrote in message
news:1156770100.831789.299900@.h48g2000cwc.googlegroups.com...
> Tibor,
> Thanks a million fof that. The boss is not too keen on clustering
> due to the expense but I had never heard of log shipping technology
> before. I've done some googleing and have come up trumps.
> Thanks once again,
> Al.
>

Wednesday, March 28, 2012

Replication taking longer

I've got once a day snapshot replication working between 2 servers. I
take a copy of most of a database for MI and adhoc query processing
purposes. This has been working okay for several months now but I've
noticed that the time to load the database is gradually taking longer.
I don't think this is a product of the source database growing, because
whilst it has grown by 2-3%, the time taken to load the target database
is taking 80-90% longer than it did a month ago. I thought this may be
due to some physical file structure problem and I reindexed all tables
with no effect. I've also noticed that a DTS package that I'm using to
copy a much smaller database across to the same MI server has also
increased in duration over the same time period.
Any ideas to solve this would be welcome.
TIA
Laurence Breeze
Laurence,
indexing the tables wouldn't speed up the snapshot application at the
subscriber - actually quite the opposite . Perhaps you can monitor which
part of the process is taking more time than expected. You could just
monitor it using dbcc inputbuffer at the subscriber while it processes to
get a feel for it. If the DTS task has increased in time then it could be
network issues or the hardware on the subscriber. Loads of possibilities
here. You could copy a file to the server to test the network transfer
speed. I'd also monitor the disk writes/sec as maybe the problem lies there.
Disk fragmentation could be worth looking at, but I wouldn't expect this to
be such a major factor. Finally, check the general performance of the server
outside of data transfers - just adding data to a dummy table - and compare
to another (similar) server.
HTH,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

Replication subscriber views, locks and blocks.

Quick question, do views on the subscription server create locking and
blocking issues?
I have 2 servers set-up with transactional replication. We have scheduled
reports running on the subscribing server, most of those reports using views.
The views seem to create performance, locking and blocking issues.
Thank you very much in advance.
Message posted via http://www.droptable.com
Yes they can. You might want to consider using indexed views depending on
your version and edition of SQL Server.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Frank N via droptable.com" <u10790@.uwe> wrote in message
news:5a40019273826@.uwe...
> Quick question, do views on the subscription server create locking and
> blocking issues?
> I have 2 servers set-up with transactional replication. We have scheduled
> reports running on the subscribing server, most of those reports using
> views.
> The views seem to create performance, locking and blocking issues.
> Thank you very much in advance.
> --
> Message posted via http://www.droptable.com
|||A (non-dirty) read of data takes out a shared lock and this is not peculiar
to views. If these views are used for reporting purposes, you might want to
have a replica to be used for reporting eg using transactional replication,
or database mirroring with database snapshots.
Alternatively you could allow dirty reads (NOLOCK) on the tables in
question - depends on the business constraints.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||So if we place (nolock) hints on all the tables in all the views that should
eliminate the locking?
Paul Ibison wrote:
>A (non-dirty) read of data takes out a shared lock and this is not peculiar
>to views. If these views are used for reporting purposes, you might want to
>have a replica to be used for reporting eg using transactional replication,
>or database mirroring with database snapshots.
>Alternatively you could allow dirty reads (NOLOCK) on the tables in
>question - depends on the business constraints.
>Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
Message posted via http://www.droptable.com
|||Yes - or more easily set the transaction isolation-level to read
uncommitted.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

Replication stops after server reboot??

Hi,

I have transactional replication set up between two dedicated servers. Server A is the PDC and Server B is a BDC (they are both Win2000 boxes). Both the servers are brand new, and replaced the two that were running like clock work (replication wise) for the last 12 months. I never had this problem with the old servers...

When the servers are shut down (as the case was a couple of weeks back with a power failure) or just recently when they were move to another room. Both servers boot up at the same time. Server B (which is the server holding the db being replicated) boots quicker and as a result replication fails and is then 'sucessfully stopped'. Unless I am aware of the server being rebooted and can monitor this potential problem, within 2 days the logfile grows to large and everything comes to a crashing halt.

I just remove replication, truncate and shrink the log, reset replication and we're away... BUT I really need to know why it is happening in the first place. I figure there must be a setting that I have forgotten about or something.

Both servers are Win2000 (SP4) and SQL2000(SP3a).

Any help would be appreciated.

Thanks
CasperHave you tried restarting replication agents before removing replication? Make sure sql agent is set up as auto start. I assume the distribution db are sitting on the publisher (server B). When dist server couldn't find subscriber (box A), it will auto stop all distribution agetns, which caused the distribution db to grow.

You can set up a job monitoring log reader and dist agent to see if they are stopped. Then run sp_start_job to automatically restart them.|||When the log is full everything comes to a crashing halt. That's basically the reason why. You need to either backup the log or truncate it more often, at least once a day. Shrink it if need be. You really don't have to uninstall replicate to dump the log and shrink the log file. You can truncate the log and shrink it with replication running.|||Joejcheng - yes I already do that, the transaction log is backed up and truncated every hour. The problem was when replication stops the transaction log grows (because it is retaining all transactions waiting to be replicated).

Richard - thank you! I had not even thought about just restarting the jobs (doh!). However the 2 times this has happened the transaction log has been around 15GB and the database controls a production system and they cannot afford to be offline for long (I usually just get them up and running and then reset replication the following evening). Can I start the jobs and have them continue work whilst it is pushing all the transactions across - or would it just never catch up because of the size of the transaction log?

And also thank you for mentioning sp_start_job - I will most certainly put that in place.

However I would still really like to know why this is happening in the first place, but I think I may have worked it out...

I set up replication from a script created on the previous system. One of the replication owners is XXXSqlAdmin, however in the new system this user is just SQLAdmin. I have noticed the error raised by this in the past (ie XXXSqlAdmin does not exist in this db), but didn't think it would cause any problems. But now I think I was very wrong. I changed the script before I ran it last night, no errors were returned. I will monitor the DB for the next week and then we will do a test where we shut down the servers and boot server B well before we boot server A.

Thanks again for your help, much appreciated!

Casper :)

Monday, March 26, 2012

replication set up creates a linked server?

Hello - I recently setup replication here & I have a question. In doing an
audit of the SQL Servers the other DBA & I notice a linked server between a
dev box & a prod box with a read-only login called LinkedServer_RO to prod.
Neither one of us recognize this linked server & it's against the security
policies (understandably tight here at the CDC) to have linked servers unless
absolutely necessary. However when I go to remove the linked server it says
it can't be deleted because it is a subscriber in replication - did the
replication setup process create this? I had not remembered seeing linked
servers get automatically created before - any info is greatly appreciated -
thanks.
John F.
this is not created by replication.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"John F." <juantana@.newsgroups.microsoft.com> wrote in message
news:0FDBFCE9-1F04-4BEE-A20A-AF6639200F91@.microsoft.com...
> Hello - I recently setup replication here & I have a question. In doing
an
> audit of the SQL Servers the other DBA & I notice a linked server between
a
> dev box & a prod box with a read-only login called LinkedServer_RO to
prod.
> Neither one of us recognize this linked server & it's against the security
> policies (understandably tight here at the CDC) to have linked servers
unless
> absolutely necessary. However when I go to remove the linked server it
says
> it can't be deleted because it is a subscriber in replication - did the
> replication setup process create this? I had not remembered seeing linked
> servers get automatically created before - any info is greatly
appreciated -
> thanks.
> --
> John F.
|||thanks so much for your quick reply - in that case I wonder how I can go
about removing it - it errors saying the linked server is a subscriber in
replication.
"Hilary Cotter" wrote:

> this is not created by replication.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "John F." <juantana@.newsgroups.microsoft.com> wrote in message
> news:0FDBFCE9-1F04-4BEE-A20A-AF6639200F91@.microsoft.com...
> an
> a
> prod.
> unless
> says
> appreciated -
>
>
|||oops - actually replication does not create this linked server but someone
may have created a linked server for a subscriber.
Go to tools, replication, configure distributor, publishers, and subscribers
and click on the subscribers tab. You should see it there.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"John F." <juantana@.newsgroups.microsoft.com> wrote in message
news:4F7F8843-1205-4084-9DE0-997660584E04@.microsoft.com...[vbcol=seagreen]
> thanks so much for your quick reply - in that case I wonder how I can go
> about removing it - it errors saying the linked server is a subscriber in
> replication.
> "Hilary Cotter" wrote:
doing[vbcol=seagreen]
between[vbcol=seagreen]
security[vbcol=seagreen]
it[vbcol=seagreen]
the[vbcol=seagreen]
linked[vbcol=seagreen]
|||John,
replication will create a remote server for subscribers needing distributed
transactions, but sometimes you also need a (more versatile) linked server
to the same server for some other purpose. As you can't have both entries in
the sysservers table, the solution is to convert the remote server to a
linked server which is my guess what has happened.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
sql

Replication Security

Hi All,
I'm looking at the replication security on one of my servers (admittedly I
haven't used replication that much before), we are running transactional
replication and I wondered what the distributer_admin login does... ...is it
safe to remove the distributer_admin login? - or at least change it to a
windows authenticated login?
Thanks in advance
Ben
Don't touch this account, if you remove it replication will not work. It is
an account which is used to proxy RPC calls between the
Publisher/Distributor/Subscriber.
IIRC, you can remove it after you have created your publications,
subscribers, distributor, but after you remove it you will no longer be able
to configure any more publishers or subscribers.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"BenUK" <BenUK@.discussions.microsoft.com> wrote in message
news:C16AE4CB-6D92-4DCF-98B5-AFD0DBCCC6ED@.microsoft.com...
> Hi All,
> I'm looking at the replication security on one of my servers (admittedly I
> haven't used replication that much before), we are running transactional
> replication and I wondered what the distributer_admin login does... ...is
> it
> safe to remove the distributer_admin login? - or at least change it to a
> windows authenticated login?
> Thanks in advance
> Ben
sql

Replication Security

Hi All,
I'm looking at the replication security on one of my servers (admittedly I
haven't used replication that much before), we are running transactional
replication and I wondered what the distributer_admin login does... ...is it
safe to remove the distributer_admin login? - or at least change it to a
windows authenticated login?
Thanks in advance
BenDon't touch this account, if you remove it replication will not work. It is
an account which is used to proxy RPC calls between the
Publisher/Distributor/Subscriber.
IIRC, you can remove it after you have created your publications,
subscribers, distributor, but after you remove it you will no longer be able
to configure any more publishers or subscribers.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"BenUK" <BenUK@.discussions.microsoft.com> wrote in message
news:C16AE4CB-6D92-4DCF-98B5-AFD0DBCCC6ED@.microsoft.com...
> Hi All,
> I'm looking at the replication security on one of my servers (admittedly I
> haven't used replication that much before), we are running transactional
> replication and I wondered what the distributer_admin login does... ...is
> it
> safe to remove the distributer_admin login? - or at least change it to a
> windows authenticated login?
> Thanks in advance
> Ben

Replication Security

Hi All,
I'm looking at the replication security on one of my servers (admittedly I
haven't used replication that much before), we are running transactional
replication and I wondered what the distributer_admin login does... ...is it
safe to remove the distributer_admin login? - or at least change it to a
windows authenticated login?
Thanks in advance
BenDon't touch this account, if you remove it replication will not work. It is
an account which is used to proxy RPC calls between the
Publisher/Distributor/Subscriber.
IIRC, you can remove it after you have created your publications,
subscribers, distributor, but after you remove it you will no longer be able
to configure any more publishers or subscribers.
--
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"BenUK" <BenUK@.discussions.microsoft.com> wrote in message
news:C16AE4CB-6D92-4DCF-98B5-AFD0DBCCC6ED@.microsoft.com...
> Hi All,
> I'm looking at the replication security on one of my servers (admittedly I
> haven't used replication that much before), we are running transactional
> replication and I wondered what the distributer_admin login does... ...is
> it
> safe to remove the distributer_admin login? - or at least change it to a
> windows authenticated login?
> Thanks in advance
> Ben

Replication scripts

Hi,

The company I work for delivers their developed software together with two W2K3 servers using SQL Server 2000. These two servers has two roles, production and backup, and if the production server is offline or if anything happens to it, the backup server becomes the production server. When the original production server is back online, it becomes the backup server.

I have struggled with replication on these two machines. What we would like is to have scripts for these servers. These scripts should be general so that they could be run at both servers. The current production server is setup as distributor and publisher, and the backup server is setup with a pull subscription. Also, when the subscriber is seetup, it should update its database from the publisher

Does anyone have general scripts like this?

Best,
/M

Sorry, it's not clear to me exactly what the problem is. Did you try setting up replication using the wizards? Once it's set up, you can script out the replication scenario in Enterprise Manager.|||

Is replication a part of the solution, or something you need to setup?

Would setting up Database Mirroring between these 2 servers be an option? If do then please refer to http://msdn2.microsoft.com/en-us/library/ms177412.aspx.

This posting is provided AS IS with no warranties, and confers no rights.

replication scenario

Hi there,
I have two servers setup at two different locations, one a publisher(server
A) the other subscriber(server B). I'm using Merge replication and SQL server
2000.
We have teams working in remote areas gathering data in laptops that have
been setup as subscribers to server A.
How can i get the laptops to synchronise with server B incase server A fails?
Samman,
have a look in BOL for "merge replication, alternate synchronization
partners".
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

Replication rows getting deleted at publisher

I am using merge replication between two servers.
When i insert data into a perticular table ..the data gets deleted after some time.
Anyone faced this problem?In your publisher table, how many rowguid id in each table?|||The each table has one rowguid...

replication related questions

I have a couple questions about replication (for both 2000 and 2005 servers):

1. which system tables/dmvs/system sprocs can I look at to determine which columns of a table are being replicated?

2. which system tables/dmvs/sprocs can I call to get metadata about publishers and subscribers?

Thanks!1. None of them, since Microsoft changes the table structures and internal details from time to time, and emphatically does NOT guarantee anything about those tables. The sp_helparticlecolumns (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sp_repl2_1d6b.asp) stored procedure will give you this information though, in a supported fashion too!

2. Again, none, for the same reason. There are more choices for stored procedures here, can you give an example of what information you're trying to retrieve?

-PatP|||I think I need to do some reading myself first.

These questions are actually straight from a customer of mine who wants me to add documentation of replication related stuff to sqlspec. I've never used replication before so I thought I'd ask here. Premature.

thanks though. I'll come back when I have done my homework!

Friday, March 23, 2012

Replication question from a newbie

Right now we use autogenerated primary keys in various tables of our SQL server 2005 database. Now we have a need to put separate database servers at various remote locations and data will need to sent back to the central server. Some data will be sent back from central server to the remote sites. Data also gets added at the central location.

How can I handle replication when using autogen keys? Can I add some additional column like a SiteID and make the primary key a combination of Autogenerated key and Site ID? Would that work? The autogenerated primary keys are also foreign keys in other tables.

I have read a little about having separate ranges (of autogenerated keys) for various sites but don't think that will work as we already got lots of data in our central server.

Any help is much appreciated.

Anyone?

I am trying to find info on the web on what I can change in my existing database to make it replication friendly and so far coming up with nothing. I have read about using GUIDs vs Autogenerated keys but that would be useful when creating new databases.

I would assume these kind of situations should be common when companies expand so looking for the various solutions out there, if possible.

|||

Both those methods work.

Either uniqueidentifier with the primary key set to default of newid()

Or a composite key like Site, ID so you get records like:

LONDON, 123

LONDON, 124

LONDON, 125

NEWYORK, 321

NEWYORK, 221

The only problem with a composite key is if you want to make it a foriegn key in another table then you are stuck with having to populate the composite key instead of just one column. uniqueidentifiers are handy because the table needs one anyways but it gets really mundain if you are doing work with tables as it is not very human friendly.

Martin

Replication Question

I have continuous transactional replication running from a production server to a reporting server. Both servers are SQL 2000. A week or so ago, a new column was added to a table being replicated, both production and reporting servers. I need to get that field included in the replication. Can this be done without having to drop the subscription, adding the field, re-create the subscription and then re-creating a snapshot?Go to BOL. Look up sp_repladdcolumn. Here is part of what it says:



sp_repladdcolumn
Adds a column to an existing table article that has been published. Allows the new column to be added to all publishers that publish this table, or just add the column to a specific publication that publishes the table. This stored procedure is executed at the Publisher on the publication database.|||Thank you!

replication question

I have a transactional replication set up Between servers a as publisher and b as subscriber with tables aaa and bbb.
If i make a change on table aaa on the subscriber side should it over written by the value of the publication table value.

means

i have table aaa

id name date

1 bbbb 7/7/77

I have changed name as cccc on subscriber side, should it be over written to bbbb which is the value on publisher table.

Thanks.Transactional replication is a "one way street", from the publisher to the subscriber(s). You can enable RPC calls to funnel changes from the subscriber back to the publisher, but these aren't enabled by default. They are also a positive pain in the patoot to maintain!

Methinks thou desires Merge replication, bubba!

-PatP|||Thanks and I appreciate your response But, I was not asking whether the changes in the suscriber effects at publisher or not?If i made a change at subscriber like changing name from bbbb to cccc.So now the name at publisher database is bbbb and at subscriber is cccc.
Does the changed name at subscriber database(cccc) will be overwritten as bbbb which the name at publisher database. or it will be cccc at subscriber and bbbb at publisher.If it wont over write that name at subscriber how can we maintain same name at both the ends.
Thanks.|||Nothing will automagically force an update at the subscriber, but the next update to that row at the publisher will either a) update the name value at the subscriber, b) ignore the name value at the subscriber, or c) cause the replication distribution agent to fail. Which of the three will be determined by a combination of subscription and distributor settings.

-PatP

Replication Question

I have continuous transactional replication running from a production server
to a reporting server. Both servers are SQL 2000. A week or so ago, a new
column was added to a table being replicated (on both production and
reporting servers). I need to get that field included in the replication.
Can this be done without having to drop the subscription, adding the field,
re-create the subscription and then re-creating a snapshot?
Message posted via http://www.droptable.com"cynault via droptable.com" <u7602@.uwe> wrote in message
news:61851d6b86210@.uwe...
> I have continuous transactional replication running from a production
server
> to a reporting server. Both servers are SQL 2000. A week or so ago, a
new
> column was added to a table being replicated (on both production and
> reporting servers). I need to get that field included in the replication.
> Can this be done without having to drop the subscription, adding the
field,
> re-create the subscription and then re-creating a snapshot?
>
Not if the column has already been added.
But look up sp_repladdcolumn for future reference.

> --
> Message posted via http://www.droptable.com|||Thank you!
Message posted via http://www.droptable.com|||Thank you!
Message posted via http://www.droptable.com