Msg 911, Level 16, State 1, Line 1 Database 'databasename' does not exist. Make sure that the name is entered correctly.
-
mardi 1 mai 2012 12:00
Dear All,
Would anyone be able to let me know how to resolve the following error message please?
Msg 911, Level 16, State 1, Line 1
Database 'databasename' does not exist. Make sure that the name is entered correctly.
Thank you in advance!
Toutes les réponses
-
mardi 1 mai 2012 12:03
You could create a database called 'databasename'.. :)
How are you generating the error? You can query sys.databases for a list of databases on the server. Check that it exists and troubleshoot from there..
Thanks,
Andrew Bainbridge
SQL Server DBA
Please click "Propose As Answer" if a post solves your problem, or "Vote As Helpful" if a post has been useful to you -
mardi 1 mai 2012 12:12
Please do like this:
SSMS -> Queries ->SQLCMD must be enabled before running the deployment script in SSMS.
Nagendra
- Modifié Nagendra Nandigam mardi 1 mai 2012 12:13
-
mardi 1 mai 2012 12:21
Would anyone be able to let me know how to resolve the following error message please?
Read the message!
Seriously, if you are puzzled by this error message and does not understand it, you need to give us the context.
Either the database you thought existed has been wiped out. Or, as the message suggests, you have not spelled the database name correctly.
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se -
mardi 1 mai 2012 13:19
Thank you for your reply!
The database does exist that is why I'm confused. I've run sys.databases to see if it exists and what state it is in and everything seems to be fine.
Thank you!
- Modifié ti2 mardi 1 mai 2012 13:19
-
mardi 1 mai 2012 13:22Modérateur
It probably means permission issue. Where this error comes from and how do you check for that database name?
Can you post relevant code and try that code in SSMS but log using the same credentials as your application is using.
For every expert, there is an equal and opposite expert. - Becker's Law
My blog- Marqué comme réponse Iric WenModerator lundi 14 mai 2012 07:13
-
mardi 1 mai 2012 15:41
Dear All,
Would anyone be able to let me know how to resolve the following error message please?
Msg 911, Level 16, State 1, Line 1
Database 'databasename' does not exist. Make sure that the name is entered correctly.
Thank you in advance!
when and how are you getting this error message ? (what did you when you got this message)
are you using sqlcmd, SSMS, Visual Studio, other app etc. ? please give as more details to allow help you
Please use Mark as Answer if my post solved your problem and use Vote As Helpful if a post was useful.
-
mardi 1 mai 2012 16:04
Are you in the correct server instance?
-
mardi 1 mai 2012 16:15
Copy and paste the name from the output of sys.databases and try again!
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se- Proposé comme réponse Iric WenModerator lundi 14 mai 2012 07:13
-
mercredi 31 octobre 2012 15:27
I had the same error and issue. What I discovered is that my query "screen" was related to a different database. Right-Click on the database you want to use and then select "New Query" from the dropdown list. Your query should work in the new window. SQL Management Studio has always worked like this but it's hard to tell because the Query tab does not display the full database text/context so you cannot see what DB the query is tied/attached to. Let me know if this works for you.- Proposé comme réponse FocusPointe Tech mercredi 31 octobre 2012 15:30

