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 2008 Forums
 SQL Server Administration (2008)
 login in sqlexpress 2008r2 local db frm another pc

Author  Topic 

solarissf
Starting Member

4 Posts

Posted - 2012-08-02 : 15:39:59
Good Morning All,

I have been researching this for awhile now and maybe someone can point out what I am missing. First off I have created a local database with name SQL Server (SQLEXPRESS), with a couple of tables.

My goal is for another computer on the network to access this database.
So far I have taken the following steps.

1. From the remote computer, I have mapped a drive to source of the database on my main (host) pc. Z:\MSSQL\DATA. Now, from the remote computer I can physically see the database tempDB.mdf in the folder.
2. On the host computer, in configuration manager, I have enabled TCP/IP, and restarted service.
3. On host computer, logged into database using sql server management studio, I have made sure the checkbox is checked for ALLOW REMOTE CONNECTIONS TO THE SERVER, and SERVER AUTHENTICATION = SQL SERVER AND WINDOWS AUTHENTICATION MODE
4. On host, I went into TCP/IP settings and added TCP PORT to 1433. (dont know why,Also, just to test, from remote pc, I was successfully able to PING (IP address of host). not sure if that tells you anything but I did this because I saw it online)
5. on remote I have SQL server browser RUNNING in automatic mode, log on as LOCALSYSTEM

Now on remote machine I launch SQL SERVER MGTM STUDIO, and no matter what options I choose I cannot log into database

please help, driving me crazy
Also, just to test, from remote pc, I was successfully able to PING (IP address of host). not sure if that tells you anything

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2012-08-02 : 15:55:31
You may already be doing this correctly, but what is the Server Name you are using from SSMS on the remote machine? It should be REMOTEHOSTNAME\SQLEXPRESS.
Go to Top of Page

solarissf
Starting Member

4 Posts

Posted - 2012-08-02 : 16:51:17
yes, I am trying
Server type = Database Engine
Server name = HOSTSERVERNAME\SQLEXPRESS
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-08-02 : 18:41:02
Please post the error.

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

Subscribe to my blog
Go to Top of Page

solarissf
Starting Member

4 Posts

Posted - 2012-08-02 : 21:02:50
sorry, its long.
I am typing NBW370W7V\SQLEXPRESS in servername
and authentication, I cam trying WINDows and SQL

any ideas.... my project is dead till i figure this out
thank you!!!



===================================

Cannot connect to NBW370W7V\SQLEXPRESS.

===================================

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (.Net SqlClient Data Provider)

------------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-1&LinkId=20476

------------------------------
Error Number: -1
Severity: 20
State: 0


------------------------------
Program Location:

at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at Microsoft.SqlServer.Management.SqlStudio.Explorer.ObjectExplorerService.ValidateConnection(UIConnectionInfo ci, IServerType server)
at Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-08-03 : 13:21:13
Here you go: http://weblogs.sqlteam.com/tarad/archive/2008/05/23/60609.aspx

The key is a telnet test using the SQL Server listening port.

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

Subscribe to my blog
Go to Top of Page

solarissf
Starting Member

4 Posts

Posted - 2012-08-03 : 14:40:40
finally got it, the trick was instead of using hostname/instance, I used "IPAddress, PORT", then it connected, no clue why that did the trick, but thanks
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-08-03 : 15:36:04
You can correct that by adding a client-side alias, which is explained in the link.

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

Subscribe to my blog
Go to Top of Page
   

- Advertisement -