To import a database export into the new database, recreate the tablespace first, ensuring that it is large enough to hold the imported data. Recreate the HPD schema user account, which is done using a script provided with the HPD Server release.
Important The name of the new tablespace and the name of the new user must be the same as the previously exported ones. (This is not required for the datafiles.) |
Connect as the Oracle System user account to the new database and create the tablespace from a Command Prompt. Additional Information about creating tablespaces can be found on the Oracle Documentation for your specific Operating System.
> cd C:\ProgramData\CARIS\HPD\<version>\Server\NewDatabase > sqlplus system/password@databasename SQL> set serveroutput on size 200000 -- Create a new tablespace big enough to hold the data about to be imported, -- EXAMPLE 1: Tablespace >32GB (4194303 blocks) using only 1 datafile SQL> CREATE BIGFILE TABLESPACE tablespace_name DATAFILE '/u01/oracle/oradata/databasename/datafile_name_df1.dbf' Tablespace created.
-- EXAMPLE 2: Tablespace <32GB (4194303 blocks) in size using 1 datafile SQL> CREATE SMALLFILE TABLESPACE tablespace_name DATAFILE 'D:\oracle\ oradata\database_name\datafile_name_df1.dbf' Tablespace created.
-- EXAMPLE 3: Tablespace >32GB using two (or more) datafiles <32GB: SQL> CREATE SMALLFILE TABLESPACE tablespace_name DATAFILE '/u01/oracle/oradata/databasename/datafile_name_df1.dbf' Tablespace created. |
Then run the 'createdbauser' script.
-- Optional: This step is only needed if the export was not done using the System or equivalent DBA role user account, for example, using the HPD Data Pump procedure. Create user with appropriate privileges using the HPD ‘createdbauser.sql’ script where the four required parameters are: SQL> @createdbauser hpdowner password hpdowner tablespace_name ...program output messages appear here... ... User created. ...more ‘Grant’ program output messages appear here... ... Connect as the newly created user to insert data into it. SQL> exit |