I have Runtime error that "Not associated with trusted SQL server connectiion" Please help me
This usually happens when you try to connect to a SQL Server db that has been set up with Windows Only Authentication (not Windows and SQL Server Authentication)...That can be changed if you have access to the DB.
See: http://decipherinfosys.wordpress.com/2008/11/14/the-user-is-not-associated-with-a-trusted-sql-server-connection/
Sounds like an authentication error with the SQL server. Check your connection string and your SQL server's authentication settings.
More info here, and of course here.
Related
I have a database Connection established in odbcad and Microsoft Access (aswell as working in Excel) via ODBC and want to also get it working in Oracle SQL developer.
It is a Windows SQL Server as far as i know and I have tried several Settings, of which None works. I have also installed Driver for ODBC. I would like to Import Settings into SQL developer as applied in MS Access, is there any possibility?
No, SQL Developer is a Java application and uses a JDBC driver.
But if you look at the odbc properties for your connection, those should largely translate to what you need to define a basic connection.
Oracle:
Server name or IP address of the DB, port # for the listener, and the name of the SID or Service, plus a valid username and password is all you need to connect to Oracle.
What error do you get when you try to connect?
Show us what you're trying.
Update:
You're trying to connect to SQL Server but you're getting"
Native SSPI library not loaded
You're trying to use OS Authentication for your connection. For this to work with the jTDS driver, you need to copy a DLL file named ntlmauth.dll (which is for NT authentication) under the jtds-x.x.x-dist\x86\SSO\ or jtds-x.x.x-dist\x64\SSO\, to any directories in the PATH environment.
Please update your question such that's it's clear you're connecting to SQL Server and share the error message so others can find it.
I imagine this question is a duplicate of many previous iterations of the same challenge.
I'm trying to connect to a Oracle database on a development server with my local Oracle SQL developer (17.4.1.054).
When I try to connect I get the following error: ORA-0107: invalid username/password; logon denied
Using the very same credentials on the sqlplus (after connection via ssh to the server) works perfectly fine.
The credentials are like: ORA/ora.
After thinking about it, I've other connections on same database with credentials like ora123/ora123 and ORA123/ORA123 that are working fine.
Is there any issue with case sensitive passwords in SQL developer?
Is there any way to overcome this issue?
Trying changing database parameter SEC_CASE_SENSITIVE_LOGON to false and they try login.
I think the clue is
after connection via ssh to the server
Sounds to me like the problem is the network connection from your local machine to the database server, and not SQL Developer or SQL*Plus.
You can verify that by installing an instant client with the SQL*Plus package on your local machine.
Anyone have an idea how to solve this problem?
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 taht the instance name is correct and that SQL Server is configured to allow remote connection. (provider: SQL Network Interfaces, error: 26 - Error locating Server/Instance specified)
Thanks in advance!
Make sure the instance of the server is started. Do this from Start Menu-> Microsoft SQL Server... ->Configuration Tools->SQL Server Configuration Manager->SQL Server Services
If it is not on your local machine, i.e. on a remote server, then your account needs a login on the SQL Server that is granted access to the DB you are trying to connect to.
Usually the local server instance by default is installed with access for yourself. But it doesn't hurt to check.
Also if it is remote, can others connect successfully? If not, then you may also need remote connections enabled on SQL Server.
Making sure you have the name of the instance correct is important. Slashes should be back slashes, not forward slashes. What are you using for the instance name?
I'm wanting to connect to an Azure SQL Server from jdbc.
I copy the connection string from the azure management console. It is something like:
jdbc:sqlserver://XXXX.database.windows.net:1433;database=YYYY;user=ZZZZZ#XXXX;password=PPPPPPPPPPP;encrypt=true;hostNameInCertificate=*.database.windows.net
When I try and connect with this value I get the following error:
com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not
establish a secure connection to SQL Server by using Secure Sockets
Layer (SSL) encryption. Error:
"java.security.cert.CertificateException: Failed to validate the
server name in a certificate during Secure Sockets Layer (SSL)
initialization. The server name is *.database.windows.net, the name in
certificate is data.am2-1.database.windows.net.
Then if I change the *.database.windows.net to data.am2-1.database.windows.net as it says in the exception it works fine.
So is it a problem to set this name? I feel like if it is a wild card as default then it is probably going to change? and when it does I assume I won't be able to connect anymore.
Has anyone else had this issue? I am using the most up to date jdbc drivers for SQL Server that I could find.
Turns out an upgrade of the sql server jdbc version to version 4.0 cleaned up the issue.
I've got the same issue on JDBC driver version 4.1, downgrading to 4.0 resolved issue
You can also add trustServerCertificate=true in your connection string, but it's not recommended from a security perspective.
I have done subsequent research on how to connect to SQL Server remotely and even configured it to allow remote connections.
Now I can connect to my sql server instance on remote computer through SSMS but while connecting through my vb.net application I get the exception
Login failed for USER.The user is from an untrusted domain and cannot
be used with windows authentication
Please help me to tackle this problem.
Here is my connection string
Server=ACLMUMBAI;Database=Agrichemdb;User ID=xyz;Password=xyz;Trusted_Connection=Yes;
Thanks in advance.
You could try with
Server=ACLMUMBAI;Database=Agrichemdb;User ID=xyz;Password=xyz;Trusted_Connection=False
Then you need SQL Servers authentication in mixed mode and that there is a SQL Server login as per UserID in above connection string, with matching password and with appropriate permissions against your database.
Let me say also that this solution is not very secure and, if this database is exposed on Internet, you need very strong passwords. And despite this you will get numerous brute-force attacks and unexpected guests.