home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1996 February / PCWK0296.iso / po7_win / db / rdbms71 / install2.sql < prev    next >
Encoding:
Text File  |  1995-01-04  |  2.3 KB  |  59 lines

  1. set echo on
  2. spool %rdbms71%\trace\build.log
  3.  
  4. rem ==========================================================================
  5. rem Instructions to build controlfile for starter database if things fail.
  6. rem ==========================================================================
  7. rem Sometimes while installing Personal Oracle the starter database may not
  8. rem be built because of lack of memory. After installation follow these steps
  9. rem to build controlfiles:
  10. rem 1)In a DOS box or from the File Manager:
  11. rem   delete ctl1.ora if present from your ORACLE_HOME\DBS  and
  12. rem   ORACLE_HOME\RDBMS71\ARCHIVE locations
  13. rem   delete wdblog1.ora and wdblog2.ora if present from ORACLE_HOME\DBS
  14. rem   directory
  15. rem 2)In Windows fire up sqldba32.exe
  16. rem 3)At the "SQLDBA>" prompt run the install2.sql script located in your
  17. rem   ORACLE_HOME\DBS directory.  For example if my ORACLE_HOME was c:\orawin
  18. rem   I would type:
  19. rem    @c:\orawin\dbs\install2.sql
  20. rem
  21. rem 4)You will be prompted for the password for the internal account.
  22. rem 5)if you get no errors you are all set and can exit sqldba32.exe. if not
  23. rem   look up the errors in the error codes manual and debug the problem.
  24. rem ==========================================================================
  25.  
  26. set echo off
  27.  
  28. connect internal;
  29. startup nomount pfile=%rdbms71%\inst.ora;
  30.  
  31. -- Create a new control file from the existing database files.
  32. -- reset the log file name information in the control file,
  33. -- but the new logs won't be created until we open the database
  34. -- using the resetlogs option.
  35.  
  36. -- rs:  no archive logging for Windows DB
  37. --      only multiplex control files (init.ora)
  38. -- ksw: change so that we use the new environment variables,
  39. --      change to multiplex the redo logs
  40. --      change to turn on archive log mode
  41.  
  42. create controlfile reuse set database oracle
  43.     datafile '%RDBMS71_CONTROL%\wdbsys.ora',
  44.              '%RDBMS71_CONTROL%\wdbuser.ora',
  45.              '%RDBMS71_CONTROL%\wdbtemp.ora',
  46.              '%RDBMS71_CONTROL%\wdbrbs.ora'
  47.     logfile  group 1 ('%RDBMS71_CONTROL%\wdblog1.ora') size 500K,
  48.              group 2 ('%RDBMS71_CONTROL%\wdblog2.ora') size 500K resetlogs
  49.     noarchivelog;
  50.  
  51. -- Now, open the database and recreate the log files.
  52.  
  53. alter database oracle open resetlogs;
  54.  
  55. shutdown;
  56.  
  57. spool off
  58.  
  59.