Showing posts with label driver. Show all posts
Showing posts with label driver. Show all posts

Thursday, March 29, 2012

DB2OLEDB Query Parameters in OLE DB Sources

Hi

I'm using Microsoft DB2 OLE DB Driver to access a DB2 database, and I have a problem when I create an OLE DB Source using a parameterized query. Everytime I push the "Parameters" button, I get this error:

TITLE: Microsoft Visual Studio

Parameters cannot be extracted from the SQL command. The provider might not help to parse parameter information from the command. In that case, use the "SQL command from variable" access mode, in which the entire SQL command is stored in a variable.

ADDITIONAL INFORMATION:

El proveedor no puede derivar la información del parámetro, no se llamó a SetParameterInfo. (Microsoft DB2 OLE DB Provider)

I would really appreciatte any help.

Thanks.

Well, the message looks pretty clear to me. The provider you are using does not support an interface used to derive parameters from queries so parametrized queries cannot be used in that source adapter.

The workaround is to use "Sql command from variable" access mode and build your query in a single variable.

Thanks,

Bob

|||

Hi

First of all, thanks for your answer. I know I can use the "Sql command from variable" workaround, for that matter I could also use a DataReader Source instead of an OLE DB Source and use an expression to build the query. The thing is, I was wondering if there was a more recent version of the driver that would allow me to build parametrized queries the same way I build them when accessing a MS SQL Server database. I know I should have been more specific when I posted my question, for that I apologize.

Right now I'm evaluating Microsoft's and IBM's DB2 providers, and both have certain limitations. For instance when I use MS provider and the code page of the DB2 database is improperly configured, the development studio simply vanishes when I try to create a Data Flow. I know is not that big of a problem, I just need to be more careful when setting up the connections properties, but still it took me a while to realize what was going on, probably because I have little experience with MS SQL Server.

My point is, I was hoping to access DB2 the same way I access any other database, instead of having to change the way I do things depending on the provider used to set up the connection, but I supposse this is the way things are.

Thanks again for your answer.

Cheers.

|||

Hi

It looks like it is possible to use parametrized queries. I just had to change the value of "Derive parameters" to true in the "All" tab.

Thanks again.

sql

Tuesday, March 27, 2012

DB2 Stored Procedures using ODBC

I am trying to call DB2 z/OS Stored Procedures from the report designer using
a DataDirect ODBC driver. I get a result set with a simple SP which has no
input parameters. If I call a SP with one input parameter defined as
integer, my result set is returned if I code the value in the call statement.
But, if I give it a parameter marker and supply the value after being
prompted, I get an error stating "VALUE OF INPUT HOST VARIABLE NUM 001 NOT
USED; WRONG DATA TYPE".
My guess is that the parameter marker may get passed instead of the value,
or the integer is not being converted correctly. If I change the datatype of
the input parm in my SP to CHAR(1), everything works fine. Note: I am not
using the input parms in my SP. They are being ignored for testing reasons.
If I used the IBM OLE DB driver, my above scenario works fine. This leads
me to believe I have an ODBC setting issue (or some other programmer error).
And for the record, I am using the DataDirect ODBC driver instead of the IBM
OLE DB because of licensing concerns.
Has anyone had similar issues while calling DB2 Stored Procedures via an
ODBC driver?Hello,
Based on the symptom, it is more like that the issue exist in the odbc
driver. If you are use SQL 2005, You could try latest Microsoft OLEDB
provider for DB2
http://www.microsoft.com/downloads/details.aspx?FamilyID=D09C1D60-A13C-4479-
9B91-9E8B9D835CDC&displaylang=en
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.|||Thanks. We are using SQL 2000 and accessing DB2 on z/OS. I am also in
contact with the driver's support team, but I was wondering if anyone has
tried something similar. Reporting Services works great with this driver for
mapping to tables, but using Stored Procedures has proved difficult.
""privatenews"" wrote:
> Hello,
> Based on the symptom, it is more like that the issue exist in the odbc
> driver. If you are use SQL 2005, You could try latest Microsoft OLEDB
> provider for DB2
> http://www.microsoft.com/downloads/details.aspx?FamilyID=D09C1D60-A13C-4479-
> 9B91-9E8B9D835CDC&displaylang=en
> Best Regards,
> Peter Yang
> MCSE2000/2003, MCSA, MCDBA
> Microsoft Online Partner Support
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> =====================================================>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>|||Hello,
I think the driver support team shall be the best resource on this issue.
You may also want to try some other drivers if possible
http://www.codeproject.com/dotnet/DotnetDb2.asp
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

DB2 ODBC Error using in DTS (MDAC 2.7)

I'm having problems using the DB2 Connect ODBC Driver in my SQL Server
2000 DTS packages. It started occuring after installing MDAC 2.7
(which is necessary for the .NET framework). This error occurs when I
try to open the transformation that uses an ODBC Connection object
that is pointing to the DB2 ODBC. Has anybody else seen this or has a
solution other than re-installing everything and not loading the .net
framework mdac 2.7. I would like to get the DB2 ODBC driver working
with MDAC 2.7.gastineau5@.comcast.net (Zach Gastineau) wrote in message news:<a3883fcb.0404280717.36c3f09f@.posting.google.com>...
> I'm having problems using the DB2 Connect ODBC Driver in my SQL Server
> 2000 DTS packages. It started occuring after installing MDAC 2.7
> (which is necessary for the .NET framework). This error occurs when I
> try to open the transformation that uses an ODBC Connection object
> that is pointing to the DB2 ODBC. Has anybody else seen this or has a
> solution other than re-installing everything and not loading the .net
> framework mdac 2.7. I would like to get the DB2 ODBC driver working
> with MDAC 2.7.

Can you post a specific error message? It might also be a good idea to
check in a DB2 or IBM forum to see if there are known issues with that
specific version of MDAC. MDAC 2.8 is available, so you could also try
upgrading to see if that resolves your issue, although there's no
specific reference to DB2 in the release notes:

http://support.microsoft.com/default.aspx?kbid=820761

Simon

DB2 ODBC Error using in DTS (MDAC 2.7)

I'm having problems using the DB2 Connect ODBC Driver in my SQL Server
2000 DTS packages. It started occuring after installing MDAC 2.7
(which is necessary for the .NET framework). This error occurs when I
try to open the transformation that uses an ODBC Connection object
that is pointing to the DB2 ODBC. Has anybody else seen this or has a
solution other than re-installing everything and not loading the .net
framework mdac 2.7. I would like to get the DB2 ODBC driver working
with MDAC 2.7.gastineau5@.comcast.net (Zach Gastineau) wrote in message news:<a3883fcb.0404280717.36c3f09f@.posting.google.com>...
> I'm having problems using the DB2 Connect ODBC Driver in my SQL Server
> 2000 DTS packages. It started occuring after installing MDAC 2.7
> (which is necessary for the .NET framework). This error occurs when I
> try to open the transformation that uses an ODBC Connection object
> that is pointing to the DB2 ODBC. Has anybody else seen this or has a
> solution other than re-installing everything and not loading the .net
> framework mdac 2.7. I would like to get the DB2 ODBC driver working
> with MDAC 2.7.

Can you post a specific error message? It might also be a good idea to
check in a DB2 or IBM forum to see if there are known issues with that
specific version of MDAC. MDAC 2.8 is available, so you could also try
upgrading to see if that resolves your issue, although there's no
specific reference to DB2 in the release notes:

http://support.microsoft.com/default.aspx?kbid=820761

Simon|||Hi ,
I also need to access DB2 table in my SQL Server DTS package. but can you give me from where you downloaded DB2 ODBC drivers where I can install and start using DB2 in DTS package.

Regards
Sridhar.B

Quote:

Originally Posted by Simon Hayes

gastineau5@.comcast.net (Zach Gastineau) wrote in message news:<a3883fcb.0404280717.36c3f09f@.posting.google.com>...
> I'm having problems using the DB2 Connect ODBC Driver in my SQL Server
> 2000 DTS packages. It started occuring after installing MDAC 2.7
> (which is necessary for the .NET framework). This error occurs when I
> try to open the transformation that uses an ODBC Connection object
> that is pointing to the DB2 ODBC. Has anybody else seen this or has a
> solution other than re-installing everything and not loading the .net
> framework mdac 2.7. I would like to get the DB2 ODBC driver working
> with MDAC 2.7.

Can you post a specific error message? It might also be a good idea to
check in a DB2 or IBM forum to see if there are known issues with that
specific version of MDAC. MDAC 2.8 is available, so you could also try
upgrading to see if that resolves your issue, although there's no
specific reference to DB2 in the release notes:

http://support.microsoft.com/default.aspx?kbid=820761

Simon

sql

DB2 driver/connection issue

Hi guys,

I have a kind of weird situation that may be causing this problem. My setup is that I'm remote desktopping into a 64-bit box on a client's network. They installed SSIS there, I use login 1 which has rights to the box, but none of the databases. To do that I run SSIS as login 2, who can hit the databases.

I've got two datasources for this project one is DB2 and the other is SqlServer2k5. I've been focusing on the DB2 (I'm running the Microsoft OLEDB Provider for DB2 that was part of the feature pack from feb 2007). I've registered the dll with "regsvr32.exe /s /c ibmdadb2.dll" and tried to import database settings from a pdb with "db2cfimp db2Settings.pdb". The connection to, we'll call it, DB2A doesn't actually show up in the "Admin Tools\ODBC Data Source Administrator", but seeing as how the connection sort of works I don't think this is the problem.

Using the "IBM OLE DB Provider for DB2 Servers" connection I can connect to the DB2 database in SSIS's Data Flow with a DataReader Source. The correct columns are shown in the column mappings and everything looks good while designing.

Upon executing the package I get the following error:

SSIS package "Package.dtsx" starting.
Information: 0x4004300A at TGMV019, DTS.Pipeline: Validation phase is beginning.
Error: 0xC0047062 at TGMV019, GM19 [31]: System.InvalidOperationException: The 'IBMDADB2.1' provider is not registered on the local machine.
at Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSConnectionManager90.AcquireConnection(Object pTransaction)
at Microsoft.SqlServer.Dts.Pipeline.DataReaderSourceAdapter.AcquireConnections(Object transaction)
at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostAcquireConnections(IDTSManagedComponentWrapper90 wrapper, Object transaction)
Error: 0xC0047017 at TGMV019, DTS.Pipeline: component "GM19" (31) failed validation and returned error code 0x80131509.
Error: 0xC004700C at TGMV019, DTS.Pipeline: One or more component failed validation.
Error: 0xC0024107 at TGMV019: There were errors during task validation.
SSIS package "Package.dtsx" finished: Failure.

The problem sure looks like it's with the IBMDADB2.1 provider. I have retried the regsvr32 command (is this just a 32bit version?) to no avail. Does this assignment require a reboot (because they installed this on a training database box that really can't be easily rebooted)?

Thanks for any ideas, I'm fresh out

Jeff
Since you are using the Microsoft OLEDB Provider for DB2, why aren't you using the OLE DB Source in the data flow instead of the DataReader source?|||I gave up on using "OLE DB Provider: Microsoft OLE DB Provider for DB2" because I can't seem to get away from the error: "Test connection failed because of an error in initializing provider. The parameter is incorrect.". Also, these forums (I think) said the IBM one was more reliable than the microsoft one.

I'm not sure what to enter under: Data Link Properties. I've tried various combination for 'Initial catalog', 'package collection' and 'default schema' but none of them work. Also, pressing the "Packages" button on the bottom crashes visual studio, so I'm not sure what's supposed to go there.
|||See if this helps any:
http://www.ssistalk.com/db2_configurations.jpg

That is the list of all of the properties for one of my connections that I use on a daily basis to transfer records from DB2 to SQL Server 2005.

Db2 driver for 64 bit

Hi everyone,

Running both Sql25k and cluster to 64.

Is there a DB2 provider for 64 bit? If not, are there problems if you take 32 bit provider there?

Thanks a lot for your time,

Hi Enric,

If you take 32 bit provider, you will have to run package using 32 bit DTExec otherwise, it will not find the connection on the 64 bit provider...

Hope that helps

|||Thanks for that.|||

It is possible to run package with Db2 driver for 32 bit with the agent using 64 bit Dtexec

I used Microsoft OLE DB pour DB2 driver, when you create the connection in the manager, I have used the .net Providers for OleDb\Microsoft OLE DB Providers for DB2. I have created an udb file using the data access tool of the driver. In All tab, in Named ConnectionString, I defined the path of the udb file. So, Integration Service doesn't use the ODBC but the informations of the udb file.

The advantage = you can run your package with the agent and the 64 bit Dtexec of SSIS

The inconvenient = you have an UDB file with all the information of you DB2 database (login password etc...). You can define access rights on this file, in order to only the agent account can read it.

|||

The Microsoft OLE DB Provider for DB2 is a COM component for integrating vital data stored in IBM DB2 databases with new solutions based on Microsoft SQL Server 2005 Enterprise Edition and Developer Edition. SQL Server developers and administrators can use the provider with SQL Server Integration Services, SQL Server Analysis Services, Replication, and Distributed Query Processor. Run the self-extracting download package to create an installation folder. The single setup program will install the provider and tools on both x86 and x64 computers. Read the installation guide and Readme for more information.

^This found here: http://www.microsoft.com/downloads/details.aspx?familyid=d09c1d60-a13c-4479-9b91-9e8b9d835cdc&displaylang=en

sql