I am new to DBvisualiser. I am working on private laptop, installed SQL Server Management Studio 18 and DBVisualiser. In SQL Server the connection is not encrypted and using windows authentication. TCP/IP enabled.
IN DBVisualizer I am using existing driver - JDBC
I get error
failed to login for user -***
what is missing here?
I'm trying to connect to pentaho 9.1 to Azure SQL Server in Windows desktop Environment and I'm receiving the following error message:
Driver class 'net.sourceforge.jtds.jdbc.Driver' could not be found, make sure the 'MS SQL Server' driver (jar file) is installed.
net.sourceforge.jtds.jdbc.Driver
I've already downloaded JDBC driver from Microsoft and copy mssql-jdbc-9.2.0.jre8 to lib path or mssql-jdbc-9.2.0.jre11 to lib path as well. I already did copy mssql-jdbc_auth-9.2.0.x64.dll to \libswt\win64.
Some idea of what should I do?
I got !
just download the driver from https://sourceforge.net/projects/jtds/files/
Answer's source - https://forums.pentaho.com/threads/217129-How-to-connect-PDI-with-MS-SQL-Server-2016/
How to connect JDBC to Microsoft SQL Server so that I can test my SQL Server database in JMeter.
I am using Apache Jmeter 2.13. I have put the sqljdbc4.jar file in JMeter/lib folder. I also created a very simple database in Microsoft SQL Server Management Studio where my server name is localhost and I have used windows authentication to connect to my server. Then in JMeter I have used the following properties in JDBC Connection Configuration :
Database URL:jdbc:sqlserver://localhost:1433;DatabaseName=JmeterTestDatabase.
JDBC Driver Class:com.microsoft.sqlserver.jdbc.SQLServerDriver.
Username:ABC-PC\ABC.
Password: Somepassword.
When I run the test I get the following error:
com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user
'ABC-PC\ABC'. ClientConnectionId:7c9e308b-1bdc-4513-8386-5bc51f249029
What is going wrong here?
Log in failed is a clear message we are seeing , please check it once again.
TRY this as well, I have given below by assuming username as "ABC-PC\ABC" and password as "Somepassword" change accordingly.
Database URL:jdbc:sqlserver://ABC-PC\ABC/Somepassword#localhost:1433;DatabaseName=JmeterTestDatabase.
JDBC Driver Class:com.microsoft.sqlserver.jdbc.SQLServerDriver.
I'm trying to use PHP to connect to an ODBC data source using Windows authentication. I can connect just fine to the server in SQL Server so I know it's running. When I try to run the command
$link = odbc_connect("my_odbc","","");
I get the error:
"Warning: odbc_connect(): SQL error: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Login failed for user ''., SQL state 28000 in SQLConnect in C:\Users..."
I tried:
$link = odbc_connect("Driver={ODBC Driver 11 for SQL Server};
Server='my_odbc';Integrated Security=SSPI","","");
Which returned the message:
Warning: odbc_connect(): SQL error: [Microsoft][ODBC Driver 11 for SQL Server]Named Pipes Provider: Could not open a connection to SQL Server [53]. , SQL state 08001 in SQLConnect in C:\Users..."
Not sure what I'm doing wrong.
my_odbc is a SQL Server (2008) on a different machine. I don't have admin privileges on that database so I can't change anything on that end (such as enabling SQL Server authentication).
I am running Windows 7 and using PHP Version 5.6.12
phpinfo() indicates that ODBC Support is enabled as well as pdo_sqlsrv support
Maybe you should try PDO (the performance difference isn't that great) with SQLsrv plugin (this what I'm using to connect to my other boss' software which use SQL Server 2008 database):
$connection = new PDO("sqlsrv:Server=" . $this->sourceServer . ";Database=" . $this->sourceDB, $this->sourceUser, $this->sourcePW);
$connection->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
You can download the plugin here
https://www.microsoft.com/en-ca/download/details.aspx?id=36434
In Xampp, you must copy the dll in that folder:
C:\xampp\php\ext
And you must add that line to your php.ini
extension = php_pdo_sqlsrv_56_ts.dll
Note: Don't forget to restart your server so it can take in account the new php.ini file.
Let me know if it works for you
This error is a General Error that arises due to unable to establish connect to the server for some reasons. Its important to know what server are you using with PHP and the application used with it. Example Apache, Xampp or Wamp etc.
Here are somethings you could try like.
Let me brief, below are the reference links.
Check whether it pings
Enable TCP/IP connection SQL Server Configuration if not enabled. To do so, Open SQL Server Configuration Manager -> SQL Server Network
Configuration->Protocols for SQL server->TCP/IP(set to enabled).
Restart SQL services.
Enable Remote Connection from server
Open the Port, To do so Windows Firewall Settings-> Exceptions -> add a Port (Name:SQL;Port:1433;TCP) then from Exceptions tick SQL and save.
Enable running browser services.SQL Server Configuration Manager -> SQL Server Services - > SQL Server Browser set to running.
defining Port in connection string
add instance name with machine name if more than one instance is being used
sample
$user = 'username';
$pass = 'password';
//Use the machine name and instance if multiple instances are used
$server = 'serverName\instanceName';
//Define Port
$port='Port=1433';
$database = 'database';
$connection_string = "DRIVER={ODBC Driver 11 for SQL Server};SERVER=$server;$port;DATABASE=$database";
$conn = odbc_connect($connection_string,$user,$pass);
here are useful links that i found regarding the issue
resolving could not open a connection to sql server-errors
sql server provider named pipes provider error
Have a look at these links too
Named Pipes Provider: Could not open a connection to SQL Server [53]
Someone had the same error message and asked and answered his own question here.
To quote...
I´m sorry for the troubles.
The problem was, that I was using SQL Server Native Client 11.0 as driver. I switched it to SQL Server and now it works :/
Hopefully this at least helps someone, being in a similar problem....
A significant omission from your question is how you are running PHP and with which credentials.
Assuming you are using IIS or Apache (or another web server), then your PHP process is probably running under the local system account:
Since this account is local it doesn't have any authorisation to access your remote SQL Server.
You could alter the IIS/Apache service to run with the credentials (yours?) that are authorised to connect to SQL Server, but be aware this might cause other permissions issues with the service as well as being a problem if you change your password in the future.
Try running a test script from the command line (which should run with your credentials by default) to determine where the problem is:
php -r "var_dump(odbc_connect(...));"
Look at the regedit HKLM/SOFTWARE/ODBC
what is your folder name ?
If there is a "SQL Server Native Client 11.0" then you have to write your php code like
odbc_connect("Driver={SQL Server Native Client 11.0};Server=ip;Database=db;", "user", "pass");
However some of the server like server 2008 will be record this odbc like
ODBC Driver 11 for SQL Server
Then you have to replace SQL Server Native Client 11.0 by ODBC Driver 11 for SQL Server.
You have to create an ODBC interface first. In principle, this should also work without a user and pw. If defined in interface.
$pdo = new PDO('odbc:dsnName','user','pw');
Enable in IIS on Manager PHP o PDO_ODBC:
I have authenticated by Windows with following PHP statement:
$ Conn = new PDO ("odbc: Driver = {SQL Server}; Server = JAMILI-PC \ SQLEXPRESS; null; null");
I am using Windows 2008.
I hope it solves your problem.
When I start Sonar (StartSonar.bat), I get the following error in the log file.
Wrong column type in SONAR.dbo.rules for column description.
Found: ntext, expected: nvarchar(max)
Looking at the column in SQL Server Management Studio it is nvarchar(max)
I'm running:
DB: SQL Server 2005
OS: Windows 7 64 bit
Sonar: 2.11
Tried these drivers:
sqljdbc-1.2.2828.100.jar
sqljdbc4.jar (Microsoft SQL Server JDBC Driver 2.0)
sqljdbc4.jar (Microsoft SQL Server JDBC Driver 3.0)
sqljdbc4.jar (Microsoft SQL Server JDBC Driver 4.0)
My MSSQL Properties:
sonar.jdbc.url: jdbc:sqlserver://localhost;databaseName=SONAR;
sonar.jdbc.driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
sonar.jdbc.validationQuery: select 1
sonar.jdbc.dialect: mssql
I'm using a user name and password (SQL Authentication) to connect the DB
Note to self: When trying to connect to MSSQL remember to Enable TCP/IP. This is found in the SQL Sever Configuration Manager;SQL Server 2005 Network Configuration;Protocols for MSSQLSERVER;TCP/IP
I thought it might be a driver issue, but I'm not sure
Anyone else seen this?
I wasn't able to solve this via the sqljdbc drivers so I took some advise from another post and fell back to the jTDS driver http://jtds.sourceforge.net/index.html
The post I used was Sonar MsSql Database Issue
My Setup:
Sonar 2.11 unzipped to C:\Sonar\sonar-2.11
The steps I made (paraphrased)
Download jTDS drivers from jTDS Drivers Unzip it somewhere, I suggest C:\jDST
Add the DLL to the system path. (C:\jDST\jtds-1.2.5-dist\x64\SSO)
Copy the jar file (C:\jDST\jtds-1.2.5-dist\jtds-1.2.5.jar) to the extensions folder
(C:\Sonar\sonar-2.11\extensions\jdbc-driver\mssql)
Update the sonar.properties
sonar.jdbc.url: jdbc:jtds:sqlserver://localhost:1433/SONAR
sonar.jdbc.driverClassName: net.sourceforge.jtds.jdbc.Driver
sonar.jdbc.validationQuery: select 1
sonar.jdbc.dialect: mssql
Note: in case you connect to the named instance, this must be specified explicitly in the connection URL: jdbc:jtds:sqlserver://localhost/SONAR;instance=SQLEXPRESS
Run the bat file StartSonar.bat (C:\Sonar\sonar-2.11\bin\windows-x86-64\StartSonar.bat)
Check your logs and go to the site http:// localhost:9000