During the lifetime of your instrumentation data, you store in your INtools database important data and spend a lot of time on creating it. Therefore, it is imperative that you maintain backup procedures, and back up the appropriate INtools data regularly. If you have saved external files, when restoring your INtools database, keep the original external file paths the same on all client machines.
Each RDBMS has its own backup utility, therefore INtools does not have its own backup utility and relies on you to correctly use the backup utility of the selected database. If you have installed INtools for WATCOM, we recommend that you use a simple copying procedure, or better yet an extracting utility to backup your database. Caution
Shut down all engines that use your database (for example, InfoMaker) before backing up/restoring your database.
This chapter includes information about using the backup and restore procedures in SQL Server and Oracle. The information provided here is not intended to substitute the information given in the relevant RDBMS manual but to supplement it with requirements specific to INtools. Therefore, we strongly recommend that you familiarize yourself with the backup and restore procedures described in your Oracle and SQL Server user guides before you read this chapter.
Perform backup. Make some changes to your database. Perform restore. Make sure you have your previous version of data.
You cannot include the existing user-defined database views in your INtools database backup. To be able to use these views, you must make a separate backup of all your user-defined database views before backing up your INtools database. Then, after restoring the INtools database, you need to recreate the user-defined views using InfoMaker or the database utilities of your platform.
BACKUP DATABASE <intools database name> to <dump device logical name> WITH BLOCKSIZE = 2048, INIT, STATS=5 GO
3. Click Execute Query. You can copy the dump device data file to the target server.
USE <INtools database name> GO EXEC EXEC EXEC EXEC EXEC EXEC GO SP_HELPUSER SP_HELPFILEGROUP SP_HELPFILE SP_HELPGROUP SP_HELPROLE SP_HELPROLEMEMBER
You must have SQL Server installed on your target server with exactly the same character set and sort order as on the source server. Make sure that you have enough disk space for each data file. To improve the restore performance, create the Indexes, Data, and Log files on different physical disks if possible.
CREATE DATABASE <source INtools database> ON PRIMARY (NAME = <source Admin data filename>, FILENAME = <data file filepath>, SIZE = <source Admin data data file size>MB, MAXSIZE = UNLIMITED, FILEGROWTH = 10%), FILEGROUP <source Admin indexes filegroup name> (NAME = <source Admin indexes filename>, FILENAME = <data file filepath>, SIZE = <source Admin indexes data file size>MB, MAXSIZE = UNLIMITED, FILEGROWTH = 10%), LOG ON (NAME = <source log file name>, FILENAME = <data file filepath>, SIZE = <source log file size>MB, MAXSIZE = UNLIMITED, FILEGROWTH = 10%) GO
7. Click Execute Query. 8. Add to the initial INtools database the required filegroups for all existing domains in the source database. For each additional domain, run the following queries:
ALTER DATABASE <source INtools database name> ADD FILEGROUP <source domain data filegroup name> GO
b) Click Execute Query. 3. Restore the INtools database by running the following operands in the Query window:
RESTORE DATABASE <source INtools database name> FROM <target dump device name> WITH MOVE <source Admin file name> TO <target Admin data filename filepath>, MOVE <source Admin index file name> TO <target Admin index file filepath>, MOVE <source domain data file name> TO <target domain data filename filepath>,
For each additional domain, before the MOVE operand for the Log file, enter two MOVE operands: one for the data file and one for the index file.
Post-Restore Tasks
After your INtools database has been restored, you have to create all the required schema logins, define their default database, and grant appropriate access rights. You perform all the post-restore tasks in the MS SQL Server Query Analyzer.
b) Repeat the last two EXEC commands for each existing domain in your database. c) Click Execute Query.
EXEC SP_ADDLOGIN <Admin schema name>, <Admin schema password>, <INtools database name> EXEC SP_ADDLOGIN INTOOLS_LOGIN, INTOOLS_LOGIN, <INtools database name> EXEC SP_ADDLOGIN <domain schema name>, <domain schema password>, <INtools database name> EXEC SP_ADDLOGIN <domain view schema name>, <domain view schema password>, <INtools database name>
3. When the domain type is Operating owner, create the AsBuilt schema login for each domain. Also, for each project, create Project and Combined Project schema logins. Do the following: a) In the In the Query window, type:
EXEC SP_ADDLOGIN <domain schema name>_A_1, <domain schema password>_A_1, <INtools database name>
EXEC SP_DEFAULTDB name> EXEC SP_DEFAULTDB name> EXEC SP_DEFAULTDB database name> EXEC SP_DEFAULTDB database name>
<admin schema name>, <INtools database INTOOLS_LOGIN, <INtools database <domain schema name>, <INtools <domain view schema name>, <INtools
b) Repeat the last two EXEC commands for each existing domain in your database. c) Click Execute Query. 5. When the domain type is Operating owner, define a default database for each AsBuilt schema login for each domain. Also, define a default database for each project, create Project and Combined Project schema logins. Do the following: a) In the In the Query window, type:
EXEC SP_DEFAULTDB <domain <INtools database name> EXEC SP_DEFAULTDB <domain Number>,<INtools database EXEC SP_DEFAULTDB <domain Number>,<INtools database
b) Repeat the last two EXEC commands for each project defined for each domain. c) Click Execute Query. 6. Check the relationship between the SQL Server logins and the SQL Server database users in the restored database. Run the following SQL to generate the login-user relationship report:
USE <INtools database name> GO EXEC SP_CHANGE_USERS_LOGIN UPDATE_ONE, name>, <admin login name> EXEC SP_CHANGE_USERS_LOGIN UPDATE_ONE, INTOOLS_LOGIN EXEC SP_CHANGE_USERS_LOGIN UPDATE_ONE, name>, <domain login name> EXEC SP_CHANGE_USERS_LOGIN UPDATE_ONE, schema name>, <domain view login name>
b) Repeat the last two EXEC commands for each existing domain in your database. c) Click Execute Query. 8. When the domain type is Operating owner, for each AsBuilt schema of each domain and also for each Project and Combined Project schemas, do the following to fix the database user logins according to the generated report, if required. Do the following: a) In the Query window, type:
USE <INtools database name> GO EXEC SP_CHANGE_USERS_LOGIN UPDATE_ONE, <domain schema name>_A_1,<domain schema login name>_A_1, EXEC SP_CHANGE_USERS_LOGIN UPDATE_ONE, <domain schema name>_E_<Project Number>, <domain schema login name>_E_<Project Number> EXEC SP_CHANGE_USERS_LOGIN UPDATE_ONE, <domain schema name>_C_<Project Number>, <domain schema login name>_C_<Project Number>
b) Repeat the last two EXEC commands for each project defined for each domain. c) Click Execute Query. 9. Create an entry in the security system that allows a user to work with the data in the restored INtools database. Do the following: a) In the Query window, type:
USE <INtools GO GRANT ALL TO GRANT ALL TO GRANT ALL TO GRANT ALL TO
database name> <admin schema name> INTOOLS_LOGIN <domain schema name> <domain view schema name>
10
database name> <domain schema name>_A_1 <domain schema name>_E_<Project Number> <domain schema name>_C_<Project Number>
b) Repeat the last two EXEC commands for each project defined for each domain. c) Click Execute Query.
11
Note the procedures described below are intended specifically for INtools. For more information about exporting and importing Oracle databases, refer to the Oracle documentation.
You cannot include the existing user-defined database views in your INtools database backup. To be able to use these views, you must make a separate backup of all your user-defined database views before backing up your INtools database. Then, after restoring the INtools database, you need to recreate the user-defined views using InfoMaker or the database utilities of your platform.
12
Note
For UNIX, make sure that the data file location complies with UNIX regulations.
4. Once export is complete, you can check the log file for details. This completes the export task. You can now copy the new dump file to another computer if needed.
SPOOL <result text file full filepath> Press Enter. Type the following: SELECT TABLESPACE_NAME,FILE_NAME,BYTES FROM DBA_DATA_FILES ORDER BY TABLESPACE_NAME,FILE_NAME; Press Enter. Type the following: SELECT USERNAME,DEFAULT_TABLESPACE,TEMPORARY_TABLESPACE FROM DBA_USERS ORDER BY USERNAME; Press Enter. Type the following: SELECT * FROM DBA_SYS_PRIVS ORDER BY GRANTEE,PRIVILEGE; Press Enter. Type the following: SELECT * FROM V$NLS_PARAMETERS; Press Enter. Type the following: SELECT * FROM V$LOGFILE;
13
ALTER DATABASE ORC2 ADD LOGFILE (<first Redo-log file full filepath>, <second Redo-log file full filepath>) SIZE 2M, Press Enter. Type the following: ALTER TABLESPACE SYSTEM ADD DATA FILE <additional SYSTEM tablespace data file full filepath> SIZE 25M AUTOEXTEND ON NEXT 2M MAXSIZE 3000M Press Enter. Type the following: CREATE PUBLIC ROLLBACK SEGMENT RBS_SYS1 TABLESPACE SYSTEM STORAGE (INITIAL 500K NEXT 500K); Press Enter. ALTER ROOLBACK SEGMENT RBS_SYS1 ONLINE ; Press Enter. Type the following: CREATE TABLESPACE <INtools rollback tablespace name> DATA FILE <additional rollback tablespace data file full filepath> SIZE 50M REUSE AUTOEXTEND ON NEXT 5M MAXSIZE 3000M DEFAULT STORAGE (INITIAL 500K NEXT 500K MINEXTENTS 2 MAXETENTS 249 PCTINCREASE 10) ONLINE PERMANENT; Press Enter. Type the following: CREATE PUBLIC ROLLBACK SEGMENT RBS1 STORAGE (INITIAL 500K NEXT 500K) TABLESPACE <intools rollback tablespace name>; Press Enter. Type the following: ALTER ROLLBACK SEGMENT RBS1 ONLINE; Press Enter. Type the following: CREATE PUBLIC ROLLBACK SEGMENT RBS2 STORAGE (INITIAL 500K NEXT 500K) TABLESPACE <intools rollback tablespace name>; Press Enter.
14
CREATE TABLESPACE <Admin data tablespace name> DATA FILE '<Admin data file full filepath>' SIZE <admin data file size>M REUSE AUTOEXTEND ON NEXT 2M MAXSIZE 3000M DEFAULT STORAGE (INITIAL 500K NEXT 500K MINEXTENTS 1 MAXEXTENTS 249 PCTINCREASE 50) ONLINE PERMANENT; Press Enter. Type the following: CREATE TABLESPACE <Admin indexes tablespace name> DATA FILE '<Admin indexes file full filepath>' SIZE <Admin indexes file size>M REUSE AUTOEXTEND ON NEXT 5M MAXSIZE 3000M DEFAULT STORAGE (INITIAL 500K NEXT 500K MINEXTENTS 1 MAXEXTENTS 249 PCTINCREASE 50) ONLINE PERMANENT; Press Enter. Type the following: CREATE TABLESPACE <Admin temporary data tablespace name> DATA FILE '<Admin temporary data file full filepath>' SIZE <Admin temporary data file size>M REUSE AUTOEXTEND ON NEXT 5M MAXSIZE 3000M DEFAULT STORAGE (INITIAL 500K NEXT 500K MINEXTENTS 1 MAXEXTENTS 249 PCTINCREASE 50) ONLINE TEMPORARY; Press Enter. Type the following: CREATE TABLESPACE <Domain data tablespace name> DATA FILE '<Domain data file full filepath>' SIZE <Domain data file size>M REUSE AUTOEXTEND ON NEXT 5M MAXSIZE 3000M DEFAULT STORAGE (INITIAL 500K NEXT 500K
15
CREATE USER <Admin schema login name> IDENTIFIED BY <Admin schema login password> DEFAULT TABLESPACE <Admin data tablespace name> TEMPORARY TABLESPACE <Admin temporary data tablespace name>; Press Enter. Type the following: CREATE USER INTOOLS_LOGIN IDENTIFIED BY INTOOLS_LOGIN DEFAULT TABLESPACE <Admin data tablespace name> TEMPORARY TABLESPACE <Admin temporary data tablespace name>; Press Enter. Type the following: CREATE USER <Domain schema login name> IDENTIFIED BY <Domain schema login password> DEFAULT TABLESPACE <Domain data tablespace name> TEMPORARY TABLESPACE <Domain temporary data tablespace name>; Press Enter.
16
CREATE USER <AsBuilt schema login name> IDENTIFIED BY <AsBuilt scheme login password> DEFAULT TABLESPACE <Domain data tablespace name> TEMPORARY TABLESPACE <Domain temporary data tablespace name>; Press Enter. Type the following: CREATE USER <Project schema login name> IDENTIFIED BY < Project schema login password> DEFAULT TABLESPACE <Domain data tablespace name> TEMPORARY TABLESPACE <Domain temporary data tablespace name>; Press Enter. Type the following: CREATE USER <Combined project schema login name> IDENTIFIED BY <Combined project schema login password> DEFAULT TABLESPACE <Domain data tablespace name> TEMPORARY TABLESPACE <Domain temporary data tablespace name>; Press Enter.
Notes
A Combined Project schema is the schema of the AsBuilt and project. All AsBuilt schema login names contain the _A_ string. All Project schema login names contain the _E_ string. All Combined Project schema login names contain the _C_ string.
8. Repeat the last two CREATE commands for each required combination of Project and Combined Project in the source domain.
CREATE ROLE INTOOLS_ENGINEER IDENTIFIED BY INTOOLS_ENGINEER; Press Enter. Type the following: REVOKE INTOOLS_ENGINEER FROM SYSTEM; Press Enter.
17
GRANT UNLIMITED TABLESPACE TO <Admin schema login name> WITH ADMIN OPTION; Press Enter. GRANT CREATE SESSION TO INTOOLS_LOGIN; Press Enter. GRANT CREATE TABLE TO INTOOLS_LOGIN; Press Enter. GRANT CREATE SESSION TO INTOOLS_ENGINEER; Press Enter. GRANT CREATE TABLE TO INTOOLS_ENGINEER; Press Enter. GRANT CREATE SYNONYM TO INTOOLS_ENGINEER; Press Enter. GRANT CREATE VIEW TO INTOOLS_ENGINEER; Press Enter. GRANT CREATE SEQUENCE TO INTOOLS_ENGINEER; Press Enter. GRANT AUDIT ANY TO INTOOLS_ENGINEER; Press Enter. GRANT CREATE PROCEDURE TO INTOOLS_ENGINEER; Press Enter. GRANT CREATE TRIGGER TO INTOOLS_ENGINEER; Press Enter. GRANT CREATE TRIGGER TO <domain schema login name>; Press Enter. GRANT EXECUTE ANY PROCEDURE TO <domain schema login name>; Press Enter. GRANT UNLIMITED TABLESPACE TO <domain schema login name>; Press Enter. GRANT CREATE SESSION TO <domain view schema login name>; Press Enter. GRANT CREATE SYNONYM TO <domain view schema login name>; Press Enter.
10. Repeat the last five GRANT commands for each required domain.
18
GRANT UNLIMITED TABLESPACE TO <AsBuilt schema login name>; Press Enter. GRANT EXECUTE ANY PROCEDURE TO <AsBuilt schema login name>; Press Enter. GRANT UNLIMITED TABLESPACE TO < Project schema login name>; Press Enter. GRANT EXECUTE ANY PROCEDURE TO < Project schema login name>; Press Enter. GRANT UNLIMITED TABLESPACE TO <Combined project schema login name>; Press Enter. GRANT EXECUTE ANY PROCEDURE TO <Combined project schema login name>; Press Enter.
12. Repeat the last two GRANT commands for each required combination of Engineering and Combined project in the source domain. 13. Continue setting the GRANT options:
GRANT DBA TO <Admin schema login name> WITH ADMIN OPTION; Press Enter. GRANT INTOOLS_ENGINEER TO SYSTEM WITH ADMIN OPTION; Press Enter.
14. Continue setting the GRANT options:
GRANT CONNECT TO <domain schema login name>; Press Enter. GRANT RESOURCE TO <domain schema login name>; Press Enter. GRANT INTOOLS_ENGINEER TO <domain schema login name>; Press Enter.
15. Repeat the last three GRANT commands for each required domain (as in the source database). 16. Continue setting the GRANT options:
GRANT CONNECT TO <AsBuilt schema login name>; Press Enter. GRANT RESOURCE TO <AsBuilt schema login name>; Press Enter. GRANT INTOOLS_ENGINEER TO <AsBuilt schema login name>; Press Enter. GRANT CONNECT TO < Project schema login name>; Press Enter. GRANT RESOURCE TO < Project schema login name>; Press Enter.
19
ALTER USER Press Enter. ALTER USER Press Enter. ALTER USER ALL; Press Enter. ALTER USER Press Enter.
INTOOLS_LOGIN DEFAULT ROLE ALL; <Admin schema login name> DEFAULT ROLE ALL; <Domain view schema login name> DEFAULT ROLE <Domain schema login name> DEFAULT ROLE ALL;
19. Repeat the last two ALTER commands for each required domain.
ALTER USER <AsBuilt schema login name> DEFAULT ROLE ALL; Press Enter. ALTER USER < Project schema login name> DEFAULT ROLE ALL; Press Enter. ALTER USER <Combined schema project schema login name> DEFAULT ROLE ALL; Press Enter.
20. Repeat the last two ALTER commands for each required combination of Project and Combined Project in the source domain. 21. Continue setting the ALTER options:
ALTER USER <Admin schema login name> QUOTA UNLIMITED ON <Admin data tablespace name>; Press Enter. ALTER USER INTOOLS_LOGIN QUOTA UNLIMITED ON <Admin data tablespace name>; Press Enter. ALTER USER <Domain schema login name> QUOTA UNLIMITED ON <Domain Indexes tablespace name> QUOTA UNLIMITED ON <Domain Data tablespace name>; Press Enter. ALTER USER <Domain view schema login name> QUOTA UNLIMITED ON <Domain Data tablespace name>; Press Enter.
20
ALTER USER <AsBuilt schema login name> QUOTA UNLIMITED ON <Domain Data tablespace name>; Press Enter. ALTER USER < Project schema login name> QUOTA UNLIMITED ON <Domain Data tablespace name>; Press Enter. ALTER USER <Combined project schema login name> QUOTA UNLIMITED ON <Domain Data tablespace name>; Press Enter.
24. Repeat the last two ALTER commands for each required combination of Engineering and Combined project in the source domain. 25. Add the roolback_segments parameter to the target database configuration file. In the SQL Plus window, type:
ROLLBACK_SEGMENTS = (<rollback segment names that were created with the new instance, see step 2 on page 13 and the ones added to the database in step 4 on page 13 >)
26. Restart the target database.
Restore Tasks
Once you have completed the preliminary restore tasks, you can start restoring your backed up database, i.e., reading the new dump file back into your INtools database.
IMP80 SYSTEM/MANAGER@<new instance alias> FROMUSER=<Admin schema login name> TOUSER=<Admin schema login name> FILE=<target dump file full filepath> IGNORE=Y BUFFER=5000000 LOG=<import Admin schema log file full filepath> Press Enter.
3. If in the Encryption schema of the source database contains table INTOOLS_LOGIN, import the source Encryption schema from the dump file. At the operating system command prompt, type:
IMP80 SYSTEM/MANAGER@<new instance alias> FROMUSER=INTOOLS_LOGIN TOUSER=INTOOLS_LOGIN FILE=<target dump file full filepath> IGNORE=Y BUFFER=5000000 LOG=<import Encryption schema log file full filepath> Press Enter.
21
IMP80 SYSTEM/MANAGER<new instance alias> FROMUSER=<domain schema login name> TOUSER=<domain schema login name> FILE=<target dump file full filepath> IGNORE=Y BUFFER=5000000 LOG=<import domain schema log file full filepath> Press Enter.
5. Import the required source domain view schemas from the dump file. For each required domain view schema, type the following at the operating system command prompt:
IMP80 SYSTEM/MANAGER<new instance alias> FROMUSER=<domain view schema login name> TOUSER=<domain schema view login name> FILE=<target dump file full filepath> IGNORE=Y BUFFER=5000000 LOG=<import domain view schema log file full filepath> Press Enter.
6. If the source database contains an AsBuilt schema, import the source AsBuilt schemas from the dump file. At the operating system command prompt, type:
IMP80 SYSTEM/MANAGER@<new instance alias> FROMUSER=<AsBuilt schema login name> TOUSER=<AsBuilt schema login name> FILE=<target dump file full filepath> ignore=Y BUFFER=5000000 LOG=<import AsBuilt schema log file full filepath> Press Enter.
7. To import the Project schemas from the dump file, for each required Project schema, at the operating system command prompt, type:
IMP80 SYSTEM/MANAGER@<new instance alias> FROMUSER= < Project schema login name> TOUSER=< Project schema login name> FILE=<target dump file full filepath> IGNORE=Y BUFFER=5000000 LOG=<import Project schema log file full filepath> Press Enter.
8. To import the Combined Project schemas from the dump file, for each required Combined Project schema, at the operating system command prompt, type:
IMP80 SYSTEM/MANAGER@<new instance alias> FROMUSER=<Combined Project schema login name> TOUSER=<Combined Project schema login name> FILE=<target dump file full filepath> IGNORE=Y BUFFER=5000000 LOG=<import Combined Project schema log file full filepath> Press Enter.
22
Post-Restore Tasks
Post restore tasks include procedures that verify the validity of the imported objects. You will also run SQL queries that correct the problems that you find.
CREATE TABLE PBCATCOL ( pbc_tnam varchar2(30), pbc_tid float, pbc_ownr varchar2(30), pbc_cnam varchar2(30), pbc_cid float, pbc_labl varchar2(254), pbc_lpos float, pbc_hdr varchar2(254), pbc_hpos float, pbc_jtfy float, pbc_mask varchar2(31), pbc_case float, pbc_hght float, pbc_wdth float, pbc_ptrn varchar2(31), pbc_bmap varchar2(1), pbc_init varchar2(254), pbc_cmnt varchar2(254), pbc_edit varchar2(31), pbc_tag varchar2(254)); Press Enter. ALTER TABLE PBCATCOL ADD CONSTRAINT PBSYSCATCOLDICT_IDX PRIMARY KEY (pbc_tnam,pbc_ownr,pbc_cnam); Press Enter. GRANT ALL ON PBCATCOL TO PUBLIC; Press Enter. CREATE TABLE PBCATEDT ( pbe_name varchar2(30), pbe_edit varchar2(254), pbe_type float, pbe_cntr float, pbe_seqn float, pbe_flag float, pbe_work varchar2(32)); Press Enter.
23
24
pbv_cntr float, pbv_msg varchar2(254)); Press Enter. ALTER TABLE PBCATVLD add constraint PBSYSCATVLDS_IDX PRIMARY KEY (pbv_name); Press Enter. GRANT ALL ON PBCATVLD TO PUBLIC; Press Enter.
2. Create the Power Builder System PL/SQL package for the INtools database. In the Oracle SQL Plus window, type:
CREATE OR REPLACE PACKAGE PBDBMS AS procedure disable; procedure put(a varchar2); procedure put(a number); procedure put(a date); procedure put_line(a varchar2); procedure put_line(a number); procedure put_line(a date); procedure new_line; procedure get_line(line out varchar2, status out integer); type chararr is table of varchar2(255) index by binary_integer; procedure get_lines(lines out chararr, numlines in out integer); end; / Press Enter.
25
26
27
28
SELECT OWNER,OBJECT_TYPE,OBJECT_NAME FROM DBA_OBJECTS WHERE STATUS = 'INVALID' ORDER BY 1,2,3; Press Enter.
4. To fix the invalid objects, in the Oracle SQL Plus window, type:
BEGIN FOR REC IN (SELECT OWNER,OBJECT_TYPE,OBJECT_NAME FROM DBA_OBJECTS WHERE STATUS = 'INVALID' ORDER BY 1,2,3) LOOP DBMS_DDL.ALTER_COMPILE(REC.OBJECT_TYPE,REC.OWNER, REC.OBJECT_NAME); END LOOP; END; / Press Enter.
5. To insure that the imported database is free of invalid objects, run the check again as explained in step 3 above.
29
ALTER PROCEDURE <stored procedure name> COMPILE; Press Enter. SHOW ERRORS Press Enter.
For example, there is an error showing a missing sequence. To correct the problem, type:
CREATE SEQUENCE <sequence name>; Press Enter. ALTER PROCEDURE <stored procedure name> COMPILE; Press Enter.
If the result of the previous command is Statement processed, the problem is solved. If you get another message, run the SHOW ERRORS command again. 7. If after running the SELECT query in step 3, there are INtools audit triggers (triggers starting with TR_CL_) that are invalid objects, but the P_Audit_Triggers stored procedure is valid, connect to the appropriate domain schema and run the following PL/SQL block:
DECLARE iSTAT INTEGER; BEGIN P_AUDIT_TRIGGERS(ISTAT); EXCEPTION WHEN OTHERS THEN RAISE; END; / Press Enter.
30
DELETE FROM ACTIVITY_TRACKING WHERE PROJ_ID IN (SELECT PROJ_ID FROM PROJECT WHERE PROJ_DEL <> 'H' AND PROJ_ID NOT IN (<project ID to be kept>,<project ID to be kept>,)); Press Enter. DELETE FROM MODULE_LICENSE_PROJECT WHERE PROJ_ID IN (SELECT PROJ_ID FROM PROJECT WHERE PROJ_DEL <> 'H' AND PROJ_ID NOT IN (<project ID to be kept>,<project ID to be kept>),); Press Enter. DELETE FROM PROJECT WHERE PROJ_ID NOT IN (<project ID to be kept>,<project ID to be kept>,) AND PROJ_DEL <> 'H'; Press Enter. COMMIT; Press Enter.
31
You need to back up these files to enable loading of the trimmed audit trail data to the CHANGES_LOG table of a particular domain. The software records the audit trail data in the CHANGES_LOG table that exists in each INtools domain. To learn more about trimming and loading audit trail data, see Users Guide, Administration Module, Audit Trail Mechanism. The external file containing audit trail data has a filename made up of the date range within which the data was trimmed, the domain schema name, the CHANGES_LOG table name, and the filename which the System Administrator has defined in the Administration module before trimming. The following is an example of an external file with audit trail data: 20010614_20011015_<domain schema>#CHANGES_LOG#<user-defined filename>. The audit trail period segment displays the date range in the following order: year, month, and day.
When creating additional Oracle instances, we recommend that you do not change the name INTOOLSTORAGE for any of the INtools databases. For details about creating the INTOOLSTORAGE folder in the source Oracle server, see Installing INtools on Oracle, Creating a New Oracle 8.0.5 Instance, and Creating a New Oracle 8.1.7 Instance with INtools Specifications.
32
To back up files when moving an INtools database from one Oracle server to another.
1. On your target Windows NT 4.0, Windows 2000, or UNIX server, select a disk drive with 300 MB free disk space for the storage of about 1 million records. 2. Create a folder INTOOLSTORAGE. 3. Create a subfolder <drive>:\INTOOLSTORAGE\<name of new Oracle database server>. Tip
The name of the new Oracle database appears as the value of the DB_NAME parameter in the Oracle Instance Configuration file. For example, ORC2.
4. Do one of the following: On Oracle 8.0.5 or 8.0.6, open the Oracle Instance Configuration file INIT<SID>.ORA, where <SID> stands for your new Oracle instance name. On Oracle 8.1.7 or 9i, open the Oracle Instance Configuration file INIT.ORA.
5. In the Oracle Instance Configuration file, add the following parameter line: utl_file_dir=<drive>:\INtoolStorage \orc2. 6. Copy the content of the folder ORC1 in the source path <drive>:\INTOOLSTORAGE to the folder ORC2 in the target path <drive>:\INTOOLSTORAGE. 7. Restart your computer.
33
The name of the new Oracle database appears as the value of the DB_NAME parameter in the Oracle Instance Configuration file. For example, ORC2.
2. In the target Oracle database, do one of the following: On Oracle 8.0.5 or 8.0.6, open the Oracle Instance Configuration file INIT<SID>.ORA, where <SID> stands for your new Oracle instance name. On Oracle 8.1.7 or 9i, open the Oracle Instance Configuration file INIT.ORA.
3. In the Oracle Instance Configuration file, add the following parameter line:
utl_file_dir=<drive>:\INtoolStorage\orc2.
4. Copy the content of the folder ORC1 in the path <drive>:\INTOOLSTORAGE\ to the folder ORC2. 5. Restart your computer.
34
35
server name DEVELOP2 corresponds to your target Windows NT 4.0/2000 server name. On the SQL Server 2000 with an INtools database created in a default instance, create the following path: <drive>:\INTOOLSTORAGE\<default instance name of the new SQL Server server>\< INtools database name>. For example:
36