Home » SQL & PL/SQL » SQL & PL/SQL » COPY Command
COPY Command [message #10308] Wed, 14 January 2004 04:19 Go to next message
Bvphl
Messages: 8
Registered: June 2003
Junior Member
Hai Friends

Can please write the correct statement for copying the FUNCTION, instead of TABLE from one server to another server.

(OR From one database to another database in the same server. [[or else for both the command  for both are same]].

For Eg:

COPY TO HRADMIN/password@SUN5P -

create TABLE_CARD_TEST USING -

 SELECT * FROM TABLE_CARD;

 

--SUN5P was the Server.

--Table_card_Test and Table_Card are on different databases.

 My question was instead of COPYing the TABLE, can we copy the function??

 
Re: COPY Command [message #10324 is a reply to message #10308] Wed, 14 January 2004 19:19 Go to previous messageGo to next message
Daljit Singh
Messages: 290
Registered: October 2003
Location: Texas
Senior Member
Hi,

Well according to me u can't do it using any copy command. But it doesn't mean that u cant do it. for this u can get the sources of ur proceudres/functions/packages from ur DB and use the same in another DB to create the same objects.

To get the sources use the following query :

select text from user_source
where type in ('FUNCTION','PROCEDURE','PACKAGE')
order by name,line;

After running this query just export the output to some flat file and use that as ur script fro create objects which are availble in ur DB.
Re: COPY Command [message #10326 is a reply to message #10324] Wed, 14 January 2004 21:25 Go to previous message
Bvphl
Messages: 8
Registered: June 2003
Junior Member
Mr. Daljit Singh
Thank You for your reply.
I will try to create the Object acc. to your suggestion. If I got any problem I will let u know.
Once again Thanks.
Previous Topic: plsql help
Next Topic: ORA-06512 & ORA-04088 error message but my trigger compiles without errors!?
Goto Forum:
  


Current Time: Thu Apr 25 17:28:39 CDT 2024