Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 .NET Inside SQL Server (2005)
 How to test database connection?

Author  Topic 

malik999
Starting Member

6 Posts

Posted - 2010-05-05 : 15:09:21
I have installed SQL express and setup a database and user.

I need to test the connection is working before i give the details to the customer.

Does anyone know of a free utility for connecting to a sql express database?. so i can test the connection and that they have privileges for creating tables and loading data.

many thanks

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-05-05 : 15:42:27
Is the user a SQL user or a Windows user? If it's a SQL user, then you can just login with their credentials.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

DBA in the making
Aged Yak Warrior

638 Posts

Posted - 2010-05-05 : 16:32:28
There's a utility built into windows that will test SQL connections. Here's a simple way to use it.

Create an empty file called anything.udl and double click on it. Click the Provider tab, and select "Microsoft OLE DB Provider for SQL Server". Then click the connection tab, populate your connection details, and hit the "Test Connection" button.

------------------------------------------------------------------------------------
Any and all code contained within this post comes with a 100% money back guarantee.
Go to Top of Page

malik999
Starting Member

6 Posts

Posted - 2010-07-10 : 23:40:41
tkizer - I set them up as a sql user. what is the best utility to use to test the login remotely?
dba - I created the file thanks. When i open the file I cannot see where to enter the ip address.

Would appreciate any advice.
Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2010-07-11 : 02:31:33
You can install sqlcmd - and test the connection remotely. It's a utility that comes with the sql server installation.
From the command line it would be : sqlcmd -U myName -P myPassword -S theservername\instance


Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page

malik999
Starting Member

6 Posts

Posted - 2010-07-20 : 09:45:17
Ok i must be missing something here.

For mysql we use sqlyog or mysql control centre to connect remotely and create tables etc.

Is there not something similar for sql express?. I cannot find any GUI utility/software for connecting to the db.

On the remote client PC I have now installed sql server 2008 management studio which I hoped would have tools for connecting but i don't see anything.
Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2010-07-21 : 03:56:45
Check: http://msdn.microsoft.com/en-gb/express/bb410792.aspx

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page

malik999
Starting Member

6 Posts

Posted - 2010-07-21 : 13:08:39
i give up :/

If anyone knows how to enter the server address into DBA's .udl example please do let me know. Never expected finding a GUI software/utility to create a table in sql would be so difficult :).
thanks
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-07-21 : 13:35:05
The UDL is just to test the connection. It is not to create a table. To create a table via a GUI, you would use Management Studio Express.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

malik999
Starting Member

6 Posts

Posted - 2010-07-21 : 16:17:41
thanks tkizer. using Management Studio Express worked.

Question
1) when the user logs in they are able to see all databases.
Since they only have permission for 1 shouldnt the rest automatically be hidden?

2) Which of these 2 membership roles would you opt for in a production environment to give to users. They need to be able to create tables so my options appear to be either setting them as
db_accessadmin or db_ddladmin

tia

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-07-21 : 16:19:31
1) They won't have access to the other databases, but they can see the names.
2) I'd suggest db_owner actually so that they can create dbo objects. But it really depends on your requirements. We don't allow users to create objects in production, we don't even allow direct table access. Instead we only grant access through stored procedures.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

maha22
Starting Member

1 Post

Posted - 2010-08-07 : 04:18:00
Hi,
I have a major university project to do over christmas using PHP. I have installed WAMP and am trying to pull back using SQL some data as a test, BUT I can't connect to the database. WAMP itself doesnt ask for a login or username so am not sure whether I have one or what it would be to put into the connection string! If anyone can help it would be apprecaited as once I have it done once I should be ok. Someone did suggest using ("localhost", "e_novative", "e_novative") but this just throws up a conenction error.
================

Go to Top of Page
   

- Advertisement -