connecting sql server

  • Thread starter Thread starter Hari Prasad
  • Start date Start date
H

Hari Prasad

Hi,

It seems the database creator/owner might be some other user.

Execute the below command to check the database owner:-

sp_helpdb 'XYZ_Database'

If the owner is a non SA user , then change the database owner using:-

sp_changedbowner system procedure (Refer books online for information)

Thanks
Hari
MCDBA
 
i created a database, when i query a simple select statement , i get an
error:

"Cannot open database requested in login 'XYZ_Database'.
Login fails, Login failed for user 'sa''


But when i change , the database name to Northwind, it works.

i checked that user rights of 'sa' for XYZ_database and Northwind are the
same?

i get the same error, when i used integrated security to connect too.

what would be the case here?
 
Hari;

user of the database seems to be sa; here is the properties of the database:

"XYZ_database 3.00 MB sa 7 Jun 21 2004 Status=ONLINE,

Updateability=READ_WRITE, UserAccess=MULTI_USER, Recovery=FULL,

Version=539, Collation=Latin1_General_CI_AS, SQLSortOrder=0,

IsTornPageDetectionEnabled, IsAutoCreateStatistics, IsAutoUpdateStatistics
80"

what else can be the problem?
 
Back
Top