Microstrategy 10.4 SQL ODBC Connection error - sql-server

I've tried to connect an SQL database from a server with Microstrategy located in another server through an ODBC connector for SQL.
First I've checked that there is a connection between the two servers executing a ping sentence with the IP Address the other server and it went through.
After making sure the connection is stablished without issues, I've tried to connect through Microstrategy without success. The error I get is the following message:
"Connection test error: Connect failed. Error type Odbc error. Odbc operation attempted: SQLDriverConnect (08001:0: on SQLHANDLE)"
Using SQL Server 2017 for the databases and Microstrategy 10.4.
Please, anybody has any clue about what might be happening?
Thanks,

look at the type of connector to the db you have. It gave me the same error until I used: "with Native Client Driver".

Could you please share the complete error message, SQL Handle error are associated with multiple error scenarios like invalid username * password, connecting 64 bit server with 32 bit ODBC driver etc. Complete error message would help me to debug it.
In general follow the steps to debug the error, (any order)
Check the version of ODBC Connection (64bit / 32 bit), it should be the same as server version.
Try testing the ODBC connection that you have created using ODBC Administrator tools to see whether there is an problem with username & password/server name or database connection issue.
Check the Database Instance/Database Connection/User Login created under the Administration option to ensure everything is working and give the correct value.
if nothing works try using the native driver given by MicroStrategy, you can access this using Connectivity Wizard.
Hope it helps..

Related

Firebird ODBC Setup Error

I have a Firebird Database (v2.5) which lives on a server with hostname "FBDEVDB". I am working on a separate server on which I have installed SQL Server to begin the process of migrating the tables and data into a SQL Server database.
I saw several posts discussing that this can be done using the Import Data feature of SSMS with an ODBC connection to the Firebird DB. So, I have downloaded and installed the Firebird ODBC Driver 64-Bit. When I went to configure my DSN I first got an error regarding a missing gds32.dll. Looking into it further, I realized I needed the fbclient.dll from the Firebird files. I've copied it over to my SQL Server machine, and now the gds32.dll error is gone, and I can tell it is TRYING to connect to the Firebird instance because if I provide an incorrect username/password it tells me my login is incorrect.
However, when I use a valid login/password, I get the following error message
I have defined the following fields in the ODBC setup
Database: FBDEVDB::C:\Firebird\MYDATABASE.FDB
Client: C:\Temp\fbclient.dll
Database Account: SYSDBA with VALID PASSWORD
What am I missing? I can not seem to find any information on what this error means.
Thank you!!!!!

ODBC SQL Server Driver Login timeout expired

I'm failing to connect to a SQL server SQLExpress. The connection worked fine a few days ago.
This is how I tried to connect (I'm using Microsoft SQL server management studio):
connection = pyodbc.connect("DSN=sqlServer; UID=myuser;PWD=mypassword")
cursor = connection.cursor()
The error I get:
('HYT00', '[HYT00] [Microsoft][ODBC SQL Server Driver]Login timeout expired (0) (SQLDriverConnect)')
In the ODBC Data Source Administrator, when I test the data source I get:
I got the similar issue.
The problem was actually I was using "SQL Server" as the driver in my ODBC settings in my DSN.
The driver should be "SQL Server Native Client 11.0".
It fixed the issue for me.
Because you are having the same issue in the ODBC Data Source Administrator I would try to focus on that first not on your code.
Here you can find a list with possible problems
Maybe this can help you find out what the problem is.
I also would try to connect with the SQL Server Management Studio.
Maybe it is possible to connect with a different user or via Windows login.
That would mean that your user might not exist anymore (maybe because you renewed tha database or something).
Also I sometimes have the problem that the SQL Server is not started either locally or on the server.
Maybe you could check if the service is started and the database is running.

Cant connect to the Azure SQL Database

For the past month I have been using Microsoft SQL Server Management Studio tool to connect to my database which created on the Azure portal. Recently I received updates from Microsoft related to Microsoft Visual Studio. After I installed these, I can't connect to my SQL database (previously it was working fine). Update History Screenshot I attached the screenshot of recent updates (which I installed) and the error message for your view.Error Message
Please help to solve this issue.
note: I am an SQL beginner, so I don't know many technical things related to tools, so please keep your answers to my level, Thanks!
Update: Error Message
TITLE: Connect to Server
Cannot connect to abcxyz.database.windows.net.
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: 53)
The network path was not found
This error means that you tried to create a connection to an endpoint and you were expecting a acknowledgment from sql server, however, that acknowledgement did not occur. This means that you are either blocked by your own network, a network in route, or the endpoint network (which all three could be your own if, running locally). I would start by pinging that server ip address and seeing what you come up with.
that problem solved automatically, when I tried to keep connecting. really I don't know what was the problem..thanks for ur reply guys.

Connecting to SQL server, getting error 2013 (HY000) Lost connection

I am on Linux, trying to connect to SQL server.
Using sqlplus, as below:
sqlplus username/password#server:port;
Getting ORA-12537 error - "TNS: Connection closed". This error comes after a long wait.
While trying to figure out what the issue was, I got -
"TNSPING server:port" returned error : TNS-12537 TNS Connection closed.
"TELNET server port" is working fine. It shows connected status.
Also tried using Easy connect after reading another post LINK. This is the command I tried "sqlplus username/password#//server/port". It gave me error ORA-12541 : TNS: No listener.
Just want to add that I am able to connect to an Oracle db using sqlplus, with no problem.
Version is 10.2.0.4.
Any idea how to fix this? Appreciate the help!
UPDATE: I did not know sqlplus can't connect to SQL server. I tried connecting using mysql, but got an error:
MYSQL -h server -P port -u username -ppassword
returned error : ERROR 2013 (HY000): Lost connection to mysql server at 'reading initial communication packet', system error 104. This error also comes after a long wait.
Thanks for your help!
You will need an SQL Server specific client to connect to SQL Server, sqlplus is a oracle client and mysql is a command line client for the mysql server. Microsoft provides a JDBC driver at http://msdn2.microsoft.com/en-us/data/aa937724.aspx or a Linux ODBC driver at http://www.microsoft.com/download/en/details.aspx?id=28160. This might help if you have some kind of software that can use those drivers, e.g. RazorSQL (http://razorsql.com/features/sqlserver_features.html)

How to fix native client error 'Connection is busy with results for another command'?

I'm getting a Connection Busy With Results From Another Command error from a SQLServer Native Client driver when a SSIS package is running. Only when talking to SQLServer 2000. A different part that talks to SQLServer 2005 seems to always run fine. Any thoughts?
As I just found out, this can also happen on SQL 2005 if you do not have MARS enabled. I never even knew that it was disabled by default, but it is. And make sure you are using the
"NATIVE OLEDB\SQL Native Client" connection type. If you're using the "OLEDB.1" type connection (or whatever...) MARS is not even an option, and you get the SQL 2000 behavior, which is nasty.
You can enable MARS by opening the connection properties, and clicking "All", and scolling down in Management Studio.
I know your question has long since been answered, but I'm just throwing this in for the next sucker like me who gets burned by this.
Had this error today with MS ODBC Driver 11 for SQL Server for Linux to SQL Server connection. Wanted to help next searcher considering this was the first Google search result when I made the search.
You need to set MARS_Connection in /etc/odbc.ini as following:
[ConnName]
Driver=ODBC Driver 11 for SQL Server
Server=192.168.2.218,1433
Database=DBNameHere
MARS_Connection=yes
Speaking of MS ODBC Linux Driver: It is a complete PITA to deal with it but I insisted using native solution. I experienced too many walls especially working with ZF2, however, every trouble has a solution with the driver I can say. Just to encourage people using it instead quickly give up.
If somebody met this annoying bug while using PHP PDO with ODBC, then use closeCursor() method after query execution.
Microsoft KB article 822668 is relevant here:
FIX: "Connection is busy with results for another command" error message occurs when you run a linked server query
Symptoms
Under stress conditions, you may receive the following error message when you perform linked server activity:
Server: Msg 7399, Level 16, State 1, Procedure <storedProcedureName>, Line 18 OLE DB provider 'SQLOLEDB' reported an error.
OLE/DB Provider 'SQLOLEDB' ::GetSchemaLock returned 0x80004005:
OLE DB provider SQLOLEDB supported the Schema Lock interface, but returned 0x80004005 for GetSchemaLock .].
OLE/DB provider returned message: Connection is busy with results for another command
OLE DB error trace [OLE/DB Provider 'SQLOLEDB' ::CreateSession returned 0x80004005.
Note The OLE DB source of the error may vary. However, all variations of the error message include the text "Connection is busy with results for another command".
Resolution
To resolve this problem, obtain the latest service pack for Microsoft SQL Server 2000.
As noted there, the problem was first corrected in SQL Server 2000 Service Pack 4.
This blog post by Mark Meyerovich, a Senior Software Engineer at RDA Corp, also provides some insight (now archived, because the original link went dead):
SQL Server service pack upgrade
A quick search on Google turns up the following article (http://support.microsoft.com/kb/822668):
FIX: "Connection is busy with results for another command" error message occurs when you run a linked server query.
It basically implies the issue is a bug and recommends an upgrade to Service Pack 4. We have started out with SQL Server 2000 SP3 and we do have some linked servers in the equation, so we give it a try. After the upgrade to SP4 – same result.
Just for information if somebody else have the problem. I tried connecting via NetCobol of Fujitsu on an SQLEXPRESS via ODBC with embedded sql and to solve the problem I had to change a value in the registry namely
\HKLM\Software\ODBC\ODBC.INI\MyDSN
with MyDSN as a string value:
Name - MARS_Connection
Value - Yes
I just put the information here if it can help.

Resources