Cannot connect to Remote SQL server

Hi,
I was able to connect to remote server before and it was working but since couple of days when I tried to connect it generates error.
"The Target PrincipalCannot  name is incorrect.Cannot Generate SSPI context."
Jibran Ishtiaq

See
[ForumFAQ]How to troubleshoot error "SSPI handshake
failed with error code 0x80090324
A simple reason can be, that your local clock differens more then 5 min from the Server clock.
Olaf Helper
[ Blog] [ Xing] [ MVP]

Similar Messages

  • Oracle 10.2 on AIX -- need to connect to remote SQL server by dblink

    oracle 10.2 on AIX -- need to connect to remote SQL server by dblink
    i didn't see a odbc diectory in our oracle home path. how do i know odbc driver is installed in the oracle on our AIX server.
    If it is there, do i just need to modify the odbc.ini and then the inithsodbc.ora, linster.ora, tnsnammes.ora files, or am I missing something
    Appreciate your response
    Edited by: user10876711 on May 12, 2011 9:18 AM
    Edited by: user10876711 on May 12, 2011 9:18 AM

    when you want to connect from Oracle to a SQl Server you need the Oracle Gateway (HSODBC or even better Dg4ODBC) and a FOREIGN ODBC DRIVER for your foreign database - a SQL Server ODBC driver. You have to get this driver from a 3rd party vendor - Oracle does not offer any foreign ODBC drivers.
    So before being able to use DG4ODBC/HSODBC you need to install from a 3rd paryt vendor a SQL Server ODBC driver. Commercial vendrs are for example Data Direct, Openlink or Easysoft.
    On Unix ODBC drivers commonly also require a driver manager. If the ODBC driver vendor does not ship one with the ODBC driver you can get it from www.unixodbc.org

  • Failure - Cannot connect to Microsoft SQL Server on localhost

    Hi!
    I have a sqlserver installation on localhost and I want to connect with sqldeveloper.
    I fill connection name, username, password, hostname: localhost port: 1433
    and then click on retrieve database.
    I get the following error message: "Status: Failure - Cannot connect to Microsoft
    SQL Server on localhost"
    I don't know the reason. I can use another connection to another ms sql server
    and it's no problem, but can't connect to localhost.
    I have special signs in my computername, for example a "-". Is this the problem?
    How can I solve it?
    Thank you
    Andreas

    I am able to successfully connect to my local SQLEXPRESS instance using the following settings:
    Hostname: localhost
    Port: 1433/DBName;instance=SQLEXPRESS
    Even though I use this to connect, I cannot open a tcp connection to port 1433 via telnet. I believe this goes hand in hand with specifying the instance. As I understand it, there are two ways to specify the port, one is directly, the other is through a named instance (another port is used as a service to look up the correct port). SQL Server 2005 appears to prefer named instances instead of specific ports. When "instance" is specified, the port can actually be any number, the driver apparently ignores it.
    The Retrieve database (list) appears to be only for informational purposes. I have to specify the database in the Port field (DBName) regardless of what I have selected in this list.
    Hope this helps!
    PS: Retrieve database will give that error until instance is specified in my case.
    Edited by: flszen on Feb 4, 2009 1:29 PM

  • Cannot connect to MS-SQL Server

    I cannot connect to MS-SQL Server.
    My listener.ora:
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (GLOBAL_DBNAME = orcl)
    (ORACLE_HOME = D:\oracle\ora92)
    (SID_NAME = orcl)
    (SID_DESC =
    (PROGRAM = extproc)
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = D:\oracle\ora92)
    (SID_DESC =
    (PROGRAM = tg4msql)
    (SID_NAME = TG_SQL_SERVER_S0168SS0068)
    (ORACLE_HOME = D:\oracle\ora92)
    My tnsnames.ora:
    TG_SQL_SERVER_S0168SS0068 =
    (DESCRIPTION =
    (ADDRESS =
    (PROTOCOL=TCP)
    (HOST=localhost)
    (PORT=1521)
    (CONNECT_DATA=
    (SID=TG_SQL_SERVER_S0168SS0068))
    (HS=OK))
    My inittg4msql.ora:
    HS_FDS_CONNECT_INFO=S0198SS0068.db1
    HS_FDS_TRACE_LEVEL=ON
    HS_FDS_RECOVERY_ACCOUNT=RECOVER
    HS_FDS_RECOVERY_PWD=RECOVER
    And I have created a database link:
    CREATE PUBLIC DATABASE LINK tg_sql_server_s0198ss0068 CONNECT TO myusername IDENTIFIED BY mypassword USING 'tg_sql_server_s0198ss0068';
    And I get a "ORA-12154: TNS:could not resolve service name" error.
    Any idea??

    Karl,
    Perhaps the TNSNAMES.ORA entry (on your database server) needs a domain suffix (eg TG_SQL_SERVER_S0168SS0068.mycompany.com = )
    This Generic Connectivity 4 MS ACCESS on host  A  and ORACLE 9I on host B.. explains some of the topography.
    Tak

  • Can't connect to remote SQL Server 2014 Standard with VS 2012

    Hi all,
    I am trying to create a development environment using SQL Server 2014 (not Express).  The SQL server instance is on a Windows 8.1 Pro machine in a non-domain environment.  I have Visual Studio 2012 installed on the same machine which can connect
    to the SQL server instance without problems.  I have another machine with VS 2012 that cannot connect.  SQL server is configured for mixed authentication.  The SSDT on the remote machine can see the SQL server networked instance, but will not
    connect with SQL authentication. 
    I have rounded up all the usual suspects;
    - The SQL server service is running
    - Remote connections are enabled on SQL server and the relevant firewall ports are open.
    - TCP/IP and named pipes are enabled
    - Remote connections are enabled in Management Studio
    - SQL Server Browser service in enabled and running
    What am I missing?  I have been out of developer mode for a few years and all of the tools have changed, but I seem to be missing something obvious.
    Many thanks in advance,
    Tim
    Tim in Dublin

    Hello,
    Have you configured the Windows Firewall on the Visual Studio computer too? Is there any other security software on those
    2 computers?
    Can you ping between both computers by computer name? If not, try connecting using the IP address. For example:
    10.0.0.10,1433
    1433 is the default SQL Server port number.
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • How to connect to remote sql server database?

    Hallo,
    I am a new member, so please excuse me if my questions are dummy.
    I am using CR2008 SP2 to make reports from sql server 2005 databases.
    Localy there is no connection problem and everything works perfect.
    I would like to establish a connection with a remote sql server 2005,
    but i am not familiar with remote data retriving. which driver should i use? static ip? vpn? server ports?
    Any answer will be really appreciated

    Hello,
    This is more a question for Microsoft to see what and how they support remote connections to databases. As long as you have the connection made CR will not have any problems. You may find it is slow so optimizing your queries is highly recommended. Passing a million records through your web connector is going to take time.....
    I've personally used a VPN connection and then set the ODBC or OLE DB connection info to my test server here at work and it worked fine. But they were small data sets.
    Thank you
    Don

  • PeopleTools 8.49 PeopleSoft Database Cannot Connect with MS SQL Server 2005

    Folks,
    Hello. I am working on PeopleSoft PIA. My system is Windows Server 2003, MS SQL Server Express 2005 Standard, PeopleTools 8.49. I am setting up PeopleSoft Database \PsMpDbInstall\setup.exe and got the errors as follows:
    Error: Setup fails to connect to SQL Server. The default settings SQL Server does not allow remote connection.
    Then I type in "sqlcmd" in Command Prompt and got the same error as follows:
    Name Pipe Provider: Could not open a connection to SQL Server. MS SQL Native Client: the default settings SQL Server does not allow remote connection.
    In order to fix SQL Server 2005 remote connection problem, I have done the 3 steps as follows:
    Step 1: In SQL Server Surface Area Connection, enable local and remote connection, TCP/IP and Name Pipes, SQL Server browser Startup type "automatic" and status "running".
    Step 2: Create exception for SQL Server 2005 and SQL Server browser Service in Windows Firewall.
    Step 3: Add the default SQL Server Port 1433 into Windows Firewall.
    But the above 3 steps cannot resolve SQL Server Express 2005 remote connection problem. Can any folks help to resolve this problem ?
    Thanks.

    Folks,
    Management Studio can connect with SQL Server 2005 successfully.
    I have turned off Windows Server 2003 firewall completely. But "sqlcmd" in Command Prompt still connect with SQL Server 2005 because its remote connection is not allowed.
    Is the "not allow remote connection" problem caused by Windows Firewall or SQL Server 2005 itself ?
    Thanks.

  • Cannot connect to backup sql server

    Hi, i'm new in Azure and MS SQL.
    I'm trying to create an Availability Group: Primary and backup SQL servers (msdn.microsoft.com/en-us/library/azure/dn275957.aspx)
    At Step 7 (Connect to Server) I get error:
    ADDITIONAL INFORMATION:
    The target principal name is incorrect.  Cannot generate SSPI context. (Microsoft SQL Server, Error: 0)
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=0&LinkId=20476
    I can connect to server with RDP and use admin account "sp_farm_db", but I get error message every time, when I connect to backup server.
    What I doing wrong?

    How to troubleshoot the "Cannot generate SSPI context" error message
    Saeid Hasani [sqldevelop]

  • Error Connecting to remote sql server database

    The sql server database is hosted on Godaddy hosting service.
    I am able to connect with many other remote computers so the issue resides on the remote computer.
    The remote computer is windows 7 32 bit 2009 service pack 1
    using the ODBC administrator we add a user DSN select SQL Server Version 6.01.7601.17514
    For the server we put in the server from godaddy somthing like   XYZDatabase.db.1110002.hostedresource.com
    Once enter the login id and password we get the following error.
    Any help would much appreciated.
    Remember, we have multiple other remote computers connecting with no issues.

    Hello,
    If connection works for several machines, but fails on others then may because the access is blocked by firewall. You have to unblock IP port 1433 for in- and outbound.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Connecting to remote SQL Server

    Hi everybody from Spain!
    My problem is this one: I need to connect several JSP pages running under tomcat, which is hosted in, for example, the IP 192.168.1.21 to a SQL Server Database hosted in another server (for example 192.168.1.30).
    I would like to know exactly all the steps I just need to do this connection.
    Thank you to my helpers and sorry for my poor english. I�ll try to improve it.
    Sergio.

    If your application server is in windows platform, you could use the jdbc:odbc bridge driver to connect to sql server database. Otherwise use a 3rd party jdbc driver(go to http://industry.java.sun.com/products/jdbc/drivers and select MS Sql server for a list of drivers).
    Here is a sample jsp page for accessing an sql database.The class name and connection url format depends on the driver you are using.
    Create an ODBC DSN called mydsn for pointing to your database.
    <%@ page import="javax.naming.*, javax.ejb.*, java.sql.*" %>
    <%!
         private Connection con;
         private String sMsg="";
         try{
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con=DriverManager.getConnection("Jdbc:Odbc:mydsn","username","password");
              }catch(SQLException ex)
                   out.println("Error connecting to database. " + ex);
    %>

  • I cannot connect to Microsoft SQL Server 2008

    I am getting a cannot load when I am trying to download SQL Server 2008.

    Hi,
    >>1)Can you look into the application log in the eventvwr for a detailed error message and post it here
    Where should I look into?
    Go to All programs-->Microsoft SQL Server-->configuration Tools-->Sql Server configuration manager-->SQL Server services in the left pane-->right click SQL Server -->
    start..you can also see properties where in you can see Log on as tab.
    In my machine i have only default instance..Based on the instances running in your machine you can see services running accordingly in here
    You already told your SQL Server service is not starting..now you have tried again to start the services and the error would have been logged in the eventvwr.
    Start-->cmd-->eventvwr-->Windows Logs-->application-->You can see the errors logged at the time when you tried to start SQL Server on why SQl Server was not able to start on the right side pane.
    Please go through that and post those error messages in here. Since you are using it after long time there might be chances you moved your master DB's mdf and ldf files to someother location. Without master DB coming up, your instance will not come up.
    Thanks
    Please click the Mark as answer button and vote as helpful if this reply solves your problem

  • Cannot Connect to Remote Named Instance of SQL Server

    We have 3x instances of SQL Server 2012 installed on a single remote server - there's the default MSSQLSERVER instance, then \INSTANCE01 and \INSTANCE02. I can remotely connect to the default MSSQLSERVER instance through SSMS, but I cannot connect to
    either of the additional named instances (\INSTANCE01 or \INSTANCE02). 
    For example, if I try to connect to "sql.domain.com", I can successfully access the default instance on the remote server. If I try to connect to "sql.domain.com\INSTANCE01", I get an error stating
    "A network-related or instance-specific error occurred while establishing a connection to SQL Server".
    HOWEVER - if I try to connect to "sql.domain.com\INSTANCE01, 49301" (where 49301 is the TCP Port for the TCP/IP Protocol for this SQL Server instance), I am able to successfully connect.
    This leads me to think that there's a communication issue with the SQL Server Browser service running on the remote SQL Server and my workstation. 
    The following items have been verified:
    SQL Server Browser is running on the remote SQL Server
    Windows Firewall has been disabled on the SQL Server
    TCP Ports 1433, 1434, 1954, and 49301 have been opened up on the remote destination's firewall
    UDP Port 1434 has been opened up on the remote destination's firewall
    Thoughts? Did I miss something?

    Hi brgnewman,
    Use computername\instancename to connect to the database engine. Please try again. I think the configuration is OK.
    Refer to Connecting from Another Computer:
    http://msdn.microsoft.com/en-us/library/ms345343.aspx.
    Thanks.
    Maggie Luo
    TechNet Community Support

  • Cannot connect to ag-sql-listener from Secondary Server

    Greetings,
    I have a Azure VM setup with two SQLs SQL1 and SQL2, they run a High Availability setup with SQL-AG-Listener as the listener name. 
    My problem is currently is that if I have SQL1 as Primary, when I'm logged into SQL2 I can't use the SQL-AG-Listener as target to get the Primary server. However I can do a connection to SQL1 directly. 
    On the Primary server I can however use the SQL-AG-Listener and will get the local server as expected. 
    The SQL-AG-Listener works perfectly from outside the local network of Azure.
    ===================================
    Cannot connect to ag-sql-listener.
    ===================================
    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)
    ===================================
    I don't know what else I can try and do now. I have run through most of the issue handling as I can, all from Opening all ports to and from both the SQL servers on the domain level. Made sure that named pipes, TCP/IP connections on both SQL servers was enabled.
    As I can run towards them from the outside, and can connect to them directly on name from the SQL servers themselves, then I know that they can take remote access.
    Any idea on what I might be missing would be welcome.

    Yes, I know I had a typo in the above, where the ag-sql-listener was typed wrong.. It was ofcause SQL-AG-Listener.
    But it is still a problem. I don't know if there are some DNS things that can be done, as it seems this is a problem from within the same subnet and not from outside.

  • Error while trying to connect to a remote SQL Server DB using multiconnect

    As part of our business process, we need to connect to a SQL Server DB external to SAP.
    We have done the following:
    1. We set up an ODBC connection on our SAP sandbox server to the external SQL server DB. 
    Name: sdsdev
    Connection string: sdsdev\sqlexpress2008
    2. We tested the ODBC connection from within ODBC and it works perfectly
    3. Using transaction: DBCO we have set up a DB connection known to SAP that we can use in ABAP to retrieve the data.
        It was set up with exactly the same parameters as with the ODBC.
        We used the following connection string so it would know to use the ODBC DBSL profile parameters, with the DSN name  
    being the same as defined in the ODBC:  See below ...
        DB connection: AR_INTERFACE
        DBMS: MSS
        User Name: ARTransfer
        Password: ******
        Conn info: MSSQL_DSN=sdsdev
    4. We also made sure we installed the DBSL dynamic library (DLL) on the R/3 system server.
    5. We ran a small test program to test connectivity ... as below ...
         exec sql .
             connect to 'AR_INTERFACE'
         end exec.
         right after the above command we check the system log for status.  It failed with the following message:
    B Wed Feb 09 14:40:40 2011
    B Connect to AR_INTERFACE as ARTransfer with MSSQL_DSN=sdsdev
    MSSQL_DBNAME=ARTransfer
    C Thread ID:3900
    C dbmssslib.dll patch info
    C patchlevel 0
    C patchno 118
    C patchcomment Problems with the use of literals in non-unicode
    systems (1524929)
    C np:(local) connection used on SAPS101B
    C OpenOledbConnection : CoCreateInstance failed. rc: 8007007e.
    C failed to establish conn to np:(local).
    C Retrying without protocol specifier: (local)
    C OpenOledbConnection : CoCreateInstance failed. rc: 8007007e.
    C failed to establish conn. 0
    B ***LOG BY2=> sql error -1 performing CON [dbds#2 @
    1056] [dbds 1056 ]
    B ***LOG BY0=> <message text not available> [dbds#2 @ 1056] [dbds
    1056 ]
    The connection failed !
    We used all of the information found in OSS Notes we could find.
    Has anyone had this problem before ?  Is there something obvious we are missing in all this ?
    Thank you for your assistance.

    Is this Excel or Access?  If Excel, try this.
    Sub ADOExcelSQLServer()
    ' Carl SQL Server Connection
    ' FOR THIS CODE TO WORK
    ' In VBE you need to go Tools References and check Microsoft Active X Data Objects 2.x library
    Dim Cn As ADODB.Connection
    Dim Server_Name As String
    Dim Database_Name As String
    Dim User_ID As String
    Dim Password As String
    Dim SQLStr As String
    Dim rs As ADODB.Recordset
    Set rs = New ADODB.Recordset
    Server_Name = "EXCEL-PC\EXCELDEVELOPER" ' Enter your server name here
    Database_Name = "AdventureWorksLT2012" ' Enter your database name here
    User_ID = "" ' enter your user ID here
    Password = "" ' Enter your password here
    SQLStr = "SELECT * FROM [SalesLT].[Customer]" ' Enter your SQL here
    Set Cn = New ADODB.Connection
    Cn.Open "Driver={SQL Server};Server=" & Server_Name & ";Database=" & Database_Name & _
    ";Uid=" & User_ID & ";Pwd=" & Password & ";"
    rs.Open SQLStr, Cn, adOpenStatic
    ' Dump to spreadsheet
    With Worksheets("sheet1").Range("a1:z500") ' Enter your sheet name and range here
    .ClearContents
    .CopyFromRecordset rs
    End With
    ' Tidy up
    rs.Close
    Set rs = Nothing
    Cn.Close
    Set Cn = Nothing
    End Sub
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

  • Local Network Connection Problem with SQL Server 2008 R2

    Hi,
    I have CRM application which uses SQL server 2008. Weird thing is that I have no problems connecting from client machines to the server when using a particular router (via LAN) and when I upgrade the firmware of the same router (A common open source firmware
    which is used by many also works perfect apart from mentioned problem) and restart the server, the connection cannot be established. I get Error 40. 
    When i downgrade the firmware and restart the server, the connection works again.
    Please note that I am absolutely not touching any configuration of the server. Also the CRM software allows remote connections from public IPs which this feature works fine with both downgraded and upgraded firmwares. 
    As for my understanding, the routers do not block ports in LAN connections. So how can I diagnose the reason for this connection problem?

    Hi Leony83,
    Please also help to check Windows Event Log information regarding this issue, so that we can do further investigation. In additin, here is the general steps to troubleshoot SQL Server Error 40 issue. Please see:
    SQL SERVER – Fix : Error : 40 – could not open a connection to SQL server – Fix Connection Problems of SQL Server:
    http://blog.sqlauthority.com/2008/08/24/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server-fix-connection-problems-of-sql-server/
    Hope this helps.
    Regards,
    Elvis Long
    TechNet Community Support

Maybe you are looking for