Showing posts with label message. Show all posts
Showing posts with label message. Show all posts

Friday, March 9, 2012

Oracle Procedure with OUT Parameters

I get this error message when I try to create a DataSet for an Oracle
procedure that has an OUT Parameter.
PLS-00306: wrong number or types of parameters in call to 'procedure name'
The Error happens when I click on Refresh Fields.
I can execute procedures with a REFCURSOR OUT Parameter just fine. I only
get this message when the procedure has other out types like DATE or CHAR.
Any help would be greatly appreciated.
FabianOnly out ref cursors are supported. Please follow the guidelines in the
following article on MSDN (scroll down to the section where it talks about
"Oracle REF CURSORs") on how to design the Oracle stored procedure:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpcontheadonetdatareader.asp
To use a stored procedure with regular out parameters, you should either
remove the parameter (if it is possible) or write a little wrapper around
the original stored procedure which checks the result of the out parameter
and just returns the out ref cursor but no out parameter.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Fabian" <Fabian@.discussions.microsoft.com> wrote in message
news:8BE134E6-FE00-48CB-B64A-9EF81FC43BAE@.microsoft.com...
> I get this error message when I try to create a DataSet for an Oracle
> procedure that has an OUT Parameter.
> PLS-00306: wrong number or types of parameters in call to 'procedure name'
> The Error happens when I click on Refresh Fields.
> I can execute procedures with a REFCURSOR OUT Parameter just fine. I only
> get this message when the procedure has other out types like DATE or CHAR.
> Any help would be greatly appreciated.
> Fabian|||Thank you Robert. I wrote a wrapper.
Fabian
"Robert Bruckner [MSFT]" wrote:
> Only out ref cursors are supported. Please follow the guidelines in the
> following article on MSDN (scroll down to the section where it talks about
> "Oracle REF CURSORs") on how to design the Oracle stored procedure:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpcontheadonetdatareader.asp
> To use a stored procedure with regular out parameters, you should either
> remove the parameter (if it is possible) or write a little wrapper around
> the original stored procedure which checks the result of the out parameter
> and just returns the out ref cursor but no out parameter.
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Fabian" <Fabian@.discussions.microsoft.com> wrote in message
> news:8BE134E6-FE00-48CB-B64A-9EF81FC43BAE@.microsoft.com...
> > I get this error message when I try to create a DataSet for an Oracle
> > procedure that has an OUT Parameter.
> >
> > PLS-00306: wrong number or types of parameters in call to 'procedure name'
> >
> > The Error happens when I click on Refresh Fields.
> >
> > I can execute procedures with a REFCURSOR OUT Parameter just fine. I only
> > get this message when the procedure has other out types like DATE or CHAR.
> >
> > Any help would be greatly appreciated.
> >
> > Fabian
>
>

oracle problems

i'm having trouble accessing oracle data (gee... what a shock)
i get the very *helpful* error message: "MinimumCapacity must be
non-negative". no idea what it means. i'm running a sql statement which
calls a stored proc. it runs fine, gets the data fine (i can't use the
wizard because of the above error), but the fields are not retrieved into
the schema for my report layout.
if i set the dataset up in the data page, it works. but before retrieving
the data, the error message above displays and also adds "the list of fields
could not be retrieved". i really don't want to (or should have to) create
all the fields by hand.
the sql is:
{ call pkgMyStuff.sp_MyStoredProc('01/01/1900', '2/26/2004', '1') }
anyone have any ideas here? i know it's not an ms database, but oledb should
be the *universal* data access... so this should work fine.
please help
dushan bilbijaPlease try the managed Oracle provider instead of the OleDB provider when
working with Oracle stored procedures. Just edit your datasource and select
"Oracle" from the data source type dropdown rather than "OleDB". You will
also need to set the correct connection string for the managed provider.
In addition, please follow the guidelines in the following article on MSDN
(scroll down to the
section where it talks about "Oracle REF CURSORs") on how to design the
Oracle stored procedure:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpcontheadonetdatareader.asp
Note: You need to make sure that the stored procedure has only one OUTPUT
parameter which is a REF cursor and NO other out parameters.
Here is a basic example of a stored procedure:
CREATE OR REPLACE package test_package as
TYPE T_CURSOR IS REF CURSOR;
procedure get_customers(
customer_name in VARCHAR2,
o_customer_cursor out T_CURSOR);
end test_package;
/
CREATE OR REPLACE package body test_package as
procedure get_customers (
customer_name in VARCHAR2,
o_customer_cursor out T_CURSOR)
IS
begin
open o_customer_cursor for select * from customers where name =customer_name;
end;
end test_package;
/
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dushan Bilbija" <dbilbija@.msn.com> wrote in message
news:%236Xj9%23iXEHA.3284@.TK2MSFTNGP12.phx.gbl...
> i'm having trouble accessing oracle data (gee... what a shock)
> i get the very *helpful* error message: "MinimumCapacity must be
> non-negative". no idea what it means. i'm running a sql statement which
> calls a stored proc. it runs fine, gets the data fine (i can't use the
> wizard because of the above error), but the fields are not retrieved into
> the schema for my report layout.
> if i set the dataset up in the data page, it works. but before retrieving
> the data, the error message above displays and also adds "the list of
fields
> could not be retrieved". i really don't want to (or should have to) create
> all the fields by hand.
> the sql is:
> { call pkgMyStuff.sp_MyStoredProc('01/01/1900', '2/26/2004', '1') }
> anyone have any ideas here? i know it's not an ms database, but oledb
should
> be the *universal* data access... so this should work fine.
> please help
> dushan bilbija
>|||This seems to have been b/c the database was used with a .mdw file that I did not have. When I created a new database and imported the table into that, the query worked fine.
"David Conorozzo" wrote:
> I am getting this on an Access DB using OLEDB. My query is:
> Dim oComm As New OleDb.OleDbCommand("SELECT * FROM " & _formattedtablename & " WHERE 1=-1", _Connection)
> Dim oReader As OleDb.OleDbDataReader = oComm.ExecuteReader(CommandBehavior.SchemaOnly)
> It doesn't really matter what I do in the query. On this particular DB I always get the exception.
> "Robert Bruckner [MSFT]" wrote:
> > Please try the managed Oracle provider instead of the OleDB provider when
> > working with Oracle stored procedures. Just edit your datasource and select
> > "Oracle" from the data source type dropdown rather than "OleDB". You will
> > also need to set the correct connection string for the managed provider.
> >
> > In addition, please follow the guidelines in the following article on MSDN
> > (scroll down to the
> > section where it talks about "Oracle REF CURSORs") on how to design the
> > Oracle stored procedure:
> > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpcontheadonetdatareader.asp
> >
> > Note: You need to make sure that the stored procedure has only one OUTPUT
> > parameter which is a REF cursor and NO other out parameters.
> >
> > Here is a basic example of a stored procedure:
> >
> > CREATE OR REPLACE package test_package as
> > TYPE T_CURSOR IS REF CURSOR;
> > procedure get_customers(
> > customer_name in VARCHAR2,
> > o_customer_cursor out T_CURSOR);
> > end test_package;
> > /
> >
> > CREATE OR REPLACE package body test_package as
> > procedure get_customers (
> > customer_name in VARCHAR2,
> > o_customer_cursor out T_CURSOR)
> > IS
> > begin
> > open o_customer_cursor for select * from customers where name => > customer_name;
> > end;
> > end test_package;
> > /
> >
> >
> > --
> > This posting is provided "AS IS" with no warranties, and confers no rights.
> >
> >
> >
> >
> > "Dushan Bilbija" <dbilbija@.msn.com> wrote in message
> > news:%236Xj9%23iXEHA.3284@.TK2MSFTNGP12.phx.gbl...
> > > i'm having trouble accessing oracle data (gee... what a shock)
> > >
> > > i get the very *helpful* error message: "MinimumCapacity must be
> > > non-negative". no idea what it means. i'm running a sql statement which
> > > calls a stored proc. it runs fine, gets the data fine (i can't use the
> > > wizard because of the above error), but the fields are not retrieved into
> > > the schema for my report layout.
> > >
> > > if i set the dataset up in the data page, it works. but before retrieving
> > > the data, the error message above displays and also adds "the list of
> > fields
> > > could not be retrieved". i really don't want to (or should have to) create
> > > all the fields by hand.
> > >
> > > the sql is:
> > >
> > > { call pkgMyStuff.sp_MyStoredProc('01/01/1900', '2/26/2004', '1') }
> > >
> > > anyone have any ideas here? i know it's not an ms database, but oledb
> > should
> > > be the *universal* data access... so this should work fine.
> > >
> > > please help
> > >
> > > dushan bilbija
> > >
> > >
> >
> >
> >

Wednesday, March 7, 2012

Oracle Linked Server on Windows 2003

We have SQL 2000 SP3a installed on a Windows 2003 server.
We are trying to add an Oracle 8.1.7 linked server.
On W2003, the error message below appears when trying to view tables with th
e exact same connection parameters work on several servers that are running
SQL 2000 on Windows 2000.
Parameters are
Other Data Source: Microsoft OLE DB Provider for Oracle
Product name: Oracle
Data Source: <same as on working W2K server>
Data Source: <same as on working W2K server>
Server Options: Data Access, RPC, RPC Out, Use Remote Collation enabled
Be made in this security context: <same Username/PW that are working on W2K
server>
Error message:
Error 7399: OLE DB provider 'MSDAORA' reported an error.
OLE DB error trace [OLE/DB Provider 'MSDAORA' IDBInitialize::Initialize
returned 0x80004005: ].
How can we get SQL 2000 on W2003 to link to the Oracle server?Did you restart the server after installing the Oracle client?
The recommended steps are:
1. Install Oracle client
2. Reinstall MDAC
3. Reboot the server
Also you cannot use multiple Oracle homes, this is not supported from
the OLE DB provider.
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!|||Hi,
I am having an issue while trying to install the Orcale Client 8.1.7 on a
Windows 2003 Server Standard Edition...Nothing happens and the install
doesn't complete? Is there a switch I need to check to allow the
installation?
Thanks,
Warren
"mt69clp" wrote:

> Did you restart the server after installing the Oracle client?
> The recommended steps are:
> 1. Install Oracle client
> 2. Reinstall MDAC
> 3. Reboot the server
> Also you cannot use multiple Oracle homes, this is not supported from
> the OLE DB provider.
>
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!
>|||Why do you choose Client 8.1.7? Try installing the newest 9.X client. It
is backward compatible and you will have less trouble wit Windows 2003.
The 10.X should do it also but I think it is not tested by Microsoft
until now.
I use the 9.0.1.0 client to connect to a 8.1.7.4 database and it works
fine.
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!|||Hi,
I tried to install the 9.x Client and still can't. I don't get an error, it
just says press next once the installation is complete and it just stops? I
s
there a setting in Windows 2003 server that I need to address to allow the
install?
Thanks,
Warren
"mt69clp" wrote:

> Why do you choose Client 8.1.7? Try installing the newest 9.X client. It
> is backward compatible and you will have less trouble wit Windows 2003.
> The 10.X should do it also but I think it is not tested by Microsoft
> until now.
> I use the 9.0.1.0 client to connect to a 8.1.7.4 database and it works
> fine.
>
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!
>|||Hello, I was wondering if anyone was able to run the Oracle 8i v8.1.7 databa
se on the Windows 2003 Server? Also, do you know where i could find additio
nal information for other applications (such as Websphere 5.0.2 and the J2EE
Architecture) running on Windows 2003 Server? Any help is appreciated.
Thanks,
Jason
quote:
Originally posted by mt69clp
Why do you choose Client 8.1.7? Try installing the newest 9.X client. It
is backward compatible and you will have less trouble wit Windows 2003.
The 10.X should do it also but I think it is not tested by Microsoft
until now.
I use the 9.0.1.0 client to connect to a 8.1.7.4 database and it works
fine.
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!

|||I just opened a crit sit with MS with regards to this issue. Here is
how to fix it with Windows 2003, SQL 2000, and Oracle 9i:
This is discussed in Q193893 and according to this the registry key "
& #91;HKEY_LOCAL_MACHINE\SOFTWARE\Microsof
t\MSDTC\MTxOCI] " should have
following
entries.
"OracleXaLib"="oraclient9.dll"
"OracleSqlLib"="orasql9.dll"
"OracleOciLib"="oci.dll"
I hope this helps.
Carrie
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!

Monday, February 20, 2012

Oracle 9i -> SQL Server 2005: Violation of PRIMARY KEY constraint

Hi there,

When the distribution agent runs trying to apply the snapshot at the subscriber I get the following error message

Message
2006-06-24 12:41:59.216 Category:NULL
Source: Microsoft SQL Native Client
Number:
Message: Batch send failed
2006-06-24 12:41:59.216 Category:NULL
Source: Microsoft SQL Native Client
Number: 2627
Message: Violation of PRIMARY KEY constraint 'MSHREPL_1_PK'. Cannot insert duplicate key in object 'dbo.ITEMTRANSLATION'.
2006-06-24 12:41:59.216 Category:NULL
Source:
Number: 20253

What could possibly cause this error? And how can I possibly fix it?

Best regards,

JB

Check the table in Oracle and then check it in SQL Server. Is the table definition the same? Do you have a primary key on the SQL Server side that contains fewer columns than on the Oracle side?

The error message states exactly what happened when the data was loaded into the table. That is only going to occur if you have duplicate data coming from the Oracle side. (Duplicate as defined by the primary key on the table on the SQL Server side.)

|||

The table definition is exactly the same on both the Oracle and the SQL Server side. The table itself, in SQL Server, is created by the replication engine and contains the same primary key, that's containing the same columns.

As the data is taken from a snapshot of the table at the Oracle side, where it fit's in the table, it should fit into the table in the SQL Server also. Could this error be caused by something else? I don't see why this error should/could occur...

JB

|||I don't see how it could be. If the PK on each side is the same, I also don't see why the error would even occur. You have me stumped and I don't have an Oracle instance to play with this on.|||

hi,

in the articles tab of the publication check the option that suits you

if table name tablex exist at the subscriber:

keep exisiting table unchanged
drop exisiting table and recreate it
delete data in the existing table that matches the row filter
delete data in the existing table

regards

|||i have the same problem with with Oracle 10g -> SQL Server 2005 (see Link). I use replication (merge) between SQL 2005 und SQL Express and there it works quite fine (with some exceptions). but with oracle (oracle and ms-sql tables are identical) and on some tables i get the unique constraint error with no reason. on reinitalization the tables will be droped and rebuilt but the error occours again (at the same position in the table). i got doubled entries in the ms-sql table. when i update one row table in oracle then both of the ms-sql data rows will get updatet. but the strange thing is that after reinitalization the doubled rows have identical PK's but the rest is not identical. after using this forum, google etc. i come to the conclusion that this must be a hugh bug in the replication of the ms-sql server.