April 1, 2009 at 10:25 am
Hi everyone,
I'm new to sqlservercentral, and new to sql server, so don't beat me up too much! Here's my situation, I hope you can assist. I'm new to the environment I'm in, and as usual, my predecessor didn't provide much if any documentation ;-). I'm running wsus on this server, and I need to connect to our sql database to look at a few tables. I don't actually know how to connect, nor do I have the username/password. I am however an admin with admin privileges, so there should be a workaround there.
This is what I know...
Server is running WSUS
The following apps are installed:
Start/Programs/MS Sql Server 2005/ConfigurationTools/SqlSrvrConfig Manager;
SqlSrvr Error & Usage Reporting;
SQL Server Surface Area Config
Via windows explorer on the server I have the following directories: c:\Program Files MS Sql Srvr/80 and 90 directories
Can anyone assist in getting me connected to the database? Any assistance would be greatly appreciated.
thanks!:-D
April 1, 2009 at 10:33 am
Hi
Do you find the following tool:
Start -> All Programs -> Microsoft SQL Server 2005 -> SQL Server Management Studio
??
If yes, start it and a new connection dialog should appear automatically. If not select Menu -> File -> Connect Object Explorer Engine...
As Server Name enter: (local)
... with the braces.
As Authentication select: Windows Authentication
Press "Connect". If you are Admin you should be connected.
Greets
Flo
April 1, 2009 at 10:40 am
Hi Flo,
Thank you for your response. No, unfortunately SQL Server Management Studio is not present, only the Config Manager, Error & Usage Reporting, and Surface Area Config. Strange right? Any other suggestions?
April 1, 2009 at 10:49 am
Hi Mike
So the hard way (for now)...
Open command shell. Enter:
C:\> sqlcmd -S (local) -E
... and press enter. Now you should be connected.
With the following two lines you can see which databases are available:
1> select name from sys.databases
2> go
With this two lines you can change your current database:
1> use AnyDbName
2> go
With this two lines you can see which tables are available:
1> SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
2> go
I would strongly advice you to get a GUI interface like SQL Server Management Studio or Studio for Express Edition (this should be free) or any other GUI tool.
Greets
Flo
April 1, 2009 at 11:55 am
Flo,
You Rock! Thank you so much for your detailed instructions. I did run into an issue in connecting via command prompt: Have you seen this before?
HResult 0x2, Level 16, State 1
Microsoft SQL Native Client : An error has occurred while establishing a connnection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server doesn't allow remote connections:
Sqlcmd: Error: Microsoft SQL Native Client: Login timeout expired.
Thank you again, I really appreciate all of your assistance!!
April 1, 2009 at 12:01 pm
Hi Mike
So let's keep on rocking... 😛
Start -> All Programs -> Microsoft SQL Server 2005 -> Configuration Tools -> Configuration Manager
On left hand select "SQL Server Services"
In detail view on right hand you see "SQL Server (MSSQLSERVER)". Ensure that it is started. If not right click and start.
Greets
Flo
April 1, 2009 at 12:08 pm
Just like Forrest Gump, it was running...
April 1, 2009 at 12:16 pm
Well... strange.
In the braces behind the "SQL Server" is there exactly the "MSSQLSERVER" or something else?
In Configuration Manager please expand "SQL Server Network Configuration" in tree and select "Protocols for MSSQLSERVER" and please tell me which protocols are available and which are enabled.
Greets
Flo
April 1, 2009 at 12:58 pm
In the left pane at the very top it reads SQL Server Configuration Manager (Local). Under SQL Server 2005 Services, but in the right pain, it says SQL Server (SQLEXPRESS) State is Running Start Mode is Automatic
I expanded SQL Server 2005 network Configuration/Protools for SQLExpress, and the following protocols all have a status of Enabled: Shared Memory, Named Pipes, TCP/IP, and Via. I hope this information helps.
Thanks,
Mike
April 1, 2009 at 1:07 pm
Yes, this helps! 🙂
You have SQL Server Express and you have a named instance of SQL Server with name "SQLEXPRESS"
So go back to my command line steps and replace the first part
C:\> sqlcmd -S (local) -E
with this
C:\> sqlcmd -S YourPcName\SQLEXPRESS -E
Now you should get your connection and can follow the other steps.
Greets
Flo
April 1, 2009 at 1:55 pm
Flo,
I can't thank you enough. I had a little trouble, banged my head a few times, and then realized that I had to type the word "use" and then the database, rather than just the db name. Thank you so much for your assistance!!!!
Just to summarize, even though Start/Programs has Microsoft SQL Server 2005 listed, I'm running SQL Server Express with an instance named SQLExpress? I guess they did that to save some money?
And if so, is it safe to install SQL Server Management Studio or SQL Server for Express Edition, while I currently have these databases running? I wouldn't want them to overwrite my current databases.
Again, Thank you so much for your assistance!!! You're the best!
April 1, 2009 at 2:08 pm
Hi Mike
I can't thank you enough. I had a little trouble, banged my head a few times, and then realized that I had to type the word "use" and then the database, rather than just the db name. Thank you so much for your assistance!!!!
All beginnings are difficult ;-). If you have any problems you can always come back here. There are always many people that will help!
Just to summarize, even though Start/Programs has Microsoft SQL Server 2005 listed, I'm running SQL Server Express with an instance named SQLExpress? I guess they did that to save some money?
Yes. The Express Edition is free of charge. But it might be okay. This depends on the requirements in your environment.
And if so, is it safe to install SQL Server Management Studio or SQL Server for Express Edition, while I currently have these databases running? I wouldn't want them to overwrite my current databases.
If the Express Edition can handle your requirements I would strongly recommend to install the Management Studio Express from here.
If you need to upgrade to SQL Server this should be no problem to install beside your current database server. First you should have a look for the system requirements here.
Again, Thank you so much for your assistance!!! You're the best!
You are welcome! Maybe see you soon here. Now it's time for finish here...
Greets
Flo
Viewing 12 posts - 1 through 12 (of 12 total)
You must be logged in to reply to this topic. Login to reply