CREATING A NEW SCHEMA? [message #37355] |
Fri, 01 February 2002 11:42 |
CATHYBEE
Messages: 20 Registered: January 2002
|
Junior Member |
|
|
How do i create a new schema..
I have the script to create all the tables and indexes etc..(ERWIN generated).
So how do i create a different schema..
Can I port data across 2 schemas..
Example:
IF TABLE1 IS IN SCHEMA1 and
TABLE2 IS IN SCHEMA2..
CAN I FETCH RECORDS FROM SCHEMA1.TABLE1 AND INSERT IT INTO SCHEMA2.TABLE2?
IF THE ANSWER IS YES, WHAT IS THE BEST WAY OF DOING IT?? USING A PROCEDURE AND A CURSOR OR HOW?
|
|
|
|
|
Re: CREATING A NEW SCHEMA? [message #37398 is a reply to message #37355] |
Wed, 06 February 2002 04:04 |
Armani D
Messages: 19 Registered: February 2002
|
Junior Member |
|
|
Hello CathyBee,
You cannot use Schema Manager to create a new schema. You can use Security Manager to create one. Remeber that in essence a new user is actually a schema. So you can go through the process of creating a new user with your desired name that you wish you schema to be and password and tablespace as well.
When you want to copy tables from one schema to another; the best method is by using export/import utilities on the server itsellf.
i.e.
$ Exp schema1/passwd file=tables.dmp buffer=102400 full=y log=log.log
This will export the entire schema into a dump file called "tables.dmp"
NOW IMPORT
$ imp schema2/passwd file=tables.dmp buffer=102400 full=y ignore=y log=schema2.log
you can check your logs for any errors....
Cheers !
Armani
|
|
|
|