Changeing an Oracle database character set

  1. Check what character set you are using at the moment.
    SQL> select value from v$nls_parameters where parameter='NLS_CHARACTERSET';
  2. Shutdown the database.
    SQL> shutdown immediate;
  3. Startup in mount mode.
    SQL> startup mount;
  4. Restrict the database.
    SQL> alter system enable restricted session;
  5. Check the current job_queue_processes setting.
    SQL> show parameter job_queue_processes;
  6. Set it to 0 for now.
    SQL> alter system set job_queue_processes=0;
  7. Open the database.
    SQL> alter database open;
  8. Change the character set
    SQL> alter database character set WE8MSWIN1252;
  9. Restart the database.
    SQL> shutdown immediate;
    SQL> startup;
  10. Check the job_queue_processes setting.
    SQL> show parameter job_queue_processes;
  11. Check the character setting is the new value.
    SQL> select value from v$nls_parameters where parameter='NLS_CHARACTERSET';
  12. If necessary, change the job_queue_processes back to what it was.
    SQL> alter system set job_queue_processes=10;
  13. Restart the database.
    SQL> shutdown immediate;
    SQL> startup;

Using cpio

Some files that you get from Oracle download come in cpio format.
Here’s what to do with them.
First unzip the files:

gunzip lnx_920_disk1.cpio.gz
gunzip lnx_920_disk2.cpio.gz
gunzip lnx_920_disk3.cpio.gz

Next unpack the contents of the files:

cpio -idmv < lnx_920_disk1.cpio
cpio -idmv < lnx_920_disk2.cpio
cpio -idmv < lnx_920_disk3.cpio