Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

OSQL Not listing All databases Expand / Collapse
Author
Message
Posted Wednesday, April 16, 2014 1:21 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, November 24, 2016 10:31 PM
Points: 368, Visits: 1,267
Hi,
When i tried to use my database it is saying as
cannot open database requested in login login fails
when i login without database name it alows me to login and when i issue the
use mydb_name
go
Could not locate entry in sysdatabases for database 'mydb_name'. No entry
found with that name. Make sure that the name is entered correctly.

when i see in sysobjects in osql mydatabase is not listed.
where as in query analysier it is listed
how to resolve this ?
Post #1562151
Posted Wednesday, April 16, 2014 3:25 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Thursday, March 17, 2016 5:13 AM
Points: 2,796, Visits: 2,232
Looks like permission issue. Do you have permission to access this database?

---------------------------------------------------
"Thare are only 10 types of people in the world:
Those who understand binary, and those who don't."
Post #1562200
Posted Thursday, April 17, 2014 1:37 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, November 24, 2016 10:31 PM
Points: 368, Visits: 1,267
Yes i am accessing the database via Enterprise manager and Query analysier.
Post #1562540
Posted Thursday, April 17, 2014 2:50 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 8:49 AM
Points: 7,030, Visits: 14,716
How are you connecting to Enterprise Manager and Query Analyzer? Please will you post the command you use to invoke OSQL?

John
Post #1562550
Posted Thursday, April 17, 2014 2:52 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Tuesday, October 18, 2016 4:15 PM
Points: 949, Visits: 1,884
If you can connect without specifying the dbname what result do get from the following query:

SELECT name FROM sysdatabases ORDER BY name;
GO



Joie Andrew
"Since 1982"
Post #1562551
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse