SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 .NET Inside SQL Server (2005)
 How to test database connection?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

malik999
Starting Member

6 Posts

Posted - 05/05/2010 :  15:09:21  Show Profile  Reply with Quote
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

USA
36845 Posts

Posted - 05/05/2010 :  15:42:27  Show Profile  Visit tkizer's Homepage  Reply with Quote
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 - 05/05/2010 :  16:32:28  Show Profile  Reply with Quote
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 - 07/10/2010 :  23:40:41  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

United Kingdom
2046 Posts

Posted - 07/11/2010 :  02:31:33  Show Profile  Visit jackv's Homepage  Reply with Quote
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 - 07/20/2010 :  09:45:17  Show Profile  Reply with Quote
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.

Edited by - malik999 on 07/20/2010 10:15:39
Go to Top of Page

jackv
Flowing Fount of Yak Knowledge

United Kingdom
2046 Posts

Posted - 07/21/2010 :  03:56:45  Show Profile  Visit jackv's Homepage  Reply with Quote
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 - 07/21/2010 :  13:08:39  Show Profile  Reply with Quote
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

Edited by - malik999 on 07/21/2010 16:18:09
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
36845 Posts

Posted - 07/21/2010 :  13:35:05  Show Profile  Visit tkizer's Homepage  Reply with Quote
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 - 07/21/2010 :  16:17:41  Show Profile  Reply with Quote
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


Edited by - malik999 on 07/21/2010 16:18:57
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
36845 Posts

Posted - 07/21/2010 :  16:19:31  Show Profile  Visit tkizer's Homepage  Reply with Quote
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 Posts

Posted - 08/07/2010 :  04:18:00  Show Profile  Reply with Quote
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.
================


Edited by - tkizer on 08/07/2010 12:27:01
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.14 seconds. Powered By: Snitz Forums 2000