Re: Q on V7 migration
Date: Wed, 5 Jan 1994 05:16:03 GMT
Message-ID: <1994Jan5.051603.29857_at_scammell.ecos.tne.oz.au>
In article <1994Jan4.185143.337_at_earlham.edu> ontkora_at_earlham.edu writes:
>Hi,
> I am trying to import tables from the system tablespace of a v6
>database to another tablespace in a v7 database. The export file was created
>by a DBA and so it must be imported by a DBA. How can I keep these tables from
>being created in the system tablespace of the v7 database. I don't have the
>create scripts, and I would like to avoid having to re-export and import to
>solve the problem. Correspondence is appreciated.
Issue the following command on your version 6 export file against the version 7 database .
imp userid=<user/<pass> file=<export file> fromuser=system indexfile=tables.sql
For example on our system we issued the following command
imp userid=system/manager file=full.dmp fromuser=system indexfile=tables.sql
This creates the file tables.sql which contains CREATE INDEX commands of all objects in the SYSTEM tablespace and it also contains CREATE TABLE commands, but they are preceded by REM which means that they will not be executed. There is also some other garbage that must be removed. If you want to change all objects in the system tablespace to say a tablespace named "TOOLS", issue the following commands from VI. (No guarentees but it worked at our site)
:1,$s/REM // :1,$s/\.\.\. /REM ... / :1,$s/"SYSTEM" ;/"TOOLS" ;/ :1,$s/CHAR(/VARCHAR2(/g :1,$s/CONNECT SYSTEM;/
(Note that the spaces must be included exactly as they are shown above)
If you have a small number of objects in the system tablespace, it may be safer to perform the modifications to the script yourself rather than perform the above substitutions blindly.
Now run the script against the V7 database.
sqlplus system/manager \_at_tables
Regards Shane
-- ---------------------------------------------------------------------------- Shane Hocking Email : srh_at_scammell.ecos.tne.oz.au Information Technology Group Telecom AustraliaReceived on Wed Jan 05 1994 - 06:16:03 CET