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
 General SQL Server Forums
 New to SQL Server Programming
 Can't connect to sql2005 on my local machine

Author  Topic 

sql777
Constraint Violating Yak Guru

314 Posts

Posted - 2007-11-22 : 14:52:49
hello,

Sql server type: database engine
server name:
authentication: sql server authentication
login: sa
password: xxxxx


I remember the server name being sqlexpress (I think that was the default name during the install).

OR are they asking for my computer name? because I tried that also and it gave me an error saying "the default installation doesn't allow remote connections"

sql777
Constraint Violating Yak Guru

314 Posts

Posted - 2007-11-22 : 16:06:47
anyone have any ideas? i can believe I can get into management studios! arghh!

is it my dell laptop? (joking)
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-11-22 : 16:20:05
You have to enable remote connection in sql server configuration manager and start sql server browser service on the server.
Go to Top of Page

mariocatch
Starting Member

1 Post

Posted - 2007-11-22 : 20:08:39
[code]
/// <summary>
/// Connects to a server/db.
/// </summary>
/// <param name="dataBase">The DB to connect to.</param>
/// <returns>A SqlConnection object containing the connection string information.</returns>
private SqlConnection SQLConnect(String dataBase)
{
SqlConnection _SqlConnect;
return (_SqlConnect = new SqlConnection(@"server=(local)\sqlexpress;Integrated Security=True;Database=" + dataBase));
}
[/code]
Go to Top of Page

sql777
Constraint Violating Yak Guru

314 Posts

Posted - 2007-11-23 : 11:37:51
rmio,

I have sqlserver2005 on my desktop computer and it worked just on the default installation i.e. I didn't have to go and enable remote connection and start the brower service.

Did they change things recently?
Go to Top of Page

sql777
Constraint Violating Yak Guru

314 Posts

Posted - 2007-11-23 : 11:39:19
BTW I am not even connecting remotely!

I just want to view the database using management studio, and sqlserver is installed on my local machine!
Go to Top of Page

sql777
Constraint Violating Yak Guru

314 Posts

Posted - 2007-11-23 : 11:41:14
ok computername\sqlexpress did the trick!

thanks for both of your replies!
Go to Top of Page
   

- Advertisement -