Showing posts with label save. Show all posts
Showing posts with label save. Show all posts

Monday, March 19, 2012

Oracle/MS SQL Interface

Hi everyone. I need to be able to query a database in Oracle and then
actually save the data in an MS SQL database, does anyone know what is
the best way to do this? Would it be best to do everything internal
(inside MS SQL) or external (with some script: javascript, vbscript,
perl)?

Thanks in advanced,
MikeSorry for the repeat, I didn't think my last one went through.|||brogdonm wrote:
> Hi everyone. I need to be able to query a database in Oracle and then
> actually save the data in an MS SQL database, does anyone know what is
> the best way to do this? Would it be best to do everything internal
> (inside MS SQL) or external (with some script: javascript, vbscript,
> perl)?
> Thanks in advanced,
> Mike

It depends on what additionally you want to do with the data. If you
are looking to simply replicate your Oracle data in MS SQL Server use
DTS. If you are looking to present the data, say in a web page, you
might want to use any of the various scripting languages.
You'll still end up doing quite a bit internally, probably with views
and stored procedures.
That's my guess.

Thanks|||Hi

You may want to look at using a linked server, see Books online for more
information.

John

"brogdonm" <Brogdons@.gmail.com> wrote in message
news:1135714953.066647.272150@.g43g2000cwa.googlegr oups.com...
> Hi everyone. I need to be able to query a database in Oracle and then
> actually save the data in an MS SQL database, does anyone know what is
> the best way to do this? Would it be best to do everything internal
> (inside MS SQL) or external (with some script: javascript, vbscript,
> perl)?
> Thanks in advanced,
> Mike|||I don't really know what DTS is, could you please inform me.|||brogdonm (Brogdons@.gmail.com) writes:
> I don't really know what DTS is, could you please inform me.

DTS = Data Transformation Services. This comes with SQL Server. DTS is
a tool for exporting and importing data. If you would like to drag
you entire table over to Oracle, this could be a good choice, particularly
if you are doing it on regular basis. Disclaimer: I have never used DTS
myself.

But if you want to run ad-hoc queries aginst the Oracle table, then it's
better to set up a linked server. You can then access the Oracle table
with four-part notation:

SELECT * FROM ORACLE.catalog.schema.tbl

and also join with local tables.

For information on setting up a linked server, see sp_addlinkedserver
in Books Online.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Hi

You may walso want to check out http://support.microsoft.com/kb/280106/

John

"brogdonm" <Brogdons@.gmail.com> wrote in message
news:1135792776.737662.236880@.o13g2000cwo.googlegr oups.com...
>I don't really know what DTS is, could you please inform me.

Monday, March 12, 2012

Oracle Stored Procedure as datasource

I cannot get an Oracle stored procedure to work as my datasource to save my
life...
I purchased Professional SQL Server Reporting Services book from Wrox -
looking at p.115. Followed instructions exactly - but am obviously missing
something. It's not working.
In the Solution Explorer, I right-clicked "Reports" and chose "Add New
Item". Chose "Report" and named the report "Test_Parcel".
On the "Data" tab, I chose "New Dataset" from the Dataset dropdown. The
Dataset dialogue appeared.
1) I named the new dataset "rebaproc" (reba is the name of the Oracle
server),
2) chose rebauat (my existing ORACLE - not OLEdb - shared data source that
I've been using for other reports - that are built on simply queries
accessing Oracle views),
3) chose "StoredProcedure" in the Command Type dropdown, and
4) typed the name of the stored procedure - sp_Test_Parcel,
5) clicked "OK"
As soon as I click "OK", I get the error:
"Could not generate a list of fields for the query. Check the query syntax
or click Refresh Fields on the query toolbar. ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'SP_TEST_PARCEL',
ORA-06550: line 1, column 7: PL/SQL: Statement ignored."
The only two "IN" parameters are:
pnumUPCId IN NUMBER, /* UPC_ID to read
*/
pnumParcelId IN NUMBER, /* Parcel_Id to read
*/
When I click "Refresh Fields", RS pops up a dialog (the "Define Query
Parameters" dialog) which asks for parameter values for the pnumUPCId and
pnumParcelId. I enter values, and click OK, and get the same error
referenced above.
Not at all sure what I'm supposed to be doing... I even tried manually
adding "Report Parameters", but same issue...
Please help.
ThanksI had this same exact issue and finally got it to work. When you hit refresh
fields and it pops up with your two parameters try selecting...I think it is
the NULL at the top of the dropdown instead of actually typing in values.
Once you do that it will finally create your parameters in your report from
your stored procedure. I read the same book you did and followed
instructions on the internet just like the book and had the same results you
did - I too am using oracle. Once it created the parameters in the report it
got rid of the parameter error. If you can't get it to create them the first
time of doing this try it again...it seems to be a bit crazy and one time
took me 3 times of selecting the null to get it to work. Good Luck ;-)
Melissa
"Derek in Richmond" wrote:
> I cannot get an Oracle stored procedure to work as my datasource to save my
> life...
> I purchased Professional SQL Server Reporting Services book from Wrox -
> looking at p.115. Followed instructions exactly - but am obviously missing
> something. It's not working.
> In the Solution Explorer, I right-clicked "Reports" and chose "Add New
> Item". Chose "Report" and named the report "Test_Parcel".
> On the "Data" tab, I chose "New Dataset" from the Dataset dropdown. The
> Dataset dialogue appeared.
> 1) I named the new dataset "rebaproc" (reba is the name of the Oracle
> server),
> 2) chose rebauat (my existing ORACLE - not OLEdb - shared data source that
> I've been using for other reports - that are built on simply queries
> accessing Oracle views),
> 3) chose "StoredProcedure" in the Command Type dropdown, and
> 4) typed the name of the stored procedure - sp_Test_Parcel,
> 5) clicked "OK"
> As soon as I click "OK", I get the error:
> "Could not generate a list of fields for the query. Check the query syntax
> or click Refresh Fields on the query toolbar. ORA-06550: line 1, column 7:
> PLS-00306: wrong number or types of arguments in call to 'SP_TEST_PARCEL',
> ORA-06550: line 1, column 7: PL/SQL: Statement ignored."
> The only two "IN" parameters are:
> pnumUPCId IN NUMBER, /* UPC_ID to read
> */
> pnumParcelId IN NUMBER, /* Parcel_Id to read
> */
> When I click "Refresh Fields", RS pops up a dialog (the "Define Query
> Parameters" dialog) which asks for parameter values for the pnumUPCId and
> pnumParcelId. I enter values, and click OK, and get the same error
> referenced above.
> Not at all sure what I'm supposed to be doing... I even tried manually
> adding "Report Parameters", but same issue...
> Please help.
> Thanks
>|||Thanks for responding Melissa. I tried what you suggested, but it still
doesn't seem to work.
---
"Melissa" wrote:
> I had this same exact issue and finally got it to work. When you hit refresh
> fields and it pops up with your two parameters try selecting...I think it is
> the NULL at the top of the dropdown instead of actually typing in values.
> Once you do that it will finally create your parameters in your report from
> your stored procedure. I read the same book you did and followed
> instructions on the internet just like the book and had the same results you
> did - I too am using oracle. Once it created the parameters in the report it
> got rid of the parameter error. If you can't get it to create them the first
> time of doing this try it again...it seems to be a bit crazy and one time
> took me 3 times of selecting the null to get it to work. Good Luck ;-)
> Melissa
> "Derek in Richmond" wrote:
> > I cannot get an Oracle stored procedure to work as my datasource to save my
> > life...
> >
> > I purchased Professional SQL Server Reporting Services book from Wrox -
> > looking at p.115. Followed instructions exactly - but am obviously missing
> > something. It's not working.
> >
> > In the Solution Explorer, I right-clicked "Reports" and chose "Add New
> > Item". Chose "Report" and named the report "Test_Parcel".
> >
> > On the "Data" tab, I chose "New Dataset" from the Dataset dropdown. The
> > Dataset dialogue appeared.
> >
> > 1) I named the new dataset "rebaproc" (reba is the name of the Oracle
> > server),
> > 2) chose rebauat (my existing ORACLE - not OLEdb - shared data source that
> > I've been using for other reports - that are built on simply queries
> > accessing Oracle views),
> > 3) chose "StoredProcedure" in the Command Type dropdown, and
> > 4) typed the name of the stored procedure - sp_Test_Parcel,
> > 5) clicked "OK"
> >
> > As soon as I click "OK", I get the error:
> > "Could not generate a list of fields for the query. Check the query syntax
> > or click Refresh Fields on the query toolbar. ORA-06550: line 1, column 7:
> > PLS-00306: wrong number or types of arguments in call to 'SP_TEST_PARCEL',
> > ORA-06550: line 1, column 7: PL/SQL: Statement ignored."
> >
> > The only two "IN" parameters are:
> > pnumUPCId IN NUMBER, /* UPC_ID to read
> > */
> > pnumParcelId IN NUMBER, /* Parcel_Id to read
> > */
> >
> > When I click "Refresh Fields", RS pops up a dialog (the "Define Query
> > Parameters" dialog) which asks for parameter values for the pnumUPCId and
> > pnumParcelId. I enter values, and click OK, and get the same error
> > referenced above.
> >
> > Not at all sure what I'm supposed to be doing... I even tried manually
> > adding "Report Parameters", but same issue...
> >
> > Please help.
> >
> > Thanks
> >|||Sorry I wasn't any help. I am using the oracle OLE DB driver (not MS driver
for Oracle) so I guess that might have something to do with it...you
mentioned you are not. Here are my steps I went through which sound very
similar to yours:
1. Add existing datasource to project
2. Create New Report
3. New Dataset Name is test
4. Datasource hdbprod (same datasource I use in other reports)
5. Command Type StoredProcedure
6. Query String MAKE_ADDRESS_30DAY_TABLE
7. OK
8. OK on scary parameter error
9. Hit refresh fields button
10. Select NULL on two parameters (selecting empty won't work)
11. Report -> Report Parameters to verify two parameters were created
I'll look through my notes and see if there is anything else I can find.
Maybe someone else has some more experience with it.
Melissa
"Derek in Richmond" wrote:
> Thanks for responding Melissa. I tried what you suggested, but it still
> doesn't seem to work.
> ---
> "Melissa" wrote:
> > I had this same exact issue and finally got it to work. When you hit refresh
> > fields and it pops up with your two parameters try selecting...I think it is
> > the NULL at the top of the dropdown instead of actually typing in values.
> > Once you do that it will finally create your parameters in your report from
> > your stored procedure. I read the same book you did and followed
> > instructions on the internet just like the book and had the same results you
> > did - I too am using oracle. Once it created the parameters in the report it
> > got rid of the parameter error. If you can't get it to create them the first
> > time of doing this try it again...it seems to be a bit crazy and one time
> > took me 3 times of selecting the null to get it to work. Good Luck ;-)
> > Melissa
> >
> > "Derek in Richmond" wrote:
> >
> > > I cannot get an Oracle stored procedure to work as my datasource to save my
> > > life...
> > >
> > > I purchased Professional SQL Server Reporting Services book from Wrox -
> > > looking at p.115. Followed instructions exactly - but am obviously missing
> > > something. It's not working.
> > >
> > > In the Solution Explorer, I right-clicked "Reports" and chose "Add New
> > > Item". Chose "Report" and named the report "Test_Parcel".
> > >
> > > On the "Data" tab, I chose "New Dataset" from the Dataset dropdown. The
> > > Dataset dialogue appeared.
> > >
> > > 1) I named the new dataset "rebaproc" (reba is the name of the Oracle
> > > server),
> > > 2) chose rebauat (my existing ORACLE - not OLEdb - shared data source that
> > > I've been using for other reports - that are built on simply queries
> > > accessing Oracle views),
> > > 3) chose "StoredProcedure" in the Command Type dropdown, and
> > > 4) typed the name of the stored procedure - sp_Test_Parcel,
> > > 5) clicked "OK"
> > >
> > > As soon as I click "OK", I get the error:
> > > "Could not generate a list of fields for the query. Check the query syntax
> > > or click Refresh Fields on the query toolbar. ORA-06550: line 1, column 7:
> > > PLS-00306: wrong number or types of arguments in call to 'SP_TEST_PARCEL',
> > > ORA-06550: line 1, column 7: PL/SQL: Statement ignored."
> > >
> > > The only two "IN" parameters are:
> > > pnumUPCId IN NUMBER, /* UPC_ID to read
> > > */
> > > pnumParcelId IN NUMBER, /* Parcel_Id to read
> > > */
> > >
> > > When I click "Refresh Fields", RS pops up a dialog (the "Define Query
> > > Parameters" dialog) which asks for parameter values for the pnumUPCId and
> > > pnumParcelId. I enter values, and click OK, and get the same error
> > > referenced above.
> > >
> > > Not at all sure what I'm supposed to be doing... I even tried manually
> > > adding "Report Parameters", but same issue...
> > >
> > > Please help.
> > >
> > > Thanks
> > >