Showing posts with label separate. Show all posts
Showing posts with label separate. Show all posts

Wednesday, March 7, 2012

DTS or Replication?

I need help deciding whether to use DTS or Replication:

We have four SQL Server databases on four separate servers with the same data schema, one for the north east, south west, mid atlantic, and mid west. We also have one "global" database on a separate server. First, and only this one time, we need to copy data from the four regional databases to the global database. Then, at least once a day we will need to copy changed and new data from the four regional SQL databases to the global database.

I have researched DTS and Replication and am still unsure how to proceed. DTS doesn't seem to have a mechanism to copy over only the changed data. Can somebody please advise me as to which method to use?

Thank you.

This sounds like a candidate for transactional replication to me.

Transactional replication bulk copies the data on first use but then only updates are applied, exactly what you are asking for. You will have to be careful about handling updates on the "global" database if that is a requirement, your key must be unique within all of the publication tables. Also, when setting up the subscriptions ensure replication does not try to drop the table first or replicate to seperate databases and join it together with a view. Using this view approach would be slightly less efficient but less prone to people pushing new subscriptions that drop all target tables.

DTS has no mechanism for doing this, you would have to write the logic yourself based on some sort of changed data marker/date flag. Why go to the hassle when SQL Server has a well tested system in place already?

Hope that helps

Nick
DBA
www.comoni.co.uk

|||

Do you know of any texts or resources I can find to teach me how to do this? I am not familiar with how to run replication or create a replication job, or whatever you call it. Thanks

Karen

|||

Merge replication is what you need. It is designed for the occasionally connected scenarios.

The following are some resources to get you started:

Planning Merge Replication

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/replsql/replplan_2ipa.asp

How merge replication works

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/replsql/repltypes_30z7.asp

|||

Merge replication would not be my choice here. Merge is best suited to 2 way data changes, not one way as in this case. The management overhead is higher with merge than transactional too. It is fine to run the distribution agent for transactional replication only once a day, providing there is space in the distribution database to store that day's changes.

As for documentation on this, books online is not particularly helpful on the basics. I found a quick Google for transactional replication brought up plenty of how-to articles though. It is worth spending the time reading the onlie resources as replication is a reasonably complex process and has a habit of causing problems if not planned correctly.

Nick

|||

The main difference between merge and transactional replication is not two-way or one-way. There is a "download-only" option in SQL Server 2005 merge replication to allow you to setup one-way replication and you can setup bi-directional transactional replication. The main difference is how soon you will see the change. Giving you only want to sync once a day, I would go with merge replication.

Here is an overview of different replication types and how to choose between them:

http://msdn2.microsoft.com/en-us/library/ms152531(SQL.90).aspx

Here is an example of using merge reaplication to integrate data from multiple branch offices, which is similar to the original scenario in this post:

http://msdn2.microsoft.com/en-us/library/ms151790.aspx

|||Thank you all for your help! I have enough to move me in the right direction now. I'm sure I'll have problems along the way.....

Friday, February 17, 2012

dts import/export problems

Im having trouble trying to export data from one sql server instance to another on a separate server.
i choose 'sql server authentication' as the option for destination but my username / password is not accepted. user failed error. i presume this would be a username / password within the 'security/logins' of the destination server? i have access to this server so know the username / password is set up in there.
why is this not working? i have also tried an import from the destination server, but this creates the same login failed error.
how can i connect between these 2 servers and run this export?
--
Message posted via http://www.sqlmonster.comMark
What is amount of data you are moving?
Have a look at BACKUP/RESTORE commands.
Have you specified an output file to see what is exactly the error?
"Mark Evans via SQLMonster.com" <forum@.SQLMonster.com> wrote in message
news:8aeb166002c84fa382c7595cae5484b7@.SQLMonster.com...
> Im having trouble trying to export data from one sql server instance to
another on a separate server.
> i choose 'sql server authentication' as the option for destination but my
username / password is not accepted. user failed error. i presume this would
be a username / password within the 'security/logins' of the destination
server? i have access to this server so know the username / password is set
up in there.
> why is this not working? i have also tried an import from the destination
server, but this creates the same login failed error.
> how can i connect between these 2 servers and run this export?
> --
> Message posted via http://www.sqlmonster.com|||im only moving a table with about 150 entries, hence trying to selectively export this table rather than backup / restore the whole database, which i would rather not do as im unsure the data in every table has been kept up to date.
not sure what you mean by output file but error i get when i click on refresh is -
Error Description: Login failed for user 'EVANSM'
Context: Error during initialization of the provider.
i presume that when i click refresh the login should be verified and i can select the server / database names from the dropdowns?
--
Message posted via http://www.sqlmonster.com|||Mark
Does this user have login on desination server, does he/she exist there?
"Mark Evans via SQLMonster.com" <forum@.SQLMonster.com> wrote in message
news:663fad94a4154d2dbd1d79e600338f64@.SQLMonster.com...
> im only moving a table with about 150 entries, hence trying to selectively
export this table rather than backup / restore the whole database, which i
would rather not do as im unsure the data in every table has been kept up to
date.
> not sure what you mean by output file but error i get when i click on
refresh is -
> Error Description: Login failed for user 'EVANSM'
> Context: Error during initialization of the provider.
> i presume that when i click refresh the login should be verified and i can
select the server / database names from the dropdowns?
> --
> Message posted via http://www.sqlmonster.com|||Yes, within enterprise manager... security / logins, or do you mean as a windows nt user?
--
Message posted via http://www.sqlmonster.com|||Does the user have any permissions on the table?
Look, I try get more info because I think it is matter of user's permission
or something wrong with a connection.
"Mark Evans via SQLMonster.com" <forum@.SQLMonster.com> wrote in message
news:ca8ffd6abbee4d229dfca4252a329070@.SQLMonster.com...
> Yes, within enterprise manager... security / logins, or do you mean as a
windows nt user?
> --
> Message posted via http://www.sqlmonster.com|||yes, this user has access to the relevant database and all admin roles are ticked.
is there anything within sql server that i need to alter to allow remote connections via dts import / export?
--
Message posted via http://www.sqlmonster.com|||This is a multi-part message in MIME format.
--=_NextPart_000_0735_01C4F23C.763D39A0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
Unless you have correctly configured for Kerberos Delegation in the Active
Directory, you will have to create a SQL Server Authenticated login account
on the destination SQL Server to use, not the Windows Account. Also, the
destination SQL Server will have to be configured for mixed-mode
authentication.
Check with your DBA/AD Admin about the current configurations.
Sincerely,
Anthony Thomas
"Mark Evans via SQLMonster.com" <forum@.SQLMonster.com> wrote in message
news:8aeb166002c84fa382c7595cae5484b7@.SQLMonster.com...
Im having trouble trying to export data from one sql server instance to
another on a separate server.
i choose 'sql server authentication' as the option for destination but my
username / password is not accepted. user failed error. i presume this would
be a username / password within the 'security/logins' of the destination
server? i have access to this server so know the username / password is set
up in there.
why is this not working? i have also tried an import from the destination
server, but this creates the same login failed error.
how can i connect between these 2 servers and run this export?
--
Message posted via http://www.sqlmonster.com
--=_NextPart_000_0735_01C4F23C.763D39A0
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Unless you have correctly configured =for Kerberos Delegation in the Active Directory, you will have to create a SQL Server =Authenticated login account on the destination SQL Server to use, not =the Windows Account. Also, the destination SQL Server will have to be configured for mixed-mode authentication.
Check with your DBA/AD Admin about =the current configurations.
Sincerely,
Anthony Thomas
--
"Mark Evans via SQLMonster.com" =wrote in message news:8aeb16=6002c84fa382c7595cae5484b7@.SQLMonster.com...Im having trouble trying to export data from one sql server instance to =another on a separate server.i choose 'sql server authentication' as =the option for destination but my username / password is not accepted. =user failed error. i presume this would be a username / password within the 'security/logins' of the destination server? i have access to this =server so know the username / password is set up in there.why is this =not working? i have also tried an import from the destination server, but =this creates the same login failed error.how can i connect between =these 2 servers and run this export?-- Message posted via http://www.sqlmonster.com

--=_NextPart_000_0735_01C4F23C.763D39A0--|||it is configured for mixed mode authentication already.
in security there is a 'start and run sql server in the following account' option that has a username and password entered.
is this what you mean by a SQL Server Authenticated login account?
--
Message posted via http://www.sqlmonster.com

dts import/export problems

Im having trouble trying to export data from one sql server instance to another on a separate server.
i choose 'sql server authentication' as the option for destination but my username / password is not accepted. user failed error. i presume this would be a username / password within the 'security/logins' of the destination server? i have access to this s
erver so know the username / password is set up in there.
why is this not working? i have also tried an import from the destination server, but this creates the same login failed error.
how can i connect between these 2 servers and run this export?
Message posted via http://www.sqlmonster.com
Mark
What is amount of data you are moving?
Have a look at BACKUP/RESTORE commands.
Have you specified an output file to see what is exactly the error?
"Mark Evans via SQLMonster.com" <forum@.SQLMonster.com> wrote in message
news:8aeb166002c84fa382c7595cae5484b7@.SQLMonster.c om...
> Im having trouble trying to export data from one sql server instance to
another on a separate server.
> i choose 'sql server authentication' as the option for destination but my
username / password is not accepted. user failed error. i presume this would
be a username / password within the 'security/logins' of the destination
server? i have access to this server so know the username / password is set
up in there.
> why is this not working? i have also tried an import from the destination
server, but this creates the same login failed error.
> how can i connect between these 2 servers and run this export?
> --
> Message posted via http://www.sqlmonster.com
|||im only moving a table with about 150 entries, hence trying to selectively export this table rather than backup / restore the whole database, which i would rather not do as im unsure the data in every table has been kept up to date.
not sure what you mean by output file but error i get when i click on refresh is -
Error Description: Login failed for user 'EVANSM'
Context: Error during initialization of the provider.
i presume that when i click refresh the login should be verified and i can select the server / database names from the dropdowns?
Message posted via http://www.sqlmonster.com
|||Mark
Does this user have login on desination server, does he/she exist there?
"Mark Evans via SQLMonster.com" <forum@.SQLMonster.com> wrote in message
news:663fad94a4154d2dbd1d79e600338f64@.SQLMonster.c om...
> im only moving a table with about 150 entries, hence trying to selectively
export this table rather than backup / restore the whole database, which i
would rather not do as im unsure the data in every table has been kept up to
date.
> not sure what you mean by output file but error i get when i click on
refresh is -
> Error Description: Login failed for user 'EVANSM'
> Context: Error during initialization of the provider.
> i presume that when i click refresh the login should be verified and i can
select the server / database names from the dropdowns?
> --
> Message posted via http://www.sqlmonster.com
|||Yes, within enterprise manager... security / logins, or do you mean as a windows nt user?
Message posted via http://www.sqlmonster.com
|||Does the user have any permissions on the table?
Look, I try get more info because I think it is matter of user's permission
or something wrong with a connection.
"Mark Evans via SQLMonster.com" <forum@.SQLMonster.com> wrote in message
news:ca8ffd6abbee4d229dfca4252a329070@.SQLMonster.c om...
> Yes, within enterprise manager... security / logins, or do you mean as a
windows nt user?
> --
> Message posted via http://www.sqlmonster.com
|||yes, this user has access to the relevant database and all admin roles are ticked.
is there anything within sql server that i need to alter to allow remote connections via dts import / export?
Message posted via http://www.sqlmonster.com
|||Unless you have correctly configured for Kerberos Delegation in the Active
Directory, you will have to create a SQL Server Authenticated login account
on the destination SQL Server to use, not the Windows Account. Also, the
destination SQL Server will have to be configured for mixed-mode
authentication.
Check with your DBA/AD Admin about the current configurations.
Sincerely,
Anthony Thomas

"Mark Evans via SQLMonster.com" <forum@.SQLMonster.com> wrote in message
news:8aeb166002c84fa382c7595cae5484b7@.SQLMonster.c om...
Im having trouble trying to export data from one sql server instance to
another on a separate server.
i choose 'sql server authentication' as the option for destination but my
username / password is not accepted. user failed error. i presume this would
be a username / password within the 'security/logins' of the destination
server? i have access to this server so know the username / password is set
up in there.
why is this not working? i have also tried an import from the destination
server, but this creates the same login failed error.
how can i connect between these 2 servers and run this export?
Message posted via http://www.sqlmonster.com
|||it is configured for mixed mode authentication already.
in security there is a 'start and run sql server in the following account' option that has a username and password entered.
is this what you mean by a SQL Server Authenticated login account?
Message posted via http://www.sqlmonster.com

dts import/export problems

Im having trouble trying to export data from one sql server instance to anot
her on a separate server.
i choose 'sql server authentication' as the option for destination but my us
ername / password is not accepted. user failed error. i presume this would b
e a username / password within the 'security/logins' of the destination serv
er? i have access to this s
erver so know the username / password is set up in there.
why is this not working? i have also tried an import from the destination se
rver, but this creates the same login failed error.
how can i connect between these 2 servers and run this export?
Message posted via http://www.droptable.comyes, this user has access to the relevant database and all admin roles are t
icked.
is there anything within sql server that i need to alter to allow remote con
nections via dts import / export?
Message posted via http://www.droptable.com|||Unless you have correctly configured for Kerberos Delegation in the Active
Directory, you will have to create a SQL Server Authenticated login account
on the destination SQL Server to use, not the Windows Account. Also, the
destination SQL Server will have to be configured for mixed-mode
authentication.
Check with your DBA/AD Admin about the current configurations.
Sincerely,
Anthony Thomas
"Mark Evans via droptable.com" <forum@.droptable.com> wrote in message
news:8aeb166002c84fa382c7595cae5484b7@.SQ
droptable.com...
Im having trouble trying to export data from one sql server instance to
another on a separate server.
i choose 'sql server authentication' as the option for destination but my
username / password is not accepted. user failed error. i presume this would
be a username / password within the 'security/logins' of the destination
server? i have access to this server so know the username / password is set
up in there.
why is this not working? i have also tried an import from the destination
server, but this creates the same login failed error.
how can i connect between these 2 servers and run this export?
Message posted via http://www.droptable.com|||it is configured for mixed mode authentication already.
in security there is a 'start and run sql server in the following account' o
ption that has a username and password entered.
is this what you mean by a SQL Server Authenticated login account?
Message posted via http://www.droptable.com|||Mark
What is amount of data you are moving?
Have a look at BACKUP/RESTORE commands.
Have you specified an output file to see what is exactly the error?
"Mark Evans via droptable.com" <forum@.droptable.com> wrote in message
news:8aeb166002c84fa382c7595cae5484b7@.SQ
droptable.com...
> Im having trouble trying to export data from one sql server instance to
another on a separate server.
> i choose 'sql server authentication' as the option for destination but my
username / password is not accepted. user failed error. i presume this would
be a username / password within the 'security/logins' of the destination
server? i have access to this server so know the username / password is set
up in there.
> why is this not working? i have also tried an import from the destination
server, but this creates the same login failed error.
> how can i connect between these 2 servers and run this export?
> --
> Message posted via http://www.droptable.com|||im only moving a table with about 150 entries, hence trying to selectively e
xport this table rather than backup / restore the whole database, which i wo
uld rather not do as im unsure the data in every table has been kept up to d
ate.
not sure what you mean by output file but error i get when i click on refres
h is -
Error Description: Login failed for user 'EVANSM'
Context: Error during initialization of the provider.
i presume that when i click refresh the login should be verified and i can s
elect the server / database names from the dropdowns?
Message posted via http://www.droptable.com|||Mark
Does this user have login on desination server, does he/she exist there?
"Mark Evans via droptable.com" <forum@.droptable.com> wrote in message
news:663fad94a4154d2dbd1d79e600338f64@.SQ
droptable.com...
> im only moving a table with about 150 entries, hence trying to selectively
export this table rather than backup / restore the whole database, which i
would rather not do as im unsure the data in every table has been kept up to
date.
> not sure what you mean by output file but error i get when i click on
refresh is -
> Error Description: Login failed for user 'EVANSM'
> Context: Error during initialization of the provider.
> i presume that when i click refresh the login should be verified and i can
select the server / database names from the dropdowns?
> --
> Message posted via http://www.droptable.com|||Yes, within enterprise manager... security / logins, or do you mean as a win
dows nt user?
Message posted via http://www.droptable.com|||Does the user have any permissions on the table?
Look, I try get more info because I think it is matter of user's permission
or something wrong with a connection.
"Mark Evans via droptable.com" <forum@.droptable.com> wrote in message
news:ca8ffd6abbee4d229dfca4252a329070@.SQ
droptable.com...
> Yes, within enterprise manager... security / logins, or do you mean as a
windows nt user?
> --
> Message posted via http://www.droptable.com