Problem running SSIS package: "Data source name not found and no default driver specified" - sql

I've developed a SSIS package that takes some data as an XML file, processes it and inserts it into our DB. When the package is being debugged (i.e. running in BIDS), it works fine from my local machine. I can also compile the package to a .dtsx file and run it via command line by executing DTExec.exe. I am running SQL Server 2005. When I move it to a test server, also running SQL Server 2005, and Integration services, I cannot execute the package via command line. I keep receiving this error
Error: 2011-08-16 17:50:39.11
Code: 0xC0202009
Source: ProcessSubmissionData Connection manager "Master"
Description: An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft OLE DB Provider for ODBC Drivers" Hresult: 0x80004005 Description: "[Microsoft][ODBC Driver Manager]
Data source name not found and no default driver specified".
End Error
I've searched the web and tried every solution I can find, to no avail. Is there anyone who can help with this? If it helps, this is the connection string that the connection manager is using
Data Source=xxxx;User ID=xxxx;Password=xxxx;Initial Catalog=database;Provider=SQLOLEDB;

The error is telling you that the Data Source Name (DSN) does not exist rather than the ODBC Driver.
So, if you machine is 32bit then it seems you have simply not created an ODBC Data Source (DSN) via the ODBC Administrator.
(The parameters within the DSN itself determine which ODBC Driver is used...)
Also - this needs to be a "System" DSN (Not a User DSN) since applications running as a system service will not have access to User DSNs. User DSNs are only available on a per user basis when that user is logged in!!!

Related

IIB - DLL Initialization Error in Connecting to DB2 ODBC DSN via mqsicvp

Getting the following error while using mqsicvp to test connectivity to a ODBC data source from IBM Integration Console.
C:\Program Files\IBM\IIB\10.0.0.9>mqsicvp DEFAULTBRK -n MSAPP -v
BIP8299I: User 'db2admin' from security resource name 'odbc::MSAPP' will be used for the connection to datasource 'MSAPP'.
BIP2393E: Database error: ODBC return code '-1' from data source ''MSAPP'' using ODBC driver manager ''odbc32.dll''.
The integration node received an error when processing a database operation. The ODBC return code was '-1'. See the following messages for information obtained from the database about this error.
Use the following messages to determine the cause of the error. Typical problems are an incorrect data source, or table names. Correct either the database or the integration node configuration. Use the mqsicvp command to test connectivity to this database.
BIP2322E: Database error: SQL State ''IM003''; Native Error Code '160'; Error Text ''Specified driver could not be loaded due to system error 1114: A dynamic link library (DLL) initialization routine failed. (IBM DB2 ODBC DRIVER - DB2COPY1, C:\PROGRA~1\IBM\SQLLIB\BIN\DB2CLIO.DLL).''.
The error has the following diagnostic information: SQL State ''IM003'' SQL Native Error Code '160' SQL Error Text ''Specified driver could not be loaded due to system error 1114: A dynamic link library (DLL) initialization routine failed. (IBM DB2 ODBC DRIVER - DB2COPY1, C:\PROGRA~1\IBM\SQLLIB\BIN\DB2CLIO.DLL).''
This message may be accompanied by other messages describing the effect on the integration node itself. Use the reason identified in this message with the accompanying messages to determine the cause of the error. Use the mqsicvp command to test connectivity to this database.
BIP8040E: Unable to connect to the database.
The database cannot be accessed with the specified user Id and password pair.
- Check that the database is running.
- Check that the database has an adequate number of database connections available for use.
- On Windows, check that an ODBC connection has been created.
- On systems that use $ODBCINI, check that the file pointed to by $ODBCINI has been correctly updated.
- On z/OS check the BIPDSNAO member of the component's dataset, and check the DB2 64bit ODBC driver (DSNAO64C) is in the STEPLIB.
- Use mqsisetdbparms to set the password to the correct value and try again.
Software: Windows 10 / IIB 10 / DB2 Server
Steps to reproduce:
Set up ODBC (64-bit) connectivity to a new DB2 database in the form of a System DSN (using the IBM DB2 ODBC Driver version 11.01.2020.1393)
Test that connectivity works from ODBC data source administrator app
Use mqsisetdbparms from IBM Integration Console to set the user and
password
mqsisetdbparms DEFAULTBRK -n odbc::MSAPP -u uid -p pwd
Stop and start the broker
Use mqsicvp to test connectivity
mqsicvp DEFAULTBRK -n MSAPP
The DLL mentioned in the error is at C:\PROGRA~1\IBM\SQLLIB\BIN and this is included within PATH variable already.
I'm not sure why the driver manager odbc32.dll is being used - I presume this is a 32-bit version. However if I try creating a DSN in the 32-bit ODBC data source administrator app, mqsicvp fails with an error saying the architectures do not match.
Suggest you download the fix from IBM for bug IT23069. It is available (indirectly) from this page which eventually redirects to IBM fix central. Worked for me.
The newest developer edition toolkit, 10.0.0.12, seems to have fixed this.

Permissions to access paradox db file under Windows Server 2008 x 64

I need to connect to Paradox db file under Windows Server 2008 x 64.
For this I wrote a .NET console application(32bit) with using ODBC.
This applications works only under admins rights (UAC).
But without that it throws exception:
ERROR [HY000] [Microsoft][ODBC Paradox Driver] Reserved error (-5016); there is no message for this error.
ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
ERROR [HY000] [Microsoft][ODBC Paradox Driver] Reserved error (-5016); there is no message for this error.
So I'm trying to figure wich permissions should to give.
Giving All Permissions to Everyone under applications' folder, under databasefolder, under registry folder HKEY_LOCAL_MACHINE\SOFTWARE\ODBC as described here http://support.microsoft.com/kb/295297, under odbc* files in %WINDIR%\System32 does not help.
Ah, also I tried to change provider to OLE DB (Microsoft.Jet.OLEDB.4.0) - got the same issue with rights(with using UAC all fine)
Unexpected error from external database driver (11265).
Any Suggestions ?
After All I decided to use UAC rights.
It's only possible to grunt permissions to an application if it runs under sheduler (you check the ‘Run with highest privileges’ option when you are creating task).
As my program initialy should run under sheluder - the problem solved.

Proper DSN to connect to Sybase using PDO

I'm trying to connect to a Sybase (SQL Anywhere 12) database using PHP's PDO. I spent hours trying to find the correct driver and DSN to use, with NO success AT ALL. Everytime I try to edit a single parameter I always get errors. I tried tens of different combinations of DSN parameters, nothing happens. I'll report here only a few just to give you example of what I'm trying to obtain.
I successfully installed PDO drivers - from php.ini:
PDO drivers dblib, mysql, odbc, pgsql
PDO Driver for FreeTDS/Sybase DB-lib enabled
Flavour freetds
DB params:
The IP for the DB is 192.168.100.234 and both the db instance and db name are GAMMA01. I can't tell you username and password, but let's say: user dba and pwd allright.
I can ping the server from the server where I try to start the connection.
I'm under Linux Debian Squeeze and PHP 5.3.3.
DBLIB:
I'm not able to find the correct DSN to use in order to connect to my Database server.
DSN version 1:
'dblib:host=192.168.100.234;DBN=GAMMA01'
DSN version 2:
'dblib:host=192.168.100.234;DBN=GAMMA01;UID=dba;PWD=allright;Server=GAMMA01;ASTART=No'
DSN version 3:
new PDO('dblib:host=192.168.100.234;dbname=GAMMA01', 'dba', 'allright');
Error I get
SQLSTATE[HY000] Unable to connect: Adaptive Server is unavailable or does not exist (severity 9)
FreeTDS error log (trying with both versions 5.0 and 7.0, no difference):
log.c:190:Starting log file for FreeTDS 0.82
on 2014-04-08 13:40:40 with debug flags 0x4fff.
iconv.c:363:iconv to convert client-side data to the "ANSI_X3.4-1968" character set
iconv.c:516:tds_iconv_info_init: converting "US-ASCII"->"UCS-2LE"
iconv.c:516:tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"
net.c:210:Connecting to 192.168.100.234 port 5200 (TDS version 7.0)
net.c:264:tds_open_socket: connect(2) returned "Operation now in progress"
net.c:299:getsockopt(2) reported: Connection refused
util.c:334:tdserror(0xb9a46eb0, 0xb9b60688, 20009, 115)
dblib.c:7782:dbperror(0xb9b5ff88, 20009, 115)
dblib.c:7835:20009: "Unable to connect: Adaptive Server is unavailable or does not exist"
dblib.c:5627:dbgetuserdata(0xb9b5ff88)
dblib.c:7856:"Unable to connect: Adaptive Server is unavailable or does not exist", client returns 2 (INT_CANCEL)
util.c:368:tdserror: client library returned TDS_INT_CANCEL(2)
util.c:389:tdserror: returning TDS_INT_CANCEL(2)
net.c:310:tds_open_socket() failed
dblib.c:1372:dbclose(0xb9b5ff88)
dblib.c:256:dblib_del_connection(0xb5ceea00, 0xb9b60688)
mem.c:563:tds_free_all_results()
dblib.c:303:dblib_release_tds_ctx(1)
dblib.c:5727:dbfreebuf(0xb9b5ff88)
dblib.c:718:dbloginfree(0xb9b46588)
Using sybase: DSN:
'sybase:host=192.168.100.234;dbname=GAMMA01, dba, allright'
Error:
could not find driver
ODBC:
I'm not able to connect with ODBC drivers. I read the guide here: http://www.sybase.com/files/White_Papers/PHP_SQL_Anywhere.pdf and downloaded the proper .so package here: http://scn.sap.com/docs/DOC-40537 but I can't make PHP recognize the package, load it and use it.
DSN:
'odbc:Driver={Sybase SQL Anywhere 12};NA=192.168.100.234,5200;Uid=dba;Pwd=allright;'
'odbc:Driver={SQL Anywhere 12};NA=192.168.100.234,5200;Uid=dba;Pwd=allright;'
'odbc:DRIVER={Sybase SQL Anywhere 12};SRVR=192.168.100.234;DB=gamma01;UID=dba;PWD=allright;'
'odbc:DRIVER={Sybase SQL Anywhere 12};HOSTNAME=192.168.100.234;DATABASE=gamma01;UID=dba;PWD=allright;PROTOCOL:TCPIP'
Error I get:
SQLSTATE[IM002] SQLDriverConnect: 0 [unixODBC][Driver Manager]Data source name not found, and no default driver specified
Which driver should I use to connect to Sybase db? Which is the correct DSN?
The "Data source name not found and no default driver specified." error means that the DSN or Driver you are specifying cannot be found in the odbc.ini file for your ODBC environment.
You need to make sure that your ODBC environment is setup properly. Typically, this includes a specification for the location and file name of the odbc.ini file.
Upon attempting to connect, the odbc.ini file will be searched to find a matching Data Source Name (DSN)
In your case, you are specifying a "Driver". This is a similar configuration usually found in the odbcinst.ini file; also specified by your ODBC environment.
Another thing to check for is to make sure that the ODBC environment is being found by the running process or owning user for your PHP app.
The key is to figure out what part of the connection sequence is failing. In your case, a successful connection would follow this path:
Application is started
ODBC Connection is attempted
ODBC Environment is searched to find the configuration file (usually odbcinst.ini for "Driver" configurations)
Finds a match for the value specified for "Driver=" in connection string
Connection is attempted using the values configured in the found Driver section along with other options provided in connection string.
The two main things that cause the error you are getting are these:
ODBC Environment is not configured
The DSN or Driver value is not spelled correctly.
I hope this helps.
Tony Hall

SSIS package execution failed inside SQL Agent

I have created one SSIS package which is I have imported into Integration services MSDB
which is executed correctly from Integration services MSDB
But when I tried to create a JOB in SQL Server Agent and try to execute
that job it is giving me following error
I'm unable to get it what is wrong from following error
please help me.
(I have tried by adding config file and deleting config file when I add packge in SQL Server Agent)
Message
Executed as user: cam\Package.Runner. Microsoft (R) SQL Server Execute Package Utility Version 10.0.4000.0 for 64-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 5:05:01 AM Error: 2013-07-02 05:05:01.85
Code: 0xC0016016 Source: Description: Failed to decrypt protected XML node "DTS:Property" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available. End Error Error: 2013-07-02 05:05:01.85
Code: 0xC0016016 Source: Description: Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available. End Error
Error: 2013-07-02 05:05:02.02
Code: 0xC0202009 Source: BloombergFTP Connection manager "WOPR\Fireball_PROD.sa" Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E4D. An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80040E4D Description: "Login failed for user 'package.runner'.". End Error Error: 2013-07-02 05:05:02.02 Code: 0xC00291EC Source: Execute SQL Task Goodhart Execute SQL Task Description: Failed to acquire connection "WOPR\Fireball_PROD.sa". Connection may not be configured correctly or you may not have the right permissions on this connection. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 5:05:01 AM Finished: 5:05:02 AM Elapsed: 0.266 seconds. The package execution failed. The step failed.
Ensure that credential used by "WOPR\Fireball_PROD.sa" BloombergFTP Connection manager is valid before trying the following.
Either
Change the SSIS Package ProtectionLevel property to
EncryptSensitiveWithPassword and Set the Packagepassword if you want
to encrpt the package.Specify this Password at command line in
SQLSERVER Agent Job SSIS configuration.
Change the SSIS Package ProtectionLevel property to DontSaveSensitive if you dont want to encrpt the package.Specify the credential in the SQLSERVER Agent Job SSIS configuration itself.
I ran into a similar problem. My SSIS package was running within SQL Data Tools without errors, but failed within SQL Server Agent, using a admin proxy. Looking into the logs of the job, the error message was something like "Failed to decrypt protected XML node "DTS:Property""
One of the many possible reasons (next to the one given by S.M.) for such an error is that the proxy doesn't have access to tables/databases you're referring to, while you yourself do have access to these tables.
In my case: I was writing stuff to a personal database which couldn't be accessed by the credentials underlying the proxy. Hence, when running the SSIS package within SQL Data Tools, I could access the tables, but when running the job within SQL Server Man. Studio, I couldn't. I changed the destination database of my package and the job could be runned.
This might be helpful for more people running into similar problems.

SSIS Import excel sheet error

Hi I am tring to import data from excel to sql 2005 .working fine in VS2005,but not working while running from cmd using dtexec.
error description as follows
"Microsoft JET Database Engine" Hresult
: 0x80004005 Description: "The Microsoft Jet database engine could not find the
object .
Can anyone help how to resolve this issue
This could possibly be a permissions error. If the account that is running the package doesn't have sufficient rights on the target folder or object, then this kind of error could be raised by SSIS. You wouldn't see this error in BIDS if your personal account has sufficient rights to access the file location.
Do you receive this error when the package is executed via a SQL Server Agent job? Do you receive this error when logged into the server that runs the code using the credentials of the SQL Server Agent?
Try to see you you have the property 'Set DelayValidation' = false
(Microsoft Reference)
If it still does not work, check to see if you have the package sensible information, encrypted to the user package creator (package properties), this inhibits another user to run the package (safety issues).
Hope it helps,
Bruno