ODBC connection gives Unknown Host error from Power BI - powerbi

I am using an ODBC driver of MarkLogic instance which I am using in Power BI to access MarkLogic database files.
I am using 64 bit ODBC driver and have set up the connection and tested the connection successfully. I have also accessed the MarkLogic files under Documents Database.
But today when I tried to connect from Power BI, it gives me this error:
Could not translate hostname "myhostname" to address : Unknown host
The same error is thrown when I am trying to test the connection in ODBC set up.
The driver used is Marklogic SQL.
MarkLogic is up and running, and there have been no changes done in any connection properties so far.

Related

Google big query data server connection with cognos Analytics 1116

I am trying to create google big query data server connection with cognos analytics on cognos portal but i am getting below error . I have followed all steps . Placed json in the driver folder inside cognos install directory along with all the simba jdbc driver but not sure where i am missing .I have installed simba odbc drivers as well , system dsn is also showing simba driver but still getting connection refused. My cognos setup is installed on windows server 2019 data center which is Virtual Machine hosted on GCP and port 80,443 traffic is also enabled.
XQE-DS-0006 Unable to logon to the data source.
[Simba]JDBC Connection Refused: [Simba]JDBC Required Connection Key(s): OAuthServiceAcctEmail; [Simba]JDBC Optional Connection Key(s): AdditionalProjects, AllowLargeResults, DefaultDataset, EnableHighThroughPutAPI, FetchThreadsPerResultSet, ForceHTAPI, HighThroughPutMinTableSize, IgnoreTransactions, KMSKeyName, Language, LargeResultDataset, LargeResultsDatasetExpirationTime, LargeResultTable, MaxResults, OAuthAccessToken, OAuthClientId, OAuthClientSecret, OAuthRefreshToken, ProxyHost, RequestGoogleDriveScope, StringColumnLength, Timeout, TimestampFallback, useQueryCache
Please see the following document which goes through the connection step by step.
Google big query data server connection with cognos Analytics 1116
Its most likely the JSON file is not in the JDBC connection URL.

How to get valid ODBC connection string from Microsoft Windows "ODBC Data Source Administrator (64-bit)" - Firebird case?

I have installed Firebird ODBC driver on my computer and I have entered data for the new connection inside Microsoft Windows "ODBC Data Source Administrator (64-bit)" and "Test Connection" was successful and I can also use this DSN (Data Source Name) from Power BI Desktop.
But now I am trying to use Firebird ODBC driver from other application (custom M Language connector, that works atop Firebird ODBC driver and that I develop to enable DirectQuery access mode in Power BI Desktop, ODBC drivers natively does not support DirectQuery access mode) and there I am required to provide ODBC connection string as one string.
I have formed (more or less intuitively) such string, e.g.:
User=SYSDBA;Password=masterkey;Database=D:\DB\ERP.FDB;DataSource=192.168.1.3;Port=3050;Dialect=3;Charset=UTF8;Role=;Connection lifetime=15;Pooling=true;MinPoolSize=0;MaxPoolSize=50;Packet Size=8192;ServerType=0;Initial Catalog=test;
But this string is rejected by Power BI Desktop with error message:
Unable to connect
We encountered an error while trying to connect.
Details: "ODBC: ERROR [08004] [ODBC Firebird Driver]connection lost to database
ERROR [01S00] [ODBC Firebird Driver]Invalid connection string attribute
ERROR [01S00] [ODBC Firebird Driver]Invalid connection string attribute"
My intention and wish is to grab already existing ODBC connection string that sits inside "ODBC Data Source Administrator (64-bit)" and use it for my connection, but the problem is that "ODBC Data Source Administrator (64-bit)" does not provide easily accessible way to get such fully formatted connection string from DSN entry.
So, my question is: how to read connection string from "ODBC Data Source Administrator (64-bit)" DSN entry. Specifically, how to do it from page that is used for Firebird ODBC driver.
You should read https://firebirdsql.org/file/documentation/html/en/refdocs/fbodbc20/firebird-odbc-driver-20-manual.html#fbodbc205-connection
If you already have configured DSN, you don't need anything else, just use "DSN=xxxx;".

How I do properly connect to an SQL server using Windows authentication?

I'm writing a program in Qt that connects to a local database and writes to it using QSqlDatabase, but I've been unable to get a working connection between my program and the server.
qdb = QSqlDatabase::addDatabase("QODBC");
qdb.setConnectOptions();
QString serverName = "KIRKWOOD\TESTCLOUD";
QString ipName = "tcp:10.150.94.197,1433";
QString dbName = "Puma";
QString connectionString = QString("DRIVER={ODBC Driver 17 for SQL Server};Server=%1;Database=%2;Trusted_Connection=Yes;").arg(ipName).arg(dbName);
qdb.setDatabaseName(connectionString);
bool connectionSuccessful = qdb.open();
if (connectionSuccessful) {
writeLogWithNewLine("Connected to database.");
}
else {
writeLog("Failed to connect to database.");
writeLogWithNewLine(qdb.lastError().text());
}
When I run this code I get the following error in my log:
"Failed to connect to database.
[Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: No connection could be made because the target machine actively refused it. [Microsoft][ODBC Driver 17 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. [Microsoft][ODBC Driver 17 for SQL Server]Login timeout expired QODBC3: Unable to connect"
When I replace ipName with serverName I get this error:
"Failed to connect to database.
[Microsoft][ODBC Driver 17 for SQL Server]Named Pipes Provider: Could not open a connection to SQL Server [53]. [Microsoft][ODBC Driver 17 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. [Microsoft][ODBC Driver 17 for SQL Server]Login timeout expired QODBC3: Unable to connect"
When I change the driver to "SQL Server" I get this error:
"Failed to connect to database.
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied. [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()). QODBC3: Unable to connect"
I've done a lot of research and made a lot of changes to my code, from changing the Driver type to changing the formatting of "Trusted_Connection=Yes" to "Integrated Security=True" but I've had no luck getting anything much different from these errors.
This is frustrating because in this same program I was able to connect to a dummy database using SQL authentication perfectly fine, and on top of that, using this same machine I'm able to connect to the database through Visual Studio's Server Explorer. I've even directly copy pasted the connection string from visual studio but still got nothing. Is there something else I need to do here?
I would greatly appreciate feedback.

Connecting to SAS libraries via ODBC

I am new to ODBC and trying to make a DSN in Windows ODBC administrator to call it from R using "RODBC" or similar R-packages.
I am able to find the "server name" and "database name" for anything on "SQL Server" driver. However, "SAS" driver does not let me find explicit names for server and database names. All I know is the URI where the data set is stored, also I can get the host name of the SAS server that stores the databases and its port. Is there a way to add it as a DSN or even call it directly from R? I have tried several permutations of these name and addresses but I constantly get the same error that odbc connection was not successful.
For example, after I followed the steps to add SAS server in ODBC administrator, and I used RODBC package in R, I got this result
odbcConnect("mydbname")
[1] -1
Warning message:
In RODBC::odbcDriverConnect("DSN=mydbname") : ODBC connection failed

Test connection failed in Informatica Developer

I am working with Informatica Developer - Power-Center. I have it installed on 2 computers: my local PC and the MS Server where the Informatica Server is also installed.
I defined a new connection and tested it by clicking Test Connection. On my PC the test works fine but when I test the connection on the server the test fails with the following error: "[REL_10611] Error returned during ODBC access. ErrorCode=[-1]. Reason=[[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified]."
Another strange thing is that the mapping that includes a relational data object that uses this connection works even on the server and adds row to the DB.
Does anybody know why this could be happening? Is this a bug in the Informatica Developer?
Did you create the ODBC data source on the server? The data source needs to be created on both your local PC and on the server. When using the Developer Tool (and the Power Center client tools for that matter), some operations are executed from your local workstation and some are executed on the Data Integration Service (DIS).