Start a new topic

Connection to SQL Server error: this login is from an untrusted domain....

[This topic is migrated from our old forums. The original author name has been removed]

Please can you approve this post? THANK YOU! IAN MITCHELL ................................. My PC is Windows 7 Enterprise. I can access an SQL server database via Microsoft SQL server Management Studio. I use Windows authentication and only have to specify my domain and user. I am trying to make the same connection using Dbvis but not having any joy. I am using: Driver: SQL server (jTDS) Specifying server, port and database, my domain/userid and no password With: Authentication method: windows Domain: (a different domain) When I click "ping server", it says the server is alive. When I click "connect", I get the following: An error occurred while establishing the connection: Long Message: Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. Details: Type: java.sql.SQLException Error Code: 18452 SQL State: 28000 Can you suggest what I can do to fix this? Thank you Ian Mitchell

[This reply is migrated from our old forums.]

Re: Connection to SQL Server error: this login is from an untrusted domain....
Hi Ian, To use Windows Authentication when running DbVisualizer on a Windows platform, you should leave both the User and Password fields empty, if the PC is in the same domain as the database. The driver then uses the credentials of the logged in user. If the database and PC are in different domain, you must specify both the User and Password and the Domain. The driver then sends the User and Password to the Domain server for authentication, and the Domain server then use the credentials to authenticate with the database. Does this help? You can read more here: http://confluence.dbvis.com/display/UG92/Using+SQL+Server+Single-Sign-On+or+Windows+Authentication Best Regards, Hans
[This reply is migrated from our old forums. The original author name has been removed]

Re: Connection to SQL Server error: this login is from an untrusted domain....
Hello Hans: Whether I input the password or not, I get the same "untrusted domain" message. As I said: I can access an SQL server database via Microsoft SQL server Management Studio. I use Windows authentication and only have to specify my domain and user. Do you have another suggestion? I am using version 9.1.6. Thanks Ian
[This reply is migrated from our old forums.]

Re: Connection to SQL Server error: this login is from an untrusted domain....
Hi Ian, SQL Server Management Studio may use another communication method than DbVisualizer (TCP/IP), so it doesn't tell us much unfortunately. Is the PC and the database server part of the same Windows domain? Did you try to leave both the User and Password fields blank, if in same domain? Did you try entering both User and Password plus Domain, if in different domains? Best Regards, Hans
[This reply is migrated from our old forums.]

Re: Connection to SQL Server error: this login is from an untrusted domain....
Hi Ian, One more thing that may cause this. There is a jTDS driver property named USENTLMV2. It is false by default, so try setting it to true. You do that in the connection's Object View tab. Open the Properties sub tab and select Driver Properties. Then local the property in the grid and change the value. Best Regards, Hans
[This reply is migrated from our old forums. The original author name has been removed]

Re: Connection to SQL Server error: this login is from an untrusted domain....
Hello: I set USENTLMV2 to true, but same result. The PC is on one domain and the database is on another. If I enter : userid: DOMAIN1\userid password: (password) Domain: DOMAIN2 I get "untrusted domain". If I enter : userid: DOMAIN1\userid password: blank Domain: DOMAIN2 I get "untrusted domain".
[This reply is migrated from our old forums.]

Re: Connection to SQL Server error: this login is from an untrusted domain....
Hi Ian, Try with just the userid, without the "DOMAIN\" part, and enter the domain the user and database belongs to in the Domain field. And you need to enter the password as well. Best Regards, Hans
[This reply is migrated from our old forums. The original author name has been removed]

Re: Connection to SQL Server error: JDBC/ODBC bridge
Hello Hans: I get the same errors as before.... Now we are trying a different technique to connect and are having some success. We are using a JDBC/ODBC Bridge driver... which works fine in older versions of DbViz but not in the version I have: ver. 9.2.13. With this version, as soon as you select the Driver, the "settings format" gets set to "database url" and is greyed out, i.e. cannot be changed. However for the connecton to work, it needs to be set to "Server info" - this has been tried and tested in version 9.0.2. Is there a way to get the "settings format" changed in 9.2.13? Thanks! Ian
[This reply is migrated from our old forums.]

Re: Connection to SQL Server error: JDBC/ODBC bridge
Hi Ian, The JDBC/ODBC Bridge driver is no longer bundled with Java 8, and it is always best to use a pure JDBC driver. I therefore urge you to try to figure out why you cannot connect using the jTDS driver. I have already suggested a number of things to try and plenty of other customers use it successfully. If you stil cannot get it to work, please try to connect and then use Help->Contact Support to send us a description of the problem. We will then also get info about the connection setting details that may help us see what may be wrong. If you still want to use the JDBC/ODBC Bridge driver, you must downgrade Java from Java 8 to Java 7. The most recent DbVisualizer releases bundle Java 8, so you would need to download and install a DbVisualizer distribution that does not bundle a Java VM, and then configure DbVisualizer to use a Java 7 VM instead. Please see these FAQs for more info: http://confluence.dbvis.com/display/UG92/JDBC-ODBC+Bridge+Driver+Alternatives http://confluence.dbvis.com/pages/viewpage.action?pageId=3146120 Best Regards, Hans
[This reply is migrated from our old forums. The original author name has been removed]

Re: Connection to SQL Server error: JDBC/ODBC bridge
As noted I have tried all the suggestions you gave me but I always get the same "untrusted" message. I would rather use a later version of Dbviz, so I tried the Help-Contact Support route. Unfortunately I cannot send the details directly to you, so I copy them here... Product: DbVisualizer Pro 9.2.13 [Build #2491] OS: Windows 7 OS Version: 6.1 OS Arch: amd64 Java Version: 1.8.0_60 Java VM: Java HotSpot(TM) 64-Bit Server VM Java Vendor: Oracle Corporation Java Home: c:\program files\dbvisualizer\jre DbVis Home: C:\Program Files\DbVisualizer User Home: C:\Users\iamitc1 PrefsDir: C:\Users\iamitc1\.dbvis SessionId: 629 BindDir: C:\Users\iamitc1\.dbvis\[0] Look and Feel: WindowsLookAndFeel Screen 1: size: 1280 x 1024, refresh rate: 60, bit depth: 32 Screen 2: size: 1280 x 1024, refresh rate: 60, bit depth: 32 Monitor Running: No *** JVM Options (Application) ********************** -Xmx512m -XX:MaxPermSize=192m -XX:CompileCommand=exclude,javax/swing/text/GlyphView,getBreakSpot -Dsun.locale.formatasdefault=true -include-options ${USERPROFILE}\.dbvis\user.vmoptions -include-options ${HOME}/.dbvis/user.vmoptions *** Database Properties **************************** Alias: SQL Server - DCM at MLI Settings Format: Server Info URL: jdbc:jtds:sqlserver://MLIGBD21520:21520;DatabaseName=GB7D Driver: SQL Server (jTDS) Userid: slac\iamitc1 Preferred Database Type: sqlserver Current Database Type: sqlserver Preferred Profile: sqlserver Current Profile: null (not connected?) --- Object Type Settings --------------------------- None --- Overridden User Properties --------------------- sqlserver.AuthenticationMethod = Windows sqlserver.AutoCommit = false sqlserver.ConnectionModeMigrated = true --- Overridden Driver Properties ------------------- DOMAIN = mliddomain1 *** End Database Properties ************************ *** Driver Information ***************************** Name: SQL Server (jTDS) DefaultDriver: true DefaultClass: net.sourceforge.jtds.jdbc.Driver Paths: Path: C:\Program Files\DbVisualizer\jdbc\jtds\jtds.jar Type: dynamic Class: net.sourceforge.jtds.jdbc.Driver *** End Driver Information ************************* *** Current Connection Message ********************* An error occurred while establishing the connection: Long Message: Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. Details: Type: java.sql.SQLException Error Code: 18452 SQL State: 28000 *** End Current Connection Message *****************
[This reply is migrated from our old forums.]

Re: Connection to SQL Server error: JDBC/ODBC bridge
Hi Ian, Thanks. I notice that you have entered the Database Userid as "slac\iamitc1", i.e. with a domain name. I have suggested earlier that you should enter the username without the domain, i.e. "iamitc1" and instead specify the domain in the Domain field. You said you have tested this and got the same result, but I want to ensure that there is no misunderstanding about this because it may very well be the cause of the problem. I also see that you have entered "mliddomain1" as the Domain. That is different from the domain you specified for the user. In order for this to work, you need to specify the domain that the user belongs to, so that it can be authenticated. Best Regards, Hans
[This reply is migrated from our old forums. The original author name has been removed]

Re: Connection to SQL Server error: JDBC/ODBC bridge
Hello: I did as you suggested... same error: Product: DbVisualizer Pro 9.2.13 [Build #2491] OS: Windows 7 OS Version: 6.1 OS Arch: amd64 Java Version: 1.8.0_60 Java VM: Java HotSpot(TM) 64-Bit Server VM Java Vendor: Oracle Corporation Java Home: c:\program files\dbvisualizer\jre DbVis Home: C:\Program Files\DbVisualizer User Home: C:\Users\iamitc1 PrefsDir: C:\Users\iamitc1\.dbvis SessionId: 214 BindDir: C:\Users\iamitc1\.dbvis\[0] Look and Feel: WindowsLookAndFeel Screen 1: size: 1280 x 1024, refresh rate: 60, bit depth: 32 Screen 2: size: 1280 x 1024, refresh rate: 60, bit depth: 32 Monitor Running: No *** JVM Options (Application) ********************** -Xmx512m -XX:MaxPermSize=192m -XX:CompileCommand=exclude,javax/swing/text/GlyphView,getBreakSpot -Dsun.locale.formatasdefault=true -include-options ${USERPROFILE}\.dbvis\user.vmoptions -include-options ${HOME}/.dbvis/user.vmoptions *** Database Properties **************************** Alias: SQL Server - TNAVIGDCM (DCM) Settings Format: Server Info URL: jdbc:sqlserver://NMMQ1P44\DEV:1433;databaseName=TNAVIGDCM Driver: SQL Server 2008 (Microsoft JDBC Driver) Userid: iamitc1 Preferred Database Type: sqlserver Current Database Type: sqlserver Preferred Profile: auto Current Profile: sqlserver --- Object Type Settings --------------------------- None --- Overridden User Properties --------------------- sqlserver.ConnectionModeMigrated = true sqlserver.SQLCommanderMostRecentCatalog = TNAVIGDCM20160105 sqlserver.SQLCommanderMostRecentSchema = dbo --- Overridden Driver Properties ------------------- retrieveMessagesFromServerOnGetMessage = true *** End Database Properties ************************ *** Driver Information ***************************** Name: SQL Server 2008 (Microsoft JDBC Driver) DefaultDriver: false DefaultClass: com.microsoft.sqlserver.jdbc.SQLServerDriver Paths: Path: C:\Program Files (x86)\DbVisualizer\jdbc\sql server\sqljdbc4.jar Type: dynamic Class: com.microsoft.sqlserver.jdbc.SQLServerDriver *** End Driver Information ************************* *** Current Connection Message ********************* Microsoft SQL Server 10.00.2531 Microsoft JDBC Driver 4.0 for SQL Server 4.0.4621.201 *** End Current Connection Message ***************** *** Database Properties **************************** Alias: SQL Server - DCM at MLI Settings Format: Server Info URL: jdbc:jtds:sqlserver://MLIGBD21520:21520;DatabaseName=GB7D Driver: SQL Server (jTDS) Userid: iamitc1 Preferred Database Type: sqlserver Current Database Type: sqlserver Preferred Profile: sqlserver Current Profile: null (not connected?) --- Object Type Settings --------------------------- None --- Overridden User Properties --------------------- sqlserver.AuthenticationMethod = Windows sqlserver.AutoCommit = false sqlserver.ConnectionModeMigrated = true --- Overridden Driver Properties ------------------- DOMAIN = SLAC *** End Database Properties ************************ *** Driver Information ***************************** Name: SQL Server (jTDS) DefaultDriver: true DefaultClass: net.sourceforge.jtds.jdbc.Driver Paths: Path: C:\Program Files\DbVisualizer\jdbc\jtds\jtds.jar Type: dynamic Class: net.sourceforge.jtds.jdbc.Driver *** End Driver Information ************************* *** Current Connection Message ********************* An error occurred while establishing the connection: Long Message: Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. Details: Type: java.sql.SQLException Error Code: 18452 SQL State: 28000 *** End Current Connection Message *****************
[This reply is migrated from our old forums.]

Re: Connection to SQL Server error: JDBC/ODBC bridge
Hi Ian, Okay. So then the only remaining thing I can think of to ask if the database is really configured to accept logins from the "SLAC" domain? I'm out of other ideas and it looks like you are setting up the connection correctly so I suggest you discuss this with your DBA to see if there any issues with the domains and the database. Since you say you are able to access the database using the JDBC/ODBC Bridge driver, the ODBC DSN configuration could also give some clues. Best Regards, Hans