Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
sqllearner
Aged Yak Warrior
639 Posts |
Posted - 2005-09-07 : 15:49:38
|
I have a issue where 2 databases are in different servers :- server1 and server2server1 database 1table- tbl_emp_accounts (request_id,emp_id,emp_name) tbl_emp_charges (charge_id,request_id,late_charge,suspense)server2database2table-tbl_emp_details(reff_id,emp_id,emp_name)tbl_emp_charges (reff_id,late_charge,suspense)Everey day a dts should run in the evening at 9:00 in the night where it gets the new emp_id's and emp_name from server1 (tbl_emp_accounts)to server2(tbl_emp_details).It should also get the corresponding late charges and suspense also.How should I start with...Should I use DTS Lookup or pump the data into server2 one table and use stored procedure to insert it.Please help me with that..The recommendation inn the project is to direct dump using necessary checksPLease somebody help me with this |
|
sqllearner
Aged Yak Warrior
639 Posts |
Posted - 2005-09-09 : 13:47:39
|
Please somebody help me with this |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-09-09 : 13:50:30
|
Can you use a linked server? I ask because this is trivial with a linked server since all of your data is in SQL Server already. If you can't, then you should import all of the data that you need on server1 into server2. Put the data in staging tables which are exact duplicates of the structure from server1. Then use an execute SQL task to run T-SQL that will move the data where you want it on server2.Tara |
 |
|
sqllearner
Aged Yak Warrior
639 Posts |
Posted - 2005-09-13 : 01:09:14
|
I can't use linked server and if possible I should avoid staging tables to update information.Is there any way i can Vb scripts and check validation and then update the details |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-09-13 : 12:29:49
|
Doing this through VBScript is going to be slow, but yes it can be done. It is not recommended though. I can't help you with the details of the VBScript as that isn't my area of expertise. Most everyone here would be able to help you out with the staging table version though, especially since it's the preferred method.Tara |
 |
|
|
|
|
|
|