Reputation: 2180
I am trying to use a Database in SQL Azure. I have installed SQL Server 2008. I can Login SQL Azure and can use master Database. But I can't use other Database and I can't see any things in my object explorer. It shows this error:
"USE statement is not supported to switch between databases. Use a new connection to connect to a different Database."
How can I use another database?
Upvotes: 17
Views: 24430
Reputation: 1
Posting incase anyone else runs into this i had to wrap the DB name in []
so
USE [DBNAMEHERE]
instead of
USE DBNAMEHERE
Upvotes: -3
Reputation: 15
You can first create only the database before running the whole script to create schemas & Tables.
Then manually change the database to the new DB that was created.
Run the rest of the script. Do not run Use <databasename>
Upvotes: -1
Reputation: 2180
I found the Solution for this problem . I install SQL Server 2008 R2
. then every thing is ok...
Upvotes: 6
Reputation: 71031
You cannot link to another database server from SQL Azure, whether that other database is SQL Server or SQL Azure.
Upvotes: 8