Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Oracle XE - change SID
  1. Install Oracle Database 11g Express Edition

  2. Run Command Line window as administrator, type

    sqlplus sys/ as sysdba

  3. Type

    show parameter spfile;

  4. Type

    shutdown immediate;

  5. Type

    startup mount;



  6. Type

    nid target=sys/@XE dbname=<db_name>

    It will prompt question and then type


  7. Type


  8. Type

    sqlplus /nolog

  9. Type

    conn sys/ as sysdba

  10. Type

    shutdown immediate;

  11. Type

    startup mount;

  12. Type

    alter system set db_name=<db_name> scope=spfile;

  13. Type

    shutdown immediate;



  14. Type

    orapwd file=C:\oraclexe\app\oracle\product\11.2.0\server\database\PWD<SID_name>.ora entries=10

    and then type password

  15. Type

    oradim -delete -sid XE

  16. Type

    oradim -new -sid <SID_name> -intpwd -startmode a

  17. Type

    set ORACLE_SID=<SID_name>

  18. Go to Registry Edit to change ORACLE_SID to <SID_name>

  19. Type

    lsnrctl start lsnrctl stop lsnrctl start

  20. Copy initXE.ora to init<SID_name>.ora in folder C:\oraclexe\app\oracle\product\11.2.0\server\database

  21. Type

    sqlplus sys/ as sysdba

  22. Type

    startup mount;

  23. Type

    alter database open resetlogs;

  24. Type

    show parameter db_name;

  25. Type

    select * from v$instance;



  26. Type

    oradim -edit -sid <SID_name> -startmode auto -srvcstart system

  27. Go to Computer Management, change service 'OracleService<SID_name>' to 'Automatic' startup type, and start the service

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.