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.

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 Cross Database Access

Author  Topic 

olibara
Yak Posting Veteran

94 Posts

Posted - 2010-12-14 : 03:14:57
Hello

Hello I'm trying to figure out the reason why sometime Management studio use another database tha the one I'm working on
I have severall DataBase on my Sql server.
I have the rights on all database
Let say that I have DB1, DB2, DB3 and of course Master

Now I'm working on DB3 and I do a

Select * into TBX from TB2
The newly created table is in DB1 but not DB3
Of course I can explicitely target DB3
But how doest it comes that MNG studio do the select in one DB and the create in another ?

Thank for any help

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-12-14 : 04:39:03
Each query window in SSMS has an active database which you can see (or change) on the left upper side in the drop down box.
The newly created table will always be created there.
I've never seen another behaviour.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

olibara
Yak Posting Veteran

94 Posts

Posted - 2010-12-14 : 08:02:16
Thank you
Go to Top of Page
   

- Advertisement -