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 |
|
Harry C
Posting Yak Master
148 Posts |
Posted - 2002-05-14 : 13:48:21
|
| I need to get data out of one DB into another through ASP. I have this so far, but I dont know where I am supposed to actually open up the connection to the DBs. Basically, I know how to do a Insert/Select, but I dont know how to do it with two different DB's, any thoughts? Thanks for takin a look |
|
|
jasper_smith
SQL Server MVP & SQLTeam MVY
846 Posts |
Posted - 2002-05-14 : 15:46:58
|
| Say you are moving data from Server 1 to Server 2Set up a linked server from Server 1 to Server 2Then from your ASP you can simply call a stored procedure that executes a cross server insert from Server1 i.e. you only need to connect to Server1 in your ASPinsert Server2.database.dbo.table1select database.dbo.table1More details on setting up linked servers and distributed queries can be found on BOL as well as on this site (probably - haven't checked)HTHJasper Smith |
 |
|
|
Harry C
Posting Yak Master
148 Posts |
Posted - 2002-05-14 : 17:00:38
|
| Thanksw Jasper, I appreciate the help... |
 |
|
|
|
|
|