I have installed SQL Server 2005 Express. I am having trouble understanding
how to connect up with the AdventureWorksDB. Looking at the online book, I
found these instructions:
1) Open the command prompt on the server.
2) From the command prompt, connect to an instance of SQL Server by using
the following sqlcmd command:
sqlcmd -S Server\Instance
Where Server is the name of the computer and Instance is the name of the
instance.
These instructions assume you have some previous knowledge.
1) I am assuming that you are in the SQL Server Management Express Console.
2) How do you open the command prompt? Or where is it?
3) The "sqlcmd -S Server\Instance" instruction. I looked at the SQL Server
Service Manager and I believe I have the right information for my
installation: Server = NGT\SQLEXPRESS and Instance = SQL Server which came
from the Services:.
If this is not correct, what name do I use for the Server and Instance?
After I run this command, what will the results be and how will I know they
have run correctly?
I believe I can follow the remaining instructions if I can get past this part.
Thank you for your help.
Regards,
--
SailFLYou get a command prompt by going to Start->Run and typing CMD. From that,
you run SQLCMD. From what you have given us, try:
SQLCMD -S NGT\SQLEXPRESS
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"SailFL" <SailFL@.discussions.microsoft.com> wrote in message
news:28954F43-0CBC-42FC-B7BC-B14C3E67BC83@.microsoft.com...
I have installed SQL Server 2005 Express. I am having trouble understanding
how to connect up with the AdventureWorksDB. Looking at the online book, I
found these instructions:
1) Open the command prompt on the server.
2) From the command prompt, connect to an instance of SQL Server by using
the following sqlcmd command:
sqlcmd -S Server\Instance
Where Server is the name of the computer and Instance is the name of the
instance.
These instructions assume you have some previous knowledge.
1) I am assuming that you are in the SQL Server Management Express Console.
2) How do you open the command prompt? Or where is it?
3) The "sqlcmd -S Server\Instance" instruction. I looked at the SQL Server
Service Manager and I believe I have the right information for my
installation: Server = NGT\SQLEXPRESS and Instance = SQL Server which came
from the Services:.
If this is not correct, what name do I use for the Server and Instance?
After I run this command, what will the results be and how will I know they
have run correctly?
I believe I can follow the remaining instructions if I can get past this
part.
Thank you for your help.
Regards,
SailFL|||SQLCMD can be issued from the commadn prompt of Windows, so
Start->Run->cmd
int he doscommand you can type in e.g.
sqlcmd.exe -S NGT\SQLEXPRESS -E
-Whereas NGT is the servername and SQLEXPRESS the instancename
-E if you are using Trusted authentication to connect to the database
server.
You can test the successfull connection therefore that you get no error
are issue a Select command to any table:
USE AdventureWorks
GO
SELECT * from Person.Contact
GO
--or simpler
SELECT 1
GO
HTH, jens Suessmeyer.|||Thank both you for your assistance.
I was able to use the commands and to attach the AdventureWorks Database to
my SQL server.
--
SailFL
"Jens" wrote:
> SQLCMD can be issued from the commadn prompt of Windows, so
> Start->Run->cmd
> int he doscommand you can type in e.g.
> sqlcmd.exe -S NGT\SQLEXPRESS -E
> -Whereas NGT is the servername and SQLEXPRESS the instancename
> -E if you are using Trusted authentication to connect to the database
> server.
> You can test the successfull connection therefore that you get no error
> are issue a Select command to any table:
> USE AdventureWorks
> GO
> SELECT * from Person.Contact
> GO
> --or simpler
> SELECT 1
> GO
>
> HTH, jens Suessmeyer.
>
No comments:
Post a Comment