|
|
Re: Oracle: How to move a table to another schema? [message #298388 is a reply to message #298384] |
Wed, 06 February 2008 00:28 |
someswar1
Messages: 53 Registered: January 2008
|
Member |
|
|
without exp/imp.The client says without exp/imp.As per searching the oracle documentation i found one package dbms_schema_copy.clone to copy entire schema to another user. But i am not able to implemented. can u guide me what is the procedure or steps to using this package.
regards:
someswar
|
|
|
|
Re: Oracle: How to move a table to another schema? [message #298400 is a reply to message #298397] |
Wed, 06 February 2008 00:58 |
someswar1
Messages: 53 Registered: January 2008
|
Member |
|
|
I have to user in same database(someswar). One is scott and another is some. This is the code I want to copy entire scott schema or particular table of scott user to some user.
BEGIN
dbms_schema_copy.clone('scott', 'some', 2, FALSE);
dbms_schema_copy.clean_up('scott', 'some');
END;
When i execute the code as sys user the code be executede but no schema will be copied in some user. How i copy . Please Help;
Regards:
Someswar
|
|
|
|
|
|
|
|
Re: Oracle: How to move a table to another schema? [message #298463 is a reply to message #298461] |
Wed, 06 February 2008 02:54 |
pablolee
Messages: 2882 Registered: May 2007 Location: Scotland
|
Senior Member |
|
|
I'm going to assume that you didn't mean to shout there.
If he has supplied this as a test to check your knowledge, I'd suggest some use of the dbms_metadata package (we'll let you look up the syntax and uses of it from the documentation) If it is an actual client request, I'd be asking why they don't want to use exp/imp (or any of the other potential implementations.
|
|
|
Re: Oracle: How to move a table to another schema? [message #298466 is a reply to message #298379] |
Wed, 06 February 2008 03:03 |
mshrkshl
Messages: 247 Registered: September 2006 Location: New Delhi
|
Senior Member |
|
|
yes.try it.
conn / as sysdba
CREATE USER some
IDENTIFIED BY some
DEFAULT TABLESPACE tablespace_name
TEMPORARY TABLESPACE temp
QUOTA UNLIMITED ON tablespace_name;
grant create session, resource TO some;
BEGIN
dbms_schema_copy.clone(’scott’, ‘some’);
dbms_schema_copy.clean_up(’scott’, ‘some’);
END;
regards,
|
|
|
|
|
|
Re: Oracle: How to move a table to another schema? [message #298498 is a reply to message #298379] |
Wed, 06 February 2008 04:21 |
mshrkshl
Messages: 247 Registered: September 2006 Location: New Delhi
|
Senior Member |
|
|
your first question was
Quote: | “How can I move a table to another schema in Oracle?”
|
now your question is
Quote: | hOW I BACKUP ANY TABLE USING ANY BUILT IN PACKAGE
|
please stick to your first question.
move and backup are not similar.
regards,
|
|
|
|
Re: Oracle: How to move a table to another schema? [message #298502 is a reply to message #298500] |
Wed, 06 February 2008 04:27 |
pablolee
Messages: 2882 Registered: May 2007 Location: Scotland
|
Senior Member |
|
|
STOP SHOUTING. IT IS RUDE. Switch off your caps lock key.
You ask a second question. Was the first question answered for you? Did you think to thank mshrkshl (I'm assuming that you used his demo to help you) Your second question may be similar, but it is a [different question and therefore should be a new thread.
|
|
|
|
Re: Oracle: How to move a table to another schema? [message #298515 is a reply to message #298511] |
Wed, 06 February 2008 04:47 |
someswar1
Messages: 53 Registered: January 2008
|
Member |
|
|
But i am using this package follows
CREATE USER some
IDENTIFIED BY some
DEFAULT TABLESPACE tablespace_name
TEMPORARY TABLESPACE temp
QUOTA UNLIMITED ON tablespace_name;
grant create session, resource TO some;
BEGIN
dbms_schema_copy.clone(’scott’, ‘some’);
dbms_schema_copy.clean_up(’scott’, ‘some’);
END;
but using this procedure the scott schema table is not moved to some user. How i do it
|
|
|
|
|
|
|
|
|
|
Re: Oracle: How to move a table to another schema? [message #503624 is a reply to message #503465] |
Mon, 18 April 2011 07:53 |
joy_division
Messages: 4963 Registered: February 2005 Location: East Coast USA
|
Senior Member |
|
|
junsaito wrote on Sat, 16 April 2011 00:03if i do understood what you are trying to said, the simplest way to transfer one table from one database to another is this
And the question was to transfer a table from one SCHEMA to another, not one DATABASE to another.
|
|
|
Re: Oracle: How to move a table to another schema? [message #514156 is a reply to message #503624] |
Fri, 01 July 2011 22:56 |
NaeemAlsaadi
Messages: 20 Registered: November 2010 Location: Oman
|
Junior Member |
|
|
As my understood that you want to copy table to another database try this
/*The following command copies the entire X table to a table named XX in another database. Note that the tables are located in two different databases. If XX already exists, SQL*Plus replaces the table and its contents. The columns in XX have the same names as the columns in the source table, X.*/
* you should have sys privileges and write this script in User1
COPY FROM User1/PasswordUser1@SchemaDB1 TO User2/PasswordUser2@SchemaDB2
REPLACE XX
USING SELECT * FROM X;
good luck
|
|
|
|
|
|
|
Re: Oracle: How to move a table to another schema? [message #514580 is a reply to message #514156] |
Tue, 05 July 2011 08:12 |
joy_division
Messages: 4963 Registered: February 2005 Location: East Coast USA
|
Senior Member |
|
|
NaeemAlsaadi wrote on Fri, 01 July 2011 23:56As my understood that you want to copy table to another database try this
another person who does not know how to read or comprehend what is written. Where does it say from one database to another. As has been pointed out at least once before, one SCHEMA to another.
|
|
|