How can I change "Connection Timeout" connection string on unixODBC connector to MS SQL Server? - unixodbc

I want to increase my connection string "Connection Timeout" property in a unixODBC set up I have connecting a HANA DB to MS SQL Server- which I installed out of the box, and I only know how to configure it via the .odbc.ini.
Would anyone know how I can increase the Connection Timeout setting from default in the .odbc.ini?
[SOURCENAME]
DRIVER=/opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2260.0
ServerName=<server>:<port>
Database=<DBName>
ConnectionTimeout=????

Related

JDBC inactivity timeout (MS SQL Database)

On my setup with a JDBC driver that connects to a Microsoft SQL Server 2019 database, I experience the following "connection broken" error if there is more than ~12h inactivity.
The error is:
The connection is broken and recovery is not possible. The connection is marked by the client driver as unrecoverable. No attempt was made to restore the connection.
How to extend that inactivity timeout? Is it a setting of the MSSQL server?
Trying to find an appropriate setting for the JDBC connection. I could not find any.

Cannot connect DBeaver SQL Server to Rider, although DBeaver PhpMyAdmin MySQL connection works on Ubuntu

First of all, I work on UBUNTU, so please do not give me Windows solutions.
I want to connect my SQL Server (which is configured in DBeaver) to Rider (JetBrains).
Through DBeaver, I managed to establish a MySQL connection to PhpMyAdmin, via port 3306; this means that I can modify my PhpMyAdmin MySQL database x from SQL Server (DBeaver). However, when I intend to add a new Microsoft SQL SERVER connection in Rider (writing the correct username, password, database, server host and port) and test the connection, the classic error pops up:
[08S01] The TCP/IP connection to the host localhost, port 3306 has failed. Error: "The driver received an unexpected pre-login response. Verify the connection properties and check that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. This driver can be used only with SQL Server 2005 or later.". ClientConnectionId:69c13d8a-1f4f-4faf-ba64-b3a9b2ebcd13.
Note that if I connect to Rider via MySQL, everything works. The problem I face is SQL Server.
UPDATE:
It does not work on port 1433 either
UPDATE:
DBeaver MySQL connection

Setting up/troubleshooting ODBC connection for SQL Server 2014

I've set up ODBC connections to databases before, but I'm currently having problems and can't seem to figure out what I'm missing. This isn't my area of expertise, and the Microsoft help/documentation is less than 'user friendly'. Appreciate any pointers.
I have a locally running instance of SQL Server 2014, with a couple of test databases I'm using to develop another application. Here's the info on the setup:
SELECT HOST_NAME() AS 'host_name()',
##servername AS 'ServerName\InstanceName',
SERVERPROPERTY('servername') AS 'ServerName',
SERVERPROPERTY('machinename') AS 'Windows_Name',
SERVERPROPERTY('ComputerNamePhysicalNetBIOS') AS 'NetBIOS_Name',
SERVERPROPERTY('instanceName') AS 'InstanceName',
SERVERPROPERTY('IsClustered') AS 'IsClustered'
query returns:
host_name() ServerName\InstanceName ServerName Windows_Name NetBIOS_Name InstanceName IsClustered
DECATHLETE DECATHLETE\SQLEXPRESS DECATHLETE\SQLEXPRESS DECATHLETE DECATHLETE SQLEXPRESS 0
In the Windows ODBC Data Source Administrator (64-bit) - I'm running W10 in a VMWare VM on Mac, btw - the server shows up as available when I try to configure a new System DSN. Following is the setup info:
Microsoft ODBC Driver for SQL Server Version 12.00.2000
Data Source Name: TEST
Data Source Description:
Server: DECATHLETE
Use Integrated Security: Yes
Database: (Default)
Language: (Default)
Data Encryption: No
Trust Server Certificate: No
Multiple Active Result Sets(MARS): No
Translate Character Data: Yes
Log Long Running Queries: No
Log Driver Statistics: No
Use Regional Settings: No
Use ANSI Quoted Identifiers: Yes
Use ANSI Null, Paddings and Warnings: Yes
Testing connectivity generates the following error message:
Microsoft ODBC Driver for SQL Server Version 12.00.2000
Running connectivity tests...
Attempting connection
[Microsoft][ODBC Driver 11 for SQL Server]Named Pipes Provider: Could not open a connection to SQL Server [2].
[Microsoft][ODBC Driver 11 for SQL Server]Login timeout expired
[Microsoft][ODBC Driver 11 for SQL Server]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.
TESTS FAILED!
I've confirmed access to the databases from SQL Server Management Studio. The login uses windows authentication with no password. I can get in, play with databases, run queries, etc. (See picture below).
I'm at a loss. I'd previously created ODBC connections with no problems. This seems to have cropped up as an issue since upgrading the virtual machine from W7 to W10. Hoping someone can point out an obvious oversight.
* Update *
Adding a screenshot of the ODBC configuration wizard below. Note that the SQL Server is showing up in the list of available servers on the wizard. So it seems to be seeing the server but failing to connect to it.
In the "Create a New Data Source to SQL Server" dialog/window, the incorrect "Server name:" is specified. Since you have a named instance of SQL Server, type in the name of the SQL Server host, a backslash, and the instance name. Here is the format: SQLHostName\SQLInstanceName.
Please check, whether you're allowing remote connections to the SQL Server using the 'Microsoft Sql Server 2014\Configuration Tools\Sql Server Configuration Tool' utility.
Go to Sql Server Network Configuration and make sure you allow TCP/IP for remote connections.
Also I'd try to play with Windows Firewall on the Sql Server PC.
I've been searching for a solution to this issue for a while now. I am trying to link SQL tables on another server to a Microsoft Access front end to make use of the Forms for data entry etc.
The comments here solved the issue and I thought I would provide a consolidated solution for clarity:
From the SQL Server Connection Manager:
Enable SQL Server Browser
From 'SQL Server Services', modify the Properties of the 'SQL Server Browser' and set the 'Start Mode' to 'Automatic'. Apply the changes and exit.
Start the 'SQL Server Browser'.
Enable TCP/IP
From 'SQL Server Network Configuration' -> 'Protocols for [your server name]', then enable TCP/IP.
Then create an ODBC connection from your local computer. From there I used the named ODBC connection in access to link the tables I needed.

SQL Server 2008 SSMS connection and http connection string?

I have a SQL Server 2008 on a server which goes out on the internet through a domain name computer.example.com, I want to develop a .net app on my PC and to connect to that database through SSMS - to create tables and so on...
And I still want a connection string which can be accessed from anywhere - I'm thinking at a http url or something like that - which will be consumed by the app.
What do I must to configure on the server so that I can connect via SSMS to the database (from my PC) and how do I get a connection string to that database?
you can use Sql Server Configuration Manager for this work. when you run this application, expand the SQL Server Network Configuration, after that you can see Protocols for sql server 2008. by click on it you can enable or disable TCP/IP.
your connection string can be like this :
connectionString="Database=DBName;Server = Server IP;Integrated Security=false;user id=sa; password=Pass;

CLASSIC ASP - SQL Server does not exist or access denied

I'm trying to make a connection to a SQL Server Express DB on localhost, but I get the following error message:
Microsoft OLE DB Provider for SQL Server (0x80004005)
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
access denied.
The code I'm using is
Dim connection
Set connection = CreateObject("ADODB.connection")
connection.connectionString = "server=localhost;Provider=SQLOLEDB;Data Source=RiskManagement;Initial Catalog=RiskManagement;User ID=sa;Password=myPass;"
connection.Open()
Any ideas?
First thing to always check is that you have configured SQL Server to allow remote connections.
How to configure SQL Server 2005 to allow remote connections
For generic SQL Server Connectivity Troubleshooting consult the following Blog Post
I also faced same issue, when I investigated around the network connectvity then I come to know from application server (example Windows 10.10.10.10 or AppServer) is unable to connect database server (Like DBServer or 10.10.10.11). So once check whether it's pinging from the application server, where application is hosted or located.
I got this issue because ESET firewall was on.
I installed an update of a VB6 program. The new .exe had to be entered into the firewall

Resources