SQL Server 2008 R2 ODBC Error: SQL state HTY00 - sql-server-2008-r2

My application server (say 192.168.100.1) and database server (say 192.168.100.2) both are on the same domain. I'm trying to create an ODBC connection from the application server to a SQL Server database on the database server, but at the time of login it generates this error:
Microsoft SQL Server Login
Connection failed:
SQL State: 'HYT00'
SQL Sever Error: 0
[Microsoft][ODBC SQL Server Driver]Login timeout expired
I've checked all configuration for SQL Server and tried possible solutions without resolving this issue.
Important:
A DSN can be successfully created from my own PC but when attempting this server to server as described above, ODBC is facing this problem.

OK, I have got the solution. Sometimes, if SQL Server can't be found on network by its name while creating DSN in windows, the logging in takes time more than usual which tells ODBC manager that Database Server we are looking for is not responding or responding too late.
Solution.
Instead of selecting server from the list while making dsn, use 'server-ip\SQLExpress'.
e.g 192.168.100.2\SQLExpress.
Thats All.

Related

Has someone connected a PostgreSQL DB hosted in GCloud with Microsoft SSMS?

I have a question, I do not know how to solve it yet. Perhaps someone here has faced a similar issue.
We have a PostgreSQL DB hosted on Gcloud. We usually use a cloud proxy to connect with the database. It usually works very well!! In a nutshell the proxy connect a port from local host, to the actual DB host.
However this time, we want to connect it with Microsoft SSMS. We have not find an option where we can connect Microsoft SSMS with a DB running locally (this means connecting to a database on a port in local host).
The ultimate goal is to connect the database with Power BI. So if someone know how to connect a PostgreSQL DB hosted in GCloud to power BI that would also be very helpful!!
We have followed this tutorial:
https://www.anibalum.com.ar/2020/06/creating-linked-server-with-postgres.html
However we get the following error:
The linked server has been created but failed a connection test. Do you want to keep the linked server?
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "PAPERFLOWDB".
OLE DB provider "MSDASQL" for linked server "PAPERFLOWDB" returned message "[Microsoft][ODBC Driver Manager] Invalid connection string attribute".
OLE DB provider "MSDASQL" for linked server "PAPERFLOWDB" returned message "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified". (Microsoft SQL Server, Error: 7303)
We are using Microsoft SSMS v18.9.1

Can't connect to SQL Azure from EF, but can from SSMS

We have an Azure SQL server running which we use for our Azure Web App. The Web App can connect without a problem. We're trying to remotely update the database with the latest EF migrations via a C# console application.
However we get the following exception.
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)
We tried connecting from the same PC with SSMS and we got in without any problems. And yes, before anyone asks we whitelisted the IP in Azure, else we wouldn't even had access via SSMS. We also tried with and without "tcp:" in the connectionstring.
This is the connectionstring we use in the Web and Console Application:
Server=tcp:{servername}.database.windows.net;Database={dbname};user id = {userid};password = {password};MultipleActiveResultSets=True;
In SSMS we just use {servername}.database.windows.net and use the credentials.
Thanks in advance.
We haven't been able to solve this issue. We instead chose to go with ReadyRoll, which suits us fine.
Azure SQL requires secured connection. You have to add the following to your connection string:
Trusted_Connection=False;Encrypt=True;

Tableau - SQL Server Connection

I have installed Tableau Desktop 9.3 on my Machine. When I try connecting to Microsoft SQL Server as per this tutorial, I don't see any to a server or to a file option.
It just shows as below
How can I connect to server or file using tableau?
You will see a option called To a Server option below where you will find sql server connection.

Crystal Reports in C#

Actually i try to make the crystal report of my database table values, so far i reached the primary stage of SQL connection. whenever i choose the new connection it seems to produce some errors like,
A network-related or instance0specific error occured while establishing a connection to SQL Server. The serve was not found or was not accessive. Verify that the instance name is correct and that SQL Server is configured to all allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
can anyone pls guide me to generate the crystal report.
Thank you,
Arunkumar M
From the error message you seem want to connect over Named Pipes. Check in SQL Server Configuration Manager if you have enabled Named Pipes
Also you can use PortQueryUI [http://www.microsoft.com/en-us/download/details.aspx?id=24009] to see if your SQL Server is from your location accesible and if it listens on Named Pipes.
Alternatively you could try to connect over TCP/IP port 1433. Also check in SQL COnfiguration Manager if you have TCP/IP enabled and check in PortQueryUI if SQL Servers TCP ports are open.

SQL Server 2008 R2 not connect to server

I have installed the SQL server 2008 R2 on windows 7, when i want to connect database engine it give the following error message
TITLE: Connect to Server
Cannot connect to (local).
ADDITIONAL INFORMATION:
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)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476
I tried both window and SQL Server authentication but no success.
please help.
First Check whether any SQL Server Instance is running and exists.
You can check list of instances as per below:
Go to command prompt and type in “osql -L” or “sqlcmd -L”.
If instance is showing in list then check your credentials.
Start the sqlserver service. Nothing to do in stackoverflow. Move question to serverfault.