Sql remote connection

Hi,
I have the sql server running on another pc. I have the host name, username, and password for it. How can I access it from another computer? What do I need to have installed on this computer?
Also, if I were to access it from java, what JDBC drivers I should have? Where do I need to install them?
Thanks.

Use the JDCB driver for SQL server. You've just got to put the JARs for the JDBC driver in your app's CLASSPATH.
M$ offers one:
http://www.microsoft.com/downloads/details.aspx?FamilyID=4f8f2f01-1ed7-4c4d-8f7b-3d47969e66ae&DisplayLang=en
jTDS is another:
http://jtds.sourceforge.net/
A Google search would have turned these up.
If you've never done JDBC before, you might want to look at this:
http://java.sun.com/docs/books/tutorial/jdbc/
MOD

Similar Messages

  • SQL Remote Connection Error 26 with pictures

    Hi.
    I am trying to connect SQL Server 2012 via internet, but I cannot. I do the following steps:
    1- I tuned up my modem settings for port forwarding to my computer: (TCP: 1433, UDP: 1434, Computer Name: TURAN, LAN IP: 192.168.1.27)
    http://i.stack.imgur.com/zsh1g.png
    2- SQL Configuration Settings:
    http://i.stack.imgur.com/hHVWt.png
    3- Protocol Settings for SQL:
    http://i.stack.imgur.com/GQfW2.png
    http://i.stack.imgur.com/letwP.png
    4- Windows Firewall Settings:
    http://i.stack.imgur.com/uFIdQ.png
    http://i.stack.imgur.com/sJmSH.png
    5- Port Check via PortQry:
    http://i.stack.imgur.com/QDxwH.png
    6- SQL Succes Login:
    http://i.stack.imgur.com/XQcaE.png
    7- SQL Failed Login:
    http://i.stack.imgur.com/k4mrs.png
    Any ideas?

    Hi alazarbaharu,
    Agree with Kiran. And  also put sqlbrowser.exe into Windows Firewall exception.
    According to your number 7 link, I got that you encountered a failure when using sa account to login in SQL Server. To troubleshoot this issue, please follow the steps below.
    1. Make sure that SQL server is in mix authentication mode. In SQL Server Management Studio Object Explorer, right-click the server, and then click Properties, on the Security page, check Server authentication. After changing the authentication mode, we
    need to restart SQL Server.
    2. Make sure the sa login is enabled in SQL Server. In Object Explorer, expand Security, expand Logins, right-click sa, and then click Properties. On the Status page, check if the sa login is enabled, and on the General page, confirm the password.
    Thanks,
    Lydia Zhang

  • 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. (p

    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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)(Microsoft SQL Server, Error: 2)
    The system cannot find the file specified
    Cannot connect to COWBOYS.
    Here are the technical details===================================
    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:
    Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476
    Error Number: 2
    Severity: 20
    State: 0
    Program Location:
       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
       at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover)
       at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover)
       at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer
    timeout)
       at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)
       at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance,
    SqlConnectionString userConnectionOptions, SessionData reconnectSessionData)
       at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
       at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
       at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
       at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
       at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
       at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
       at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
       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()
    ===================================
    The system cannot find the file specified
    I have tried from so many forms. This is so frustrating. Thank for everyone/anyone who wants to help. So this is what happened: I had to uninstall my previous sqlserver 2012(which worked great) for some reason, and I uninstalled everything from that download.
    Then I installed the trial edition of sql server 2012 (64 Bit) and It wouldn't connect to the database. (Error mentioned above.) My local DB is COWBOYS. (COWBOYS is also my computer name.) After this, I have tried downloading sqlexpress and sqlserver 64bit
    many times and cannot connect to my local DB. 
    How do I connect to my Local DB? 
    Also, I think this might help: (When I run sqlserve.exe, which I was able to find in C:\Program Files\Microsoft SQL Server\110\LocalDB\Binn, I get an error: Your SQL server installation is either corrupt or has been tampered with(Error getting
    instance ID from name). Please uninstall then re-run setup to correct this problem.
    I would happily re install it, if it wasn't my 20th time.
    I don't have any remote connections, I don't use username/password, only window authentication. I work mostly on visual studio, but without able to store /retrieve data, I don't know how to survive.
    May be the solution is very simple, but I am too frustrated. 
    Some of the things I have tried:
    From a command prompt, enter one of the following commands:
    net start "SQL Server Agent (MSSQLSERVER)" OR 
    net start "SQL Server Agent(instancename)"(for instance)
    on my sql configuration, I cannot start anything because there is nothing there to start. I can post more details, if that would help. Also, some more details about the error:
    Details
    Product:
    SQL Server
    ID:
    2
    Source:
    MSSQLServer
    Version:
    10.0
    Component:
    SQLEngine
    Message:
    An error has occurred while establishing a connection to the server. When connecting to SQL Server, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error:
    40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)
    Explanation
    SQL Server did not respond to the client request because the server is probably not started.
    User Action
    Make sure that the server is started.
    Version:
    9.0
    Component:
    SQLEngine
    Message:
    An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error:
    40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)
    Explanation
    SQL Server did not respond to the client request because the server is probably not started.
    User Action
    Make sure that the server is started.
    Any one that can help me, I will be greatful. Thank you so much. p.s. please ask me anything if you have any questions.

    It sounds like there are a couple things going on here.  First check if you have a successful install of SQL Server, then we'll figure out the connection issues.
    Can you launch SQL Server Configuration Manager and check for SQL Server (MSSQLSERVER) if default instance or SQL Server (other name) if you've configured your instance as a named instance.  Once you find this, make sure the service is started. 
    If not started, try to start it and see if it throws an error.  If you get an error, post the error message your hitting.  If the service starts, you can then launch SSMS and try to connect.  If you have a default instance, you can use the machine
    name in the connection dialog.  Ex:  "COWBOYS" where Cowboys is the machine name.  However, if you named the SQL Server instance during install, you'll need to connect using the machine\instance format.  Ex:  COWBOYS\Romo (where Romo
    is the instance name you set during install).
    You can also look at the summary.txt file in the SQL Server setup error logs to see what happened on the most recent install.  Past install history is archived in the log folder if you need to dig those up to help troubleshoot, but the most
    recent one may help get to the bottom of it if there is an issue with setup detecting a prior instance that needs to be repaired.
    Thanks,
    Sam Lester (MSFT)
    http://blogs.msdn.com/b/samlester
    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click
    "Mark as Answer" and
    "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.

  • How to Configure Remote Connections To SQL Server 2008 R2 Express

    Post written June 10, 2010 and pertains to:
    SQL Server 2008 R2 Express on both my server and local machines: SQLX_SRV,
    SQLX_LOC
    SQL Server 2008 R2 Management Studio on both my server and local machines:
    MS_SRV, MS_LOC
    Windows Server 2008 R2 Enterprise installed on a Hyper-V VPS: WS
    SQL Server Configuration Manager on both my server and local machines:
    CMGR_SRV, CMGR_LOC
    Server Manager: SMGR
    I am connecting to my hosting server via Remote Desktop Connection: RDC
    I installed SQLX_SRV and MS_SRV on my hosting server and SQLX_LOC and MS_LOC on my local development machine.  I am able to use MS_LOC to connect to SQLX_LOC and to use MS_SRV to connect to SQLX_SRV.  However I am not able to use MS_LOC to connect
    with SQLX_SRV.  Here's what I have done so far:
    SMGR -> Configuration -> Windows Firewall to turn off the Windows Firewall for Domain, Private and Public profiles.  Obviously I'll change this later, but until I can connect I want to remove as many variables as possible.
    CMGR_SRV -> SQL Server Services to confirm that both SQL Server (SQLEXPRESS) and SQL Server Browser services were running.
    CMGR_SRV -> SQL Server Network Configuration -> Protocols for SQLEXPRESS to ENABLE the Shared Memory, Named Pipes, and TCP/IP protocols and DISABLE the deprecated VIA protocol.
    CMGR_SRV -> SQL Server Network Configuration -> Protocols for SQLEXPRESS -> double click TCP/IP to open the TCP/IP properties dialogue.  On the Protocol tab Enabled: Yes, Keep Alive: 30000, changed Listen All to No.  I've tried it both
    ways, but I've got six IP addresses on my server and I wanted to configure SQLEXPRESS to listen to only the first and primary IP.  On the IP Addresses tab went to IPALL and cleared the TCP Dynamic Ports field and entered 1433 in the TCP Port field. 
    For my first and primary IP Address I made sure that Enabled was Yes, I cleared the TCP Dynamic Ports field, and entered 1433 in the TCP Port field.  For all other IP Addresses Enabled was set to No and I cleared both the TCP Dynamic Ports and TCP Port
    fields.
    CMGR_SRV -> SQL Server Services -> SQL Server (SQLEXPRESS) right click and Restart.  This of course stopped and restarted my instance of SQLX_SRV enabling the TCP/IP configuration in the previous step to take effect.
    On my server, SQLX_SRV is the only instance of SQL Server running and so it's easy to hard wire it to the default port 1433.
    The instance name for both SQLX_SRV and SQLX_LOC is the default "SQLEXPRESS".  My server machine name is "SERVER1" on the EnglishBrains.com domain.  So the proper local name (local within the context of my remote server as connected via RDC) for
    my instance of SQLX_SRV would be:
    SERVER1\SQLEXPRESS 
    Note the use of a backslash NOT a forward slash. 
    Of course to connect remotely from my development machine, which is not on the same domain as my hosting server, I would need to specify the domain as well, so the SQL Server name becomes:
    SERVER1.EnglishBrains.com\SQLEXPRESS
    I must also use SQL Server Authentication.  Before I can use such a remote connection, however, there are still several configuration steps required.  So on my server (connected via RDC) I used MS_SRV to connect to SQLX_SRV using SERVER1\SQLEXPRESS
    for the server name and Windows Authentication.  Once connected I performed the following steps:
    MS_SRV -> right click the connected parent SERVER1\SQLEXPRESS instance node at the top -> Properties -> Security -> Server authentication: select "SQL Server and Windows Authentication mode".  This will enable connections using either type
    of authentication.
    Next, leaving the Server Properties dialogue open, Connections -> check "Allow remote connections to this server" box.
    Click OK to save these changes and close the Server Properties dialogue.
    MS_SRV -> Security -> right click Logins and select "New Login...", the Login - New dialogue opens.
    On the General page Enter a name for your new login
    Select SQL Server Authorization
    Enter and confirm a password
    Uncheck Enforce password expiration
    Select the default Database and Language
    On the ServerRoles page Public will be checked, also check SysAdmin.  This is probably not a good idea and I'll uncheck this as soon as I can connect to the SQLX_SRV.
    On the User Mapping page select the databases you want your new Login to access and enter the Default Schema of "dbo".
    At the bottom of the User Mapping page you'll see the Database Roles table.  Public will be selected by default.  Also select db_Owner.  Again this is probably not a good idea, and I'll refine this once I can connect.
    On the Status page confirm that "Grant" is checked under "Permission to connect to database engine" and "Enable" is checked under "Login".
    Click OK to save all changes and close the Login - New dialogue.
    With these steps completed you should now be able to use MS_SRV to connect to SQLX_SRV using SQL Server Authentication by supplying the name and password for your new Login.  I tried this and it worked fine.  Next I tried to use this same login
    remotely, that is I went to my local development machine and used MS_LOC to try and connect to SQLX_SRV by using
    SERVER1.EnglishBrains.com\SQLEXPRESS
    and opting for SQL Server Authentication and supplying the name and password of my new login.
    THIS DID NOT WORK??  Instead I get the following error message:
    Cannot connect to SERVER1.EnglishBrains.com\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) (Microsoft SQL Server, Error: -1)
    For help, click:
    http://www.microsoft.com/products/ee/transform.aspx?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-1
    If you follow the suggested help link, you are told:
    The SQL Server client cannot connect to the server.  This error could be caused by one of the following reasons:
    A specified SQL Server instance name is not valid.
    The TCP, or named pipes protocols are not enabled.
    The firewall on the server has refused the connection.
    The SQL Server Browser service (sqlbrowser) is not started.
    WRONG on all 4 counts!  The instance name IS valid.  Both TCP/IP and Named Pipes protocols are enabled.  The firewall has been shut down, so it is not relevant.  Finally the SQL Server Browser IS started.
    The next thing I tried was to circumvent discovery by the SQL Browser service by using the following syntax to specify the IP address and port directly when specifying the SQL Server name.
    tcp:68.71.134.186,1433
    Using this in the Server Name field I was able to use MS_SRV to successfully connect to SQLX_SRV (using SQL Server Authentication of course) with or without the SQL Browser service running. 
    However when I tried to connect from MS_LOC to SQLX_SRV using this same login (WITH SQL Browser service running just for good measure) it does not work??  I get the following error message:
    Cannot connect to tcp:68.71.134.186,1433.
    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:
    TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.) (Microsoft SQL Server, Error: 10060)
    For help, click:
    http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=10060&LinkId=20476
    If you follow the help link you are told:
    "The SQL Server client cannot connect to the server. This error could occur because either the firewall on the server has refused the connection or the server is not configured to accept remote connections."
    However, the firewall has been shut down and the server HAS been configured to accept remote connections! 
    I confirmed that i could indeed Ping to 68.71.134.186  and running NetStat -a |find /i "listening" on the server shows that the server is indeed listening at 68.71.134.186 Port 1433 -- which is why I was able to connect to SQLX_SRV using MS_SRV with
    tcp:68.71.134.186,1433 .
    IN SUMMARY: Even though I can connect to my SQLEXPRESS instance multiple ways from the server itself, I cannot connect remotely from my development machine! 
    If anyone can help me figure out why I would be very, very grateful!

    My two cents to help you out on c# code example to configure the remote sql server express.
    Hope it helps. It works, but you have to be extra carefull to read it all and setup the server configuration and netsh commands; also the port fowarding on the router.
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Data.SqlClient;
    namespace sqlremoteconnection
    class Program
    static void Main(string[] args)
    // this is the local sql server connection
    // 192.168.1.101\SQLEXPRESS
    // now, the configuration for remote access:
    // activate SQL SERVER BROWSER - set it to start "automatic"; then START UP
    // SQL Server Configuration Manager
    // --> SQL SERVER BROWSER -> properties -> Service -> Start Mode -> automatic -> apply
    // --> Log On -> Start -> Ok
                // netsh firewall set portopening protocol = TCP port = 1433 name = SQLPort mode = ENABLE scope = all profile = CURRENT
                // netsh firewall set portopening protocol = UDP port = 1434 name = SQLPort mode = ENABLE scope = all profile = CURRENT
                // netsh advfirewall firewall add rule name = SQLPort dir = in protocol = tcp action = allow localport = 1433 remoteip = any profile = PUBLIC
                // netsh advfirewall firewall add rule name = SQLPort dir = in protocol = udp action = allow localport = 1434 remoteip = any profile = PUBLIC
    // VERY IMPORTANT FOR REMOTE ACCESS: you have to add the rules on port fowarding
    // on the router!!!
    // TCP: 1433
    // UDP: 1434
    // or just a personal port like TCP 31433/UDP 31434
    // read carefully the netsh commands above
    // server name: 123.132.24.177\SQLEXPRESS
    // server name: anyurl.myftp.org\SQLEXPRESS,1433 <<-- regular port
    // server name: anyurl.myftp.org\SQLEXPRESS
    // server name: anyurl.myftp.org\SQLEXPRESS,31433 <<-- WOW different PORT here!!!
    SqlConnection myConnection = new SqlConnection(
    "user id=sa;" +
    "password=password_goes_here!;" +
    "server=anyurl.myftp.org\\SQLEXPRESS,31433;" +
    //"Trusted_Connection=no;" +
    "database=database_name_here; " +
    "connection timeout=30");
    try
    myConnection.Open();
    catch (Exception e)
    Console.WriteLine(e.ToString());
    try
    SqlDataReader myReader = null;
    SqlCommand myCommand = new SqlCommand("select * from mytable", myConnection);
    myReader = myCommand.ExecuteReader();
    while (myReader.Read())
    Console.WriteLine(myReader["tab01_name"].ToString());
    Console.WriteLine(myReader["tab01_age"].ToString());
    catch (Exception e)
    Console.WriteLine(e.ToString());
    try
    myConnection.Close();
    catch (Exception e)
    Console.WriteLine(e.ToString());
    Adelino Araujo

  • After restoring SharePoint farm backup ( 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 connection)

    Hi,
    I have taken farm back and restore it in new UAT environment, while access to the main site getting the below error: 
    Error  
    An unexpected error has occurred. 
    Troubleshoot issues with Microsoft SharePoint Foundation. 
    Correlation ID: 866476f3-23dd-4e1e-97af-bffc62cc2d57 
    Date and Time: 7/15/2014 11:26:35 AM 
    When i checked in log i got below error
    System.Data.SqlClient.SqlException: 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: Named Pipes Provider, error: 40
    - Could not open a connection to SQL Server)    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 integratedSecu... 
    Thanks in advance
    Said Al Balushi

    Hi Wendy,
    i have checked all below points, every thing is fine but still i am getting the same error.
    Check SQL services are runing
    Check remote conenctions are enabled
    Check SQL Browser service is runing
    Check TCP/IP protocal enabled at SQL server
    Check out windows firewall setting
    Thanks,
    Said
     

  • 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.

    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)
    How Can i solve this?

    1. Make sure SQL Server Service is running
    2. If a named instance, make sure SQL Server browser service is running
    3. Make sure SQL Server is configured to allow remote connections
    4. Examine the SQL Server error log for messages confirming that SQL is listening on the expected network interfaces and ports
    5. Test server connectivity with PING from the client machine
    6. Test port connectivity using TELNET or PowerShell to the server and port (from step 4) from the client machine.  For example
    a. TELNET <server-name> 1433
    b. PowerShell: 1433 | % { echo ((new-object Net.Sockets.TcpClient).Connect("YourServerName",$_)) "server listening on TCP port $_" }
    7. Check firewall settings if step 5 or 6 connectivity test fails
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • SQL Server Express 2008 no longer accepting remote connections

    Last night our SQL Server Express 2008 (running on Windows 2003 server) stopped accepting remote connections. 
    1. We restarted the SQL Server -- no resolution.
    2. We rebooted the host Windows 2003 server - no resolution.
    3. telnet localhost 1433: says Could not open connection to the host on port 1433... connection failed.
    4. netstat -an indicates that the server is not listening on port 1433
    5. SQL Server Network Configuration -> Protocols for SQLEXPRESS2008A -> (properties) -> TCP-IP (enabled), Listen All (yes)
    6. SQL Native Client 10.0 Configuration -> Client Protocols -> (properties) TCP-IP (enabled), Default port (1433)
    Fragment from the server error log:
    2014-03-26 08:50:41.09 Server      A self-generated certificate was successfully loaded for encryption.
    2014-03-26 08:50:41.11 Server      Server is listening on [ 'any' <ipv4> 1026].
    2014-03-26 08:50:41.11 Server      Server local connection provider is ready to accept connection on [ \\.\pipe\SQLLocal\SQLEXPRESS2008A ].
    2014-03-26 08:50:41.11 Server      Server named pipe provider is ready to accept connection on [ \\.\pipe\MSSQL$SQLEXPRESS2008A\sql\query ].
    2014-03-26 08:50:41.11 Server      Dedicated administrator connection support was not started because it is disabled on this edition of SQL Server. If you want to use a dedicated administrator connection, restart SQL Server using the
    trace flag 7806. This is an informational message only. No user action is required.
    2014-03-26 08:50:41.11 Server      The SQL Server Network Interface library could not register the Service Principal Name (SPN) for the SQL Server service. Error: 0x54b, state: 3. Failure to register an SPN may cause integrated authentication
    to fall back to NTLM instead of Kerberos. This is an informational message. Further action is only required if Kerberos authentication is required by authentication policies.
    2014-03-26 08:50:41.11 Server      SQL Server is now ready for client connections. This is an informational message; no user action is required.
    2014-03-26 08:50:41.29 spid10s     Clearing tempdb database.
    2014-03-26 08:50:41.89 spid10s     Starting up database 'tempdb'.
    2014-03-26 08:50:42.09 spid13s     The Service Broker protocol transport is disabled or not configured.
    2014-03-26 08:50:42.09 spid13s     The Database Mirroring protocol transport is disabled or not configured.
    2014-03-26 08:50:42.14 spid13s     Service Broker manager has started.
    2014-03-26 08:50:42.14 spid7s      Recovery is complete. This is an informational message only. No user action is required.
    2014-03-26 08:50:53.48 spid51      Attempting to load library 'xpstar.dll' into memory. This is an informational message only. No user action is required.
    2014-03-26 08:50:53.48 spid51      Using 'xpstar.dll' version '2007.100.1600' to execute extended stored procedure 'xp_enumerrorlogs'. This is an informational message only; no user action is required.
    2014-03-26 08:51:35.68 spid54      Starting up database 'Web TimeSheet2'.
    2014-03-26 08:51:38.47 spid54      Recovery is writing a checkpoint in database 'Web TimeSheet2' (6). This is an informational message only. No user action is required.
    Note: the lines referring to xpstar.dll is new after this porblem.  Previous logs do not have this,Any help will be appreciated.

    Hi,
    >>Server is listening on [ 'any' <ipv4> 1026].
    Your sql server is not listening on default port 1433 but on 1026.When you connect to instance like hostname\instancename you should specify post no also.
    like hostname\instancename ,1026
    Can you try this.Makes sure TCP/IP and named pipes protocol is enabled
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • Remote connection SQL

    Hallo 
    Hope all are well.
    I got problem connecting from remote computer to SQL server, Connecting via SQL Manangement studio on local machine where server is installed no problem.
    If I disable the Windows firewall on the server I can create remote connection. But when disabling it doesn' work.
    I enabled the following inbound rules on the server still no connection, any idea's?
    Ports Created for inbound rules:
    1433,1444,2383,1434,2382,4022,135
    Still only way to connect to server is to disable the firewall.
    SQL Server I made sure the TCP port is enabled and set to any.
    Any idea's or suggestions will be much appreciated.
    Best Regards,
    Jacques.
    labjac

    Hi, checkthat the right ports
    are open on Windows Firewall,
    evidently the ports you refer are not used by sql server. Is it a named instance?
    If is a default instance be sure that TCP 1433 and UDP 1434 are enabled on Windows firewall
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it

  • Unable to Remote connect to a SQL 2008 server

    I just set up a virtual server with Godaddy with CF and SQL Server 2008
    The SQL server appears to be running because if I RDC into the server and connect using the Server management Studio, it works. To find the instance I have to look at network devices and I find it under MACHINENAME\SQLINSTANCE
    The problem I have is that I want to connect to this instance using server management studio on a computer with SQL2005 installed. I guess/hope that a 2005 can connect to a 2008
    I'm not 100% sure what the exact correct format is for the "Server Name" when trying to set it up. I've tried everything I can think of
    ServerName\IPNumber\Instance
    IPNumber\ServerName\Instance
    IPNumber\Instance
    Nothing seems to work, it kicks back with a big error, aying it can not connect:
    A network-related or instance-specific error occured while establishing a connection to SQL Server.
    The server was not found or was not accessible. Verify the instance name is correct and that
    SQL Server is configured to allow remote connections (provider: SQL Network Interfaces, Error: 26-
    Error Locating Server/Istance Spcified) (Microsoft SQL Server)
    The firewall on the server is off, I checked the properties of the instance and the option to allow remote connections is also checked
    Anybody have any ideas?
    Thanks
    Mark

    Solved this myself.
    I was trying to log in with the user name of the adminstrator for the server, which worked locally while on the server but when I tried to use SQL SERVER AUTHENTICATION , tapping in the user name and password, it failed in the same way, even though the password was correct. Connecting using WINDOWS AUTHENTICATION worked, so I checked the users and found that user name did not have a password set because it was the admin I guess, so it just rejected all attempts using SQL SERVER AUTHENTICATION.
    What I then did is tried the 'sa' user, and saw that it did have a password set when I viewed it in USERS... so I tried to connect remotely using that, and it worked... problem solved
    Thought I'd post that, just incase anybody else came across the problem
    After posting this I reversed a change that I had made from info found on another forum, and it stopped working! I put the change back again and it works, so it looks like a combo, here is the info that I found that helped fix the problem
    "In the SQL server configuration manager, there is an item called SQL server network configuration, under protocols, I selected the properties of the TCP/IP protocol. There is a tab “IP Addresses” there, and at the bottom of the list is an entry called IPAll. In my case the TCP port was empty. I entered the SQL standard port 1433 in there and I was able to connect."
    I had also since posting upgraded to 2008 locally, not that I believe it had anything to do with the problem
    Mark

  • An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider,

    An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider,
    error: 40 - Could not open a connection to SQL Server)

    An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named
    Pipes Provider, error: 40 - Could not open a connection to SQL Server)
    Hello,
    Make sure your SQL Server service is started.
    Make sure TCP\IP and names pipes protocol is enabled
    Make sure you have made an exception in firewall for SQL Server connection
    Make sure SQL Server browser service is enabled
    Make sure you connect with correct name hostname\instance name for named instance,MSSQLSERVER for default instance and Hotname\SQLEXPRESS for express edition.
    Please make sure you use port no when connecting to SQL server listeing on different port (hostname\instance ,portno)
    http://blogs.msdn.com/sql_protocols/archive/2006/09/30/SQL-Server-2005-Remote-Connectivity-Issue-TroubleShooting.aspx
    Hope this helps
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • Sql 2005 Remote Connection

    I am having a problem connecting to a remote SQL server 2005 instance.  The remote server is for a website hosting account of mine.  I can connect to the server from computers other than the problem computer just fine.  I cannot connect to the server using any software including SQL Server Management Studio Express, Visual Web Developer, or even when trying to use aspnet_regsql.exe on the problem computer.  The request to connect to the remote server never seems to leave my computer.  When talking to my hosting service, they replied that they did not receive a request to connect to their server from me.  I have shut down Windows Firewall as well as my third-party firewall with no change.  The error message that I receive is:
    An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)
    If anyone has any ideas they would be appreciated.

    There are a couple of changes that need to be made to allow remote connections to the server... and these need to be made on the server. Have a look at this KB Atricle. Also one way to test is to create a simple ODBC Connection and see if you can get through. Also I see it stange that a hosting company is allowing remote connections to the database server, normally they only allow connections through some sort of web interface or one of there own client tools.

  • Can't remote connect to sql server

    I have SQL Sever 2008 R2 on the cluster environment
    cluster server name is A
    Cluster Node 1 name is A1 (current active one)
    Cluster Node2 name is A2
    SQL Server name is Ab, default instance, tcp/ip port 1433
    I am not able to remote connect to the server. I tried A, A1, Ab and their corresponding IP address, not of them works. Should I change to the SQL Server name to match with the cluster server name? Thanks in advance!

    Dont have to change the sql server name.
    In a standalone machine when you have a default instance, the sql server name is indeed the server name. But in cluster its the network name that is associated with the virtual ip for SQL.
    If you try with either SQL Server Network Name or IP address it should work. If it doesnt work try forcing TCP protocol and the port number in connection and see.
    check these blog as well
    http://blogs.technet.com/b/mdegre/archive/2011/06/04/resolve-sql-server-connectivity-issues.aspx
    http://blogs.msdn.com/b/farukcelik/archive/2007/12/31/basics-first-udl-test.aspx
    Regards, Ashwin Menon My Blog - http:\\sqllearnings.com

  • MS SQL 2005 remote connection using sqljdbc

    Hi,
    I have production line computer with software using java code and firebird database, i also have sqljdbc.jar also in the library.
    my software is trying to connect to mssql2005 database in a remote computer and got this error message:
    java.lang.classnotfoundexception: com.microsoft.sqlserver.jdbc.SQLServerDriver.
    I have no problem when connecting to my local mssql2005 database though. but have problems when trying to make remote connection.
    May i know what could seem to be the cause of the problem, is there anything missing ? do i need to instal anything else on the production line computer? currently it does not have mssql2005 instal on the production computer do i need to instal it ? please help. thanks

    Btreksun wrote:
    Hi,
    Im using MS SQL 2005 Express edition, I dont find any sqljdbc.jar driver inside the installation,
    I dont see any other driver or driver folder in the installation path.
    Inside my instalation path C:\Program Files\Microsoft SQL Server: only shows these folders
    MSSQL$MSSQL2000
    MSSQL.1
    80
    90
    100
    "Class path" applies to java. None of the above is java.
    I dont know what to set my classpath with?You are running your java in "something". That "something" is an application. That "something" does not have the correct class path. You didn't tell us what it is so we can't help you with it.
    I even download sqljdbc.jar and put it inside C:\Program Files\Microsoft SQL Server and set the classpath but doesnt work ?I suggest you google for class path, read several articles about it and try some of the stuff that they talk about.

  • How do you allow SQL Server 2014 Express for remote connection and in firewall?

    I'm sorry if this was answered here before.
    I installed SQL Server 2014 Express and it is working perfectly. I want my server to be accessed through LAN. It is a named instance.
    I searched the internet and here's what i did:
    1. Through the SQL Configuration manager, I enabled all the Protocols of my Instance (TCP/IP, Named Pipes and Shared Memory). I changed in the IP Addresses the "IP ALL" TCP Dynamic Ports to 1434.
    2. In the Firewall I made an Inbound Rule to allow the Program (%ProgramFiles% (x86)\Microsoft SQL Server\MSSQL12.MyInstance\MSSQL\Binn\sqlservr.exe)
    3. I also made 2 Inbound Rules to allow (TCP/IP Port 1433) and (UDP Port 1434).
    4. Restarted my instance. SQL Server Browser and  SQL Server Reporting Services are also running.
    5. No Luck I cant still access the server using a different computer in the network.
    Please help.

    Hello,
    In Express Edition by default remote connections are disabled, you have to enable it first:
    Configure the remote access Server Configuration Option
    It's always a two way communication, so you have to create also outbound rules, not only inbound, and this on server as well as on client side; see
    Configure a Windows Firewall for Database Engine Access
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • How to configure SQL Server to allow remote connections

    Hi,
    This is RtPrasad.I am working in some software company.I am supporting an application in one of the projects.I am using windows 7 OS and SQLServer 2008 r2.When ever I am trying to connecting to the test server through SSMS from my lenovo thinkpad,I am getting
    an error as shown in the screen shot.I searched a lot in the google and I went through the many sites.In those sites,below is the URL of one site.
    http://blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx.But Still I am getting the same error.Can anybody please solve this problem as soon as possible.Thanks in advance.
    Thanks&Regards,
    RtPrasad.

    are you connecting to office network through vpn? or is it that the sqlserver open to internet access?
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

Maybe you are looking for

  • MSI 880GM-e35 Wakeing up from sleep by USB mouse or USB keyboard

    I have two 880gm-e35 boards that will not wake up from sleep by Keyboard or mouse. (S3) sleep condition. -They wake up by tapping the power button..ok. On the E-35 boards If I set the (S1) Sleep condition where the fans stay on and power light does n

  • Installing back-up from Time Machine

    My problem.. I got a new hardisc to my Mac computer. An up grate from 10.6.8 to 10.7.2 I can not get my adobe Creative Suite 4 to work - I get a pop-up window that says Error 150:30. What am I going to do?

  • Microsoft silverlight plugin does not work in my iMac. Any suggestion on how to make it work?

    I occasionally attend webinars and in order to view and listen the site I use requires silverlight plugin. I used it in the past without any issues. Now even after I updated it yo the latest version it does not work. Is there a known issue of incompa

  • Gift this App is Missing

    Running iTunes 11.0.2 on a Mac, the option to "Gift This App" is missing for apps that I've purchased.  It appears properly for apps that I haven't purchased. Has anyone else run into this bug?  Is there a workaround?  How can I gift an app to someon

  • Preview new emails, alerts, or alarms ala SMS?

    Is there a way for an incoming alert to temporarily display on my screen ala SMS? I would like to see what the buzz is for instead of having to turn on the phone, unlock the screen, etc. Any ideas?