Sunday, January 29, 2012

how to connect to sql server two database at a time

you can connect sql sever two database at a time within one connection establish...

please use
"ServerName.dbo.DatabaseName" when you select, insert,update, delete table for connect any other server within single connection establish.

like ...

you are connected to MASTER server but from this connection you want to open an table which is currently under in "STUDENT" database, then use following way

select * from STUDENT.dbo.result;

No comments: