Start and Stop services at oracle11g, modify character sets, import and export, create and delete tablespaces, and uninstall oracle.

Source: Internet
Author: User


Start and Stop services at oracle11g, modify character sets, import and export, create and delete tablespaces, and uninstall oracle. [start and stop the service] // start and stop listening for www.2cto.com lsnrctl start; lsnrctl stop; // start and stop the service sqlplus orcl as sysdba; // login> shutdown immediate;> STARTUP; or ps-ef | grep ora_dbw0 _ $ ORACLE_SID kill-9 process number 2. [modify character set] select userenv ('language ') from dual; // view Character Set, SQL> conn sys/sys as sysdba; SQL> shutdown immediate; SQL> STARTUP MOUNT; SQL> alter session set SQL _TRACE = TRUE; SQL> Alter system enable restricted session; SQL> alter system set JOB_QUEUE_PROCESSES = 0; SQL> alter system set AQ_TM_PROCESSES = 0; SQL> Alter database open; SQL> ALTER DATABASE CHARACTER SET ZHS16GBK; SQL> alter database character set INTERNAL_USE ZHS16GBK; // SQL> shutdown immediate; SQL> STARTUP; 3. [Import and Export] All user tables imp mapabc_mobilemap/mapabc_mobilemap fromuser = mapabc_mobilemap file =/home/oracle/qqtdatabas E1215.dmp; exp mapabc_mobilemap/mapabc_mobilemap file =/home/oracle/qqtdatabase1215.dmp; user-specified table exp mapabc_mobilemap/mapabc_mobilemap tables = (partition) file = D:/123 test/release; 4. [create and delete tablespace] -- create temporary tablespace QQT_TEMP tempfile '/home/oracle/app/oradata/orcl/qqt_temp.dbf' size 50 m autoextend on next 50 m maxsize 20480 m extent management local; -- create a user tablespace creat E tablespace QQT logging datafile '/home/oracle/app/oradata/orcl/qqt_data.dbf' size 50 m autoextend on next 50 m maxsize 20480 m extent management local; -- create a user and create user mapabc_mobilemap identified by using tablespace QQTtemporary tablespace QQT_TEMP; -- grant the user permission to grant connect, resource, dba to mapabc_mobilemap; -- delete the tablespace drop user mapabc_mobilemap cascade; drop tablespace qqt comment di Ng contents and datafiles; drop tablespace QQT_TEMP including contents and datafiles; 5. [uninstall Oracle 11g] 1. use SQL * PLUS to stop the database [oracle @ OracleTest oracle] $ sqlplus/nologSQL> connect/as sysdbaSQL> shutdown [immediate] SQL> exit2. stop Listener [oracle @ OracleTest oracle] $ lsnrctl stop3. stop HTTP service [root @ OracleTest/root] # service httpd stop4. use su or log on to root again (if you want to reinstall, You can retain the oracle user, saves input environment variables.) 5. delete the installation directory [root @ OracleTest/root] # Rm-rf/u01/app/oracle/6. delete the files under/usr/bin [root @ OracleTest/root] # rm/usr/local/bin/dbhome [root @ OracleTest/root] # rm/usr/local/ bin/oraenv [root @ OracleTest/root] # rm/usr/local/bin/coraenv7. delete/etc/oratab www.2cto.com [root @ OracleTest/root] # rm/etc/oratab8. set/etc/oraInst. delete [root @ OracleTest/root] # rm/etc/oraInst. loc9. Delete the oracle user (if you want to reinstall it, Do not delete it) [root @ OracleTest/root] # userdel-r oracle10. remove the user Delete Group (to reinstall the group, do not delete it) [root @ OracleTest/root] # groupdel oinstall [root @ OracleTest/root] # groupdel dba11. Delete the startup service [root @ OracleTest/root] # chkconfig -- del dbora restart so far after, the Oracle Database in your Linux system has been completely deleted !!! The above is the CentOS5.4 + Oracle 11g environment.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.