Showing posts with label drivers. Show all posts
Showing posts with label drivers. Show all posts

Friday, March 9, 2012

Oracle parameterized queries to update Oracle table do not work

Oracle and MS drivers do not support parameterized queries, so update table set column=? where primarykey=? does not work for Oracle.

Anyone knows how to update an Oracle table through SSIS?

Thanks!

Wenbiao

Load your updates to a table and then perform an Execute SQL task in the control flow to perform a batch update instead of trying to update row by row.|||

Phil Brammer wrote:

Load your updates to a table and then perform an Execute SQL task in the control flow to perform a batch update instead of trying to update row by row.

Thanks Phil,

Your post is really helpful, however, I have a couple of more questions. Smile

1. You said load the updates to a table, this has to be a temp table I guess?

2. Could you please write in more details on how to "perform a batch update" in an Execute SQL task, such as what the SQL statement will look like? Do I still need to provide parameters, such as "update dest_table set xxx=? where yyy=?"

Thanks a lot!

Wenbiao

|||Yes, it is a temp table. But not a #temp table. It's just a physical table that you store the updates in. When you're done, you can issue an Execute SQL task to truncate that table.

As far as the batch update goes: (Something like this, I believe)

UPDATE myTable a INNER JOIN stagingTable b ON a.key = b.key
SET a.field1 = b.field1, a.field2 = b.field2|||

here is an example of the update syntax:

UPDATE titles
SET ytd_sales = t.ytd_sales + s.qty
FROM titles t, sales s
WHERE t.title_id = s.title_id
AND s.ord_date = (SELECT MAX(sales.ord_date) FROM sales)

|||Thanks Phil and Rafael, I will give it a try and report back.

Oracle OLEDB drivers problem with Numbers

Hi All:

I am using oracle oledb drivers to write to a oledb destination.

if i give decimal values to decimal fields in the source table, i get the same in destination. But if the input is integers, in some cases, the value in the destination is different from that of source


Source Target

50 50.00
100 0.000
111 111.000
600 0.0000
520 20.00
178 178
4546.50 4546.50

I have Sql server SP2 9.0.3042 installed on my machine. Please let me know if theres something i am missing out.

Thanks,

Vipul

There is no such thing as an integer in Oracle. It's a NUMERIC(p,0) field. That is, it has no scale. SSIS doesn't support this at the moment. Instead, write your query such that you convert the "integer" field into a NUMERIC(p+1,1) field, or something like that. Then map to a decimal field in SSIS. From there, if you want integers out of the data, use a derived column to cast the values to integers.|||

Let me put it this way phil. Have you come across decimal data being changed from source to target without any transforms in between ? I was not correct in putting the question but the cause of my concern is that if the source has 500 how the target is getting it as 0.

Is there some problem in SSIS for this or this is oracle oledb driver problem?

|||Have you looked at the data with a data viewer to see what is contained there? You might need to recreate the OLE DB source.|||

ya i have viewed data with the data viewer before the oledb destination. Data is fine till data viewer. Theres something happening in oledb destination and thats why i suspect the drivers.

Also, the same behaviour is not happening on one of my other machine. The machine confguration of both the machine are same. I am executing the same pacakge from both the machines.

The version of software on both mahcine are:

-

SQL Server sp2 9.0.3042

Oracle 10g

Let me know your thoughts on this..

|||Is your destination SQL Server?

Have you looked at the advanced properties of the OLE DB Destination to ensure that the data types for all of the columns are correct?|||

Destination is Oracle.

And i have checked all the datatypes as per ur suggestion but still the problem exists.

|||I'm going to have to bow out as I don't have an Oracle instance to test with.

Wednesday, March 7, 2012

Oracle Linked Server Error & ODBC Drivers Missing

I'm trying to add a Oracle DB as a linked server in EM on SQL2K. When using the Microsoft OLEDB Oracle driver I get the following error
Error 7399: OLE DB Provider 'MSDAORA' reported and error
OLE DB error trace[OLE/DB Provider 'MSDAORA' IDBInitialize::Initialize returned 0x80004005:
The native Oracle driver seems to work ok, and I can also connect usine Orcale SQL+ untility just fine, but of course the native driver requires the older flavor of SQL which means that all of my currently coded SPs would have to be ported. The same setup works fine from another SQL2k server using the MS ODBC Oracle driver so I'd like to try using that, however the ODBC driver don't appear on the drop down list of driver in EM linked server screen! I tried installing MDAC 2.8 but it doesn't give me any options for installing the MS ODBC drivers?...Thanks in advance for any ideas on how to resolve this!..."Joe Loyd" <joe.loyd@.us.didata.com> wrote in message
news:570D6F0B-C76B-46FC-BF45-22D47A37128E@.microsoft.com...
> I'm trying to add a Oracle DB as a linked server in EM on SQL2K. When
using the Microsoft OLEDB Oracle driver I get the following error:
> Error 7399: OLE DB Provider 'MSDAORA' reported and error.
> OLE DB error trace[OLE/DB Provider 'MSDAORA' IDBInitialize::Initialize
returned 0x80004005: ]
> The native Oracle driver seems to work ok, and I can also connect usine
Orcale SQL+ untility just >fine, but of course the native driver requires
the older flavor of SQL which means that all of my >currently coded SPs
would have to be ported. The same setup works fine from another SQL2k
>server using the MS ODBC Oracle driver so I'd like to try using that,
however the ODBC driver don't >appear on the drop down list of driver in EM
linked server screen! I tried installing MDAC 2.8 but it >doesn't give me
any options for installing the MS ODBC drivers?...Thanks in advance for any
ideas >on how to resolve this!...
You want to use the MSDAORA OleDb driver, and MDAC installs it.
It looks like it's having trouble loading the Oracle OCI libraries. If the
Oracle Client is properly installed, this is usually either a permissions
problem or a path problem. Make sure that the [oracle home]\bin is in the
path. If you have to add it, or you installed the Oracle client since your
last reboot, you must reboot the server before the path change will take
effect for services (like SqlServer).
And make sure that the account running SQL has rights to the Oracle home.
David

Oracle Linked Server Error & ODBC Drivers Missing

I'm trying to add a Oracle DB as a linked server in EM on SQL2K. When using the Microsoft OLEDB Oracle driver I get the following error:
Error 7399: OLE DB Provider 'MSDAORA' reported and error.
OLE DB error trace[OLE/DB Provider 'MSDAORA' IDBInitialize::Initialize returned 0x80004005: ]
The native Oracle driver seems to work ok, and I can also connect usine Orcale SQL+ untility just fine, but of course the native driver requires the older flavor of SQL which means that all of my currently coded SPs would have to be ported. The same setup
works fine from another SQL2k server using the MS ODBC Oracle driver so I'd like to try using that, however the ODBC driver don't appear on the drop down list of driver in EM linked server screen! I tried installing MDAC 2.8 but it doesn't give me any op
tions for installing the MS ODBC drivers?...Thanks in advance for any ideas on how to resolve this!...
"Joe Loyd" <joe.loyd@.us.didata.com> wrote in message
news:570D6F0B-C76B-46FC-BF45-22D47A37128E@.microsoft.com...
> I'm trying to add a Oracle DB as a linked server in EM on SQL2K. When
using the Microsoft OLEDB Oracle driver I get the following error:
> Error 7399: OLE DB Provider 'MSDAORA' reported and error.
> OLE DB error trace[OLE/DB Provider 'MSDAORA' IDBInitialize::Initialize
returned 0x80004005: ]
> The native Oracle driver seems to work ok, and I can also connect usine
Orcale SQL+ untility just >fine, but of course the native driver requires
the older flavor of SQL which means that all of my >currently coded SPs
would have to be ported. The same setup works fine from another SQL2k
>server using the MS ODBC Oracle driver so I'd like to try using that,
however the ODBC driver don't >appear on the drop down list of driver in EM
linked server screen! I tried installing MDAC 2.8 but it >doesn't give me
any options for installing the MS ODBC drivers?...Thanks in advance for any
ideas >on how to resolve this!...
You want to use the MSDAORA OleDb driver, and MDAC installs it.
It looks like it's having trouble loading the Oracle OCI libraries. If the
Oracle Client is properly installed, this is usually either a permissions
problem or a path problem. Make sure that the [oracle home]\bin is in the
path. If you have to add it, or you installed the Oracle client since your
last reboot, you must reboot the server before the path change will take
effect for services (like SqlServer).
And make sure that the account running SQL has rights to the Oracle home.
David

Oracle Linked Server Error & ODBC Drivers Missing

I'm trying to add a Oracle DB as a linked server in EM on SQL2K. When using
the Microsoft OLEDB Oracle driver I get the following error:
Error 7399: OLE DB Provider 'MSDAORA' reported and error.
OLE DB error trace[OLE/DB Provider 'MSDAORA' IDBInitialize::Initialize r
eturned 0x80004005: ]
The native Oracle driver seems to work ok, and I can also connect usine Orca
le SQL+ untility just fine, but of course the native driver requires the old
er flavor of SQL which means that all of my currently coded SPs would have t
o be ported. The same setup
works fine from another SQL2k server using the MS ODBC Oracle driver so I'd
like to try using that, however the ODBC driver don't appear on the drop dow
n list of driver in EM linked server screen! I tried installing MDAC 2.8 but
it doesn't give me any op
tions for installing the MS ODBC drivers?...Thanks in advance for any ideas
on how to resolve this!..."Joe Loyd" <joe.loyd@.us.didata.com> wrote in message
news:570D6F0B-C76B-46FC-BF45-22D47A37128E@.microsoft.com...
> I'm trying to add a Oracle DB as a linked server in EM on SQL2K. When
using the Microsoft OLEDB Oracle driver I get the following error:
> Error 7399: OLE DB Provider 'MSDAORA' reported and error.
> OLE DB error trace[OLE/DB Provider 'MSDAORA' IDBInitialize::Initialize[/vbc
ol]
returned 0x80004005: ][vbcol=seagreen]
> The native Oracle driver seems to work ok, and I can also connect usine
Orcale SQL+ untility just >fine, but of course the native driver requires
the older flavor of SQL which means that all of my >currently coded SPs
would have to be ported. The same setup works fine from another SQL2k
>server using the MS ODBC Oracle driver so I'd like to try using that,
however the ODBC driver don't >appear on the drop down list of driver in EM
linked server screen! I tried installing MDAC 2.8 but it >doesn't give me
any options for installing the MS ODBC drivers?...Thanks in advance for any
ideas >on how to resolve this!...
You want to use the MSDAORA OleDb driver, and MDAC installs it.
It looks like it's having trouble loading the Oracle OCI libraries. If the
Oracle Client is properly installed, this is usually either a permissions
problem or a path problem. Make sure that the [oracle home]\bin is in t
he
path. If you have to add it, or you installed the Oracle client since your
last reboot, you must reboot the server before the path change will take
effect for services (like SqlServer).
And make sure that the account running SQL has rights to the Oracle home.
David

Saturday, February 25, 2012

Oracle drivers in connection managers

I am not seeing an option to use the OraOLEDB.Oracle driver when defining connections in ssis. This driver shows up in management studio when trying to create linked servers so I don't know why it wouldn't show up here. All the client tools are installed fine and the linked server works. Any ideas?This might be a novice answer, but are you sure the actual OLE driver is installed? I'm no Oracle expert by far, but the client and the actual driver that my Oracle dba gives for sql server installation are on seperate disks.|||Yes, the oledb drivers are installed. One important thing I failed to mention is that this is a 64 bit server. What appears to be happening is that even though we can create a linked server with the 64 bit oracle oledb driver, when you create a package in ssis it only lists the 32 bit native oledb drivers. I confirmed this by installing the 32 bit oracle client stuff as well and now the oracle oledb driver is listed in the drop downs. This seems a little absurd that ssis would only use the 32 bit drivers, can anyone explain this?|||

"The 32-bit SSIS Designer displays only 32-bit providers that are installed on the local computer. If you want to select a specific 64-bit provider to configure a connection manager, you must have the 32-bit version of the provider installed. However, you can still run the package in 64-bit mode in the development environment. Because the 32-bit and 64-bit versions of a provider have the same ID, the runtime selects the appropriate version to use based on the value of the Run64BitRuntime project property, which by default is True."

Found in this article....

http://msdn2.microsoft.com/en-us/library(d=robot)/ms141766.aspx

|||

Thanks for the info, that's a big help.

I understand why they did this but just like every other weird x64 quirk you have to spend hours digging through various documentation sources to even find a mention of it. Please just give us a comprehensive x64 guide instead of spreading stuff out in a thousand different places.

Monday, February 20, 2012

Oracle 9i Drivers for Link Server?

Hi All,
I have a SQL Server 2000 and need to create a Link Server to an Oracle 9i
database to get at stored procs. I am having a devil of a time trying to
find the correct Oracle drivers to place on my SQL Server. Can anyone
direct me to the correct drivers please.
Thanks,
John.http://www.oracle.com/technology/software/index.html
"John" <jrugo@.patmedia.net> wrote in message
news:eQVSq%23NAGHA.360@.TK2MSFTNGP09.phx.gbl...
> Hi All,
> I have a SQL Server 2000 and need to create a Link Server to an Oracle 9i
> database to get at stored procs. I am having a devil of a time trying to
> find the correct Oracle drivers to place on my SQL Server. Can anyone
> direct me to the correct drivers please.
> Thanks,
> John.
>

Oracle 9i Drivers for Link Server?

Hi All,
I have a SQL Server 2000 and need to create a Link Server to an Oracle 9i
database to get at stored procs. I am having a devil of a time trying to
find the correct Oracle drivers to place on my SQL Server. Can anyone
direct me to the correct drivers please.
Thanks,
John.
http://www.oracle.com/technology/software/index.html
"John" <jrugo@.patmedia.net> wrote in message
news:eQVSq%23NAGHA.360@.TK2MSFTNGP09.phx.gbl...
> Hi All,
> I have a SQL Server 2000 and need to create a Link Server to an Oracle 9i
> database to get at stored procs. I am having a devil of a time trying to
> find the correct Oracle drivers to place on my SQL Server. Can anyone
> direct me to the correct drivers please.
> Thanks,
> John.
>

Oracle 9i Drivers for Link Server?

Hi All,
I have a SQL Server 2000 and need to create a Link Server to an Oracle 9i
database to get at stored procs. I am having a devil of a time trying to
find the correct Oracle drivers to place on my SQL Server. Can anyone
direct me to the correct drivers please.
Thanks,
John.http://www.oracle.com/technology/software/index.html
"John" <jrugo@.patmedia.net> wrote in message
news:eQVSq%23NAGHA.360@.TK2MSFTNGP09.phx.gbl...
> Hi All,
> I have a SQL Server 2000 and need to create a Link Server to an Oracle 9i
> database to get at stored procs. I am having a devil of a time trying to
> find the correct Oracle drivers to place on my SQL Server. Can anyone
> direct me to the correct drivers please.
> Thanks,
> John.
>