May 1, 2012 at 6:02 am
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!
May 1, 2012 at 6:04 am
A bit more information would be helpful such as the background in which this error occurred.
We can only help with the information presented to us.
:exclamation: "Be brave. Take risks. Nothing can substitute experience." :exclamation:
May 1, 2012 at 6:11 am
tt-615680 (5/1/2012)
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!
Try replacing 'databasename' with whatever your database is actually called, in whatever code it was that you may or may not have executed, using whatever application, tool or utility it was that you used.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
May 1, 2012 at 6:18 am
Phil Parkin (5/1/2012)
tt-615680 (5/1/2012)
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!
Try replacing 'databasename' with whatever your database is actually called, in whatever code it was that you may or may not have executed, using whatever application, tool or utility it was that you used.
Yea, do "WHATEVER" Phil says....lol!! 😀
March 7, 2013 at 9:16 am
I'm getting the same error however I believe it is a syntax error. I am certain the database exist. I'm attempting to change the collation of the 'CFGMGR' database in the SQL server management studio, SQLQuery window. I even tried the following:
select *
from sys.databases
where name = CFGMGR
I keep the the CFGMGR underlined in red and when I execute, I get the "Invalid column name 'cfgmgr'.
Ideas?
Lar
March 7, 2013 at 9:27 am
You are missing the quotes round the value on the name = CFGMGR.
select *
from sys.databases
where name = 'CFGMGR'
_________________________________________________________________________
SSC Guide to Posting and Best Practices
March 7, 2013 at 9:46 am
Thanks, that executes fine. However when I attempt to us the systax to change the collation, I still get the "Database 'CFGMGR' does not exist.
Use master:
Go
alter database CFGMGR
collate sql_Latin1_General1_CP1_CI_AS ;
Go
--Verify the collation settings.
select name, collation_name
From sys.databases
where name = N 'CFGMGR'
Go
March 7, 2013 at 10:00 am
Have you tried running the alter while in the database you are changing the collation?
March 7, 2013 at 10:49 am
Negative. And I would do that how?
Nevermind, I'm already there.
Thanks
March 8, 2013 at 7:35 am
To resolve the issue I simply had to find out what the Primary file was called and I eventually found out that the name of the Primary file was called the original Database name but with "_1" after it it was as simple as that.
Thank you all for you help, much appreciated!
November 27, 2015 at 10:35 am
Thank you for your reply, I'm running the following sql permission query which works fine on all other servers, the only difference is that a few of the databases have on the server which I'm running the query from have "-" in their names e.g. "database-name"
EXEC sp_MSforeachdb
'USE ?
insert into #temp
select DB_NAME() AS DatabaseName,
mp.type AS [AccountType],
mp.name as Database_user,
rp.name as DatabaseRole,
rp.type_desc AS TypeDesc
from sys.database_role_members drm
join sys.database_principals rp on (drm.role_principal_id = rp.principal_id)
join sys.database_principals mp on (drm.member_principal_id = mp.principal_id)
order by database_user
'
select
DatabaseName,
AccountType,
Database_user,
DatabaseRole,
TypeDesc
from #temp
When running the following query I'm able to get the database result without any issues:
select *
from sys.databases
where name = 'database-name'
Thank you!
November 28, 2015 at 11:39 pm
tt-615680 (11/27/2015)
Thank you for your reply, I'm running the following sql permission query which works fine on all other servers, the only difference is that a few of the databases have on the server which I'm running the query from have "-" in their names e.g. "database-name"EXEC sp_MSforeachdb
'USE ?
insert into #temp
select DB_NAME() AS DatabaseName,
mp.type AS [AccountType],
mp.name as Database_user,
rp.name as DatabaseRole,
rp.type_desc AS TypeDesc
from sys.database_role_members drm
join sys.database_principals rp on (drm.role_principal_id = rp.principal_id)
join sys.database_principals mp on (drm.member_principal_id = mp.principal_id)
order by database_user
'
select
DatabaseName,
AccountType,
Database_user,
DatabaseRole,
TypeDesc
from #temp
When running the following query I'm able to get the database result without any issues:
select *
from sys.databases
where name = 'database-name'
Thank you!
Databases with a - in the name need to be surrounded with square brackets [], [database-name].
November 29, 2015 at 9:31 am
Lynn Pettis (11/28/2015)
tt-615680 (11/27/2015)
Thank you for your reply, I'm running the following sql permission query which works fine on all other servers, the only difference is that a few of the databases have on the server which I'm running the query from have "-" in their names e.g. "database-name"EXEC sp_MSforeachdb
'USE ?
insert into #temp
select DB_NAME() AS DatabaseName,
mp.type AS [AccountType],
mp.name as Database_user,
rp.name as DatabaseRole,
rp.type_desc AS TypeDesc
from sys.database_role_members drm
join sys.database_principals rp on (drm.role_principal_id = rp.principal_id)
join sys.database_principals mp on (drm.member_principal_id = mp.principal_id)
order by database_user
'
select
DatabaseName,
AccountType,
Database_user,
DatabaseRole,
TypeDesc
from #temp
When running the following query I'm able to get the database result without any issues:
select *
from sys.databases
where name = 'database-name'
Thank you!
Databases with a - in the name need to be surrounded with square brackets [], [database-name].
This means you should enclose all your database names in square brackets or use the QUOTENAME function around them.
November 29, 2015 at 10:34 pm
tt-615680 (5/1/2012)
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!
It probably means permission issue. Where this error comes from and how do you check for that database name?
Viewing 15 posts - 1 through 14 (of 14 total)
You must be logged in to reply to this topic. Login to reply