How do I connect from Azure Data Factory to a Firebird/InterBase (Syntess) database? - odbc

In ADF, I have created a pipeline. The source is an ODBC table or query. The next step is to create a Linked Service. The Integration Runtime has been created and selected as you can see below.
Now comes the question: What connection string am I supposed to enter?
Attempts with Server=192.168.1.35; Database=dbname;DSN=IP/port;UID=userId;PWD=password; resulted in ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

In the below format, fill in the values and test the connection:
DRIVER=Firebird/InterBase(r) driver;UID=[userid];PWD=[password];DBNAME=[IP and optionally /port]:[C:\example\atrium.FDB]

Related

How do I connect to serverside DB like SQLite in UIPath?

I am trying to connect to a SQLiteDB that is on my computer. But could easily be on my workstation. I have created a DNS for it in ODBC with a downloaded driver but I'm stuck on how I can connect to this DB in UIPath.
Drag the Database > Connect activity into your sequence or flowchart
Click on “Configure Settings” and then connection wizard
Select for Data Source and “.Net Framework provider for ODBC” for Data Provider
Click OK
Select the ODBC DSN name
If the database requires a user/password, enter that too.
Then click on test connection, should get a pop up that says "Test Connection succeeded"
What it will output is a Database Connection.
While the focus is on the database connection Activity, go to the output section and in the Database Connection, create the variable (Control K) and name the variable.
From here, you can use the connection and other database activities to manipulate it

Linked server INSERT, UPDATE and DELETE fails with "Unknown provider error"

Suddenly INSERT, UPDATE and DELETE fails for a certain file (a table in a remote system which I believe is an AS/400).
The linked server that we make use of is set up in SQL Server, and it's using an ODBC data source (DSN). The Data source is an "ODBC-data source for iSeries Access for Windows".
Only one single table has this problem. We can make inserts and updates in other tables using the same linked server, without any errors, and SELECTs still work for the problematic table.
We get these messages for INSERT and UPDATE statements (server and DB names replaced in the code below):
Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "MSDASQL" for linked server "MYSERVER" reported an error.
The provider did not give any information about the error.
Msg 7343, Level 16, State 2, Line 1
The OLE DB provider "MSDASQL" for linked server "MYSERVER" could not INSERT INTO
table "[MYSERVER].[MYDB].[DMPCOM].[DMPXIF]". Unknown provider error.
And DELETE gives this message:
The OLE DB provider "MSDASQL" for linked server "MYSERVER" could not delete from
table ""MYDB"."DMPCOM"."DMPXIF"". There was a recoverable, provider-specific
error, such as an RPC failure.
If you have any clues to this, please don't hesitate to answer this question.
Thanks,
Andreas
The reason to the error was that journalling had been turned off on the AS400 file, that we connect to from SQL Server using linked server and an ODBC iSeries datasource. This had also turned commitment control off.
Setting commit to "Commit immediate (*NONE)" on the ODBC iSeries datasource did however not help. (Perhaps there is more to it than changing that setting.)
The database administrator of the AS/400 system recreated the table with its default settings, including journaling and commitment control, and then it was all back to normal, and insert, update and delete worked, from the linked server connection.

What connection string to use to read sqlite db from powerpivot using SQLite ODBC driver

I'd like to import that data contained in a sqlite file to PowerPivot. I downloaded an ODBC driver for sqlite (http://www.ch-werner.de/sqliteodbc/) to accomplish this. In PowerPivot I selected "Home" > "Get External Data" > "From Other Sources". I scrolled down to "Others (OLEDB/ODBC). Selected it and clicked next.
TheFor the connection string. I found this website: http://www.connectionstrings.com/sqlite and I tried the connection string at the bottom suggested for SQLite3 ODBC Driver:
DRIVER=SQLite3 ODBC Driver;Database=c:\Chinook_Sqlite.sqlite;LongNames=0;Timeout=1000;NoTXN=0;
SyncPragma=NORMAL;StepAPI=0;
(I'm using a sample database that I put at the root of my c:. The db if from here: http://chinookdatabase.codeplex.com/releases/view/55169 )
With this connection string when I Test the Connection I get the following error message:
The test connection failed because the provider could not be initialized. If you contact Microsoft support about this error, provide the following message: Faile to connect to server. Reason: Provider information is missing from the connection string. Add the provider information and try again.
I understand that the driver I installed is not found, but I don't know how to correct the connection string to point to the driver dll.
This solution came after many hours of research and trial-and-error. Though it came 2 years late, I am putting it up to help others trying to import information to Power Pivot 2013 from SQLite.
Step 1: Install SQLite ODBC Driver from here.
Step 2: Create a DNS by opening Windows' 'ODBC Data Sources Administrator' (you can find it under Windows > Administrative Tools). See here and here for more information. I have tried creating the DNS under both 'User DNS' and 'System DNS' - both work fine with Power Pivot.
Step 3: Open Power Pivot and do the following:
Click 'From other Sources' > 'Others (OLEDB/ODBC)' > Click on 'Build' button >
Under 'Provider' tab > Select 'MS OLE DB Provider for ODBC Sources' > In 'Use Data Source Name', select your DNS created in Step 2 and add any other parameters. At this point, you can test the connection and it should say 'Test Connection Succeeded'
Once you click 'OK', you should see the Connection String automatically generated. Mine was: 'Provider=MSDASQL;Persist Security Info=False;DSN=SQLiteTest'.
Follow the next few steps to import your data from SQLite.
You need something like this:
Provider=MSDASQL.1;Persist Security Info=False;Mode=ReadWrite;Initial Catalog=C:\XXX.db;DSN=SQLite3 Datasource

SSIS - Convert Oracle Date to SQL Datetime

Oracle 11g
SQL Server 2008 R2
I am receiving the following errors when trying to move data from an OLE DB Source (Oracle DB) to an OLE DB Destination (SQL Server). There are 8922 out of 65000 records that are added to the SQL server before the error appears. The date column in question for the 8922 does have a date added when it should. The column on Oracle is a DATE type. The column on SQL Server 2008 is a datetime.
On the SQL Server, for record # 8922 the RSVP_END_DT = 2007-06-25 12:06:00.000
On the Oracle Server for record # 8922 the RSVP_END_DT = 25-JUN-07
On the Oracle Server, for what should be record # 8923 in the SQL DB, the RSVP_END_DT = 10-AUG-07
I have searched each of the 'DTE_E' errors but have found not help. I have also tried using a data conversion and writing the Source SQL to set the date as a 'to_char' with the correct SQL format and that doesn't work either. Anyone have any other suggestions?
[OLE DB Destination [424]] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E21.
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80040E21 Description: "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.".
[OLE DB Destination [424]] Error: There was an error with input column "RSVP_END_DT" (487) on input "OLE DB Destination Input" (437). The column status returned was: "Conversion failed because the data value overflowed the specified type.".
[OLE DB Destination [424]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "input "OLE DB Destination Input" (437)" failed because error code 0xC020907A occurred, and the error row disposition on "input "OLE DB Destination Input" (437)" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure.
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "OLE DB Destination" (424) failed with error code 0xC0209029 while processing input "OLE DB Destination Input" (437). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure.
[OLE_DB_SOURCE[1]] Error: The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020.
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "OLE_DB_SOURCE" (1) returned error code 0xC02020C4. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.
Here are three of my previous answers on this topic. You are most likely outside the range for Sql Server dates with that error message. I explain the different limits of Datetime and datetime2 in the last answer.
https://stackoverflow.com/a/11585853/236348
https://stackoverflow.com/a/2231164/236348
https://stackoverflow.com/a/11229159/236348
While getting the data from OLEDB source convert the source date column into a specified format like
YYYY MM DD
Select TO_CHAR(DateColumn,'yyyy/mm/dd') as CustomDate from yourTable
Not sure abt the syntax referred this article
Instead of using To_Char use some oracle predefined function to get the date in correct format .Its always better to enrich or transform the source data before its gets into SSIS pipeline for furthur enrichment
and then in the derived column convert this string to your sql server date time format
convert(datetime, CustomDate , 111)
In SQl server i would have checked the column with isDate function
or would have tried converting the values to a particular format
CASE WHEN isDate(DateColumn) = 1 THEN DateColumn ELSE NULL END as DateColumn
or
convert(datetime, '25-JUN-07', 106) -- dd.mm.yyyy

DB2 connection string problem

I have the following code:
import pyodbc
cnxn = pyodbc.connect('DRIVER={IBM DB2 ODBC DRIVER};DATABASE=TDB2;UID=username;PWD=password')
I get the error message SQLSTATE=42705, which means that it cannot reach the database.
When I connect to DB2 using AQT, it states that the Database Name is DB2, Data Source Name is TDB2, DBALIAS=TDB2, ODBC driver is DB2CLI.DLL. Inside the database, I have some kind of "containers", which are listed in the category of "Database Objects", the containers contain Tables, and I believe that I need to specify this in my connection string as well.
I am completely confused about this. I do not even understand how AQT can connect to the database, without me providing an IP address, nor port number.
The solution was to remove the DATABASE=TDB2 and replace it with DBALIAS=TDB2.

Resources