Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Cannot gain access to database

2 views
Skip to first unread message

safinaazmoon

unread,
Nov 11, 2009, 10:39:49 PM11/11/09
to
Hi,
I have the following installed on my machine:
OS - Vista Ultimate
Visual Studio Pro 2008 with SP1
.NET Framework 3.5 + SP1
SQL Server Developer Edition 2005
SQL Management Studio Express
SQL Client Install Wizard
IIS 7

I created the 'sa' account with a password.
I went to SQL Management Studio Express and under Object Explorer I see the following items only:
Database Icon BLUE-PC\SQLEXPRESS(SQL SERVER 9.0.4053 - blue-PC\blue)
5 folder under the above icon (Databases, Security, Server Objects, Replication and Management)
In the Databases, I created a new database 'videodb' and added some tables to this database.

Problem: How to add data to these tables? How to gain access to this db through command prompt?
When I go to command prompt this is what I get:

C:\Program Files\Microsoft SQL Server\90\NotificationServices\9.0.242\Bin>sqlcmd
1> use video
2> go
Msg 911, Level 16, State 1, Server BLUE-PC, Line 1
Could not locate entry in sysdatabases for database 'video'. No entry found with
that name. Make sure that the name is entered correctly.

Any help I get would be great. I have gone through numerous forums and none have been helpful.

EggHeadCafe - Software Developer Portal of Choice
How to Make Windows 7 Lean and Mean
http://www.eggheadcafe.com/tutorials/aspnet/69610eb9-5429-48d8-a00a-e0547fd30ff4/how-to-make-windows-7-lea.aspx

Erland Sommarskog

unread,
Nov 12, 2009, 4:56:15 AM11/12/09
to
(Safinaaz Moon) writes:
> Database Icon BLUE-PC\SQLEXPRESS(SQL SERVER 9.0.4053 - blue-PC\blue) 5
> folder under the above icon (Databases, Security, Server Objects,
> Replication and Management) In the Databases, I created a new database
> 'videodb' and added some tables to this database.
>
> Problem: How to add data to these tables? How to gain access to this db
> through command prompt?
> When I go to command prompt this is what I get:
>
> C:\Program Files\Microsoft SQL
> Server\90\NotificationServices\9.0.242\Bin>sqlcmd
> 1> use video
> 2> go
> Msg 911, Level 16, State 1, Server BLUE-PC, Line 1
> Could not locate entry in sysdatabases for database 'video'. No entry
> found with that name. Make sure that the name is entered correctly.

It seems that you have two instance of SQL Server on your machine, one
Developer Edition and one Express Edition. I also get the impression that
you created the database in your Express instance, but you did not specify
any instance name when you connected with SQLCMD, which means that you
connect to your default instance, which is Developer Edition.

You need to specify the instance with -S:

SQLCMD -S .\SQLEXPRESS

Also, you say that the database was called "videodb", but you tried to
connect to a database "video".

--
Erland Sommarskog, SQL Server MVP, esq...@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

0 new messages