Sql Server copying table information between databases
Posted
by Andrew
on Stack Overflow
See other posts from Stack Overflow
or by Andrew
Published on 2010-03-18T20:01:18Z
Indexed on
2010/03/18
20:11 UTC
Read the original article
Hit count: 332
Hi,
I have a script that I am using to copy data from a table in one database to a table in another database on the same Sql Server instance. The script works great when I am connected to the Sql Server instance as myself as I have dbo access to both databases. The problem is that this won't be the case on the client's Sql Server. They have seperate logins for each database (Sql Authentication Logins). Does anyone know if there is a way to run a script under these circumstances. The script would be doing something like.
use sourceDB
Insert targetDB.dbo.tblTest (id, test_name)
Select id, test_name from dbo.tblTest
Thanks
© Stack Overflow or respective owner