vicker313 tech blog

April 27, 2009

Change Oracle 10g DB name in Linux

Filed under: Linux, Oracle — Tags: — vicker313 @ 8:59 am
  1. First of all backup the database.
  2. Then login as SYSDBA to check out the DB ID and DB Name by using the following statement, using SQLPLUS or your favourite SQL Client.
  3. select dbid, name from v$database

  4. Shutdown the database and startup it in mount state (SQLPLUS).
  5. shutdown immediate
    startup mount

  6. Use the DBNEWID command to change the DB ID, you need to login as user with privilege SYSDBA (Terminal).
  7. nid target=username/password@servicename dbname=newdbname

  8. Shutdown database again (SQLPLUS).
  9. shutdown immediate

  10. Change db_name initialization parameter in the initialization file, normally inside database folder/admin/pfile (Terminal).
  11. Create a new password file using ORAPWD utility, the file usually in Oracle folder/dbs (Terminal).
  12. orapwd file=orapwSID password=password entries=

  13. Start database in mount state (SQLPLUS).
  14. startup mount

  15. Open database with RESETLOGS option (SQLPLUS).
  16. alter database open resetlogs

  17. Verify the database id and name using following statement (SQLPLUS).
  18. select dbid, name from v$database

  19. Don’t forget to change ORACLE_SID parameter in .bash_profile and database name in /etc/oratab
    (Terminal).
Advertisements

April 10, 2009

Install Fedora Core 6 into SATA hard disk

Filed under: Linux — Tags: , — vicker313 @ 12:53 pm

Install Fedora Core 6 (FC6) into a SATA Hard Disk might need some tricks. Instead of doing a standard install, you need to issue command such as “linux all-generic-ide”. Then the rest of the installation will be OK.

However after the installation, FC6 will boot into “Kernel Panic” error. In this case, you need to boot with the installation CD, then issue command “linux rescue all-generic-ide”. Then edit /boot/grub/grub.conf, add the key word “all-generic-ide” into the kernel line, for example:

kernel /vmlinuz-2.6.18-1.2798.fc6 ro root=LABEL=/ all-generic-ide rhgb quiet

For some reasons, the display will out of range when you reboot. So you need to edit /etc/inittab, change “id:5:initdefault” to “id:3:initdefault” to make it boot into command mode. Then reboot.

After reboot, login and issue “system-config-display” to configure the display. Then edit /etc/inittab again, change 3 back to 5 and reboot again.

Blog at WordPress.com.