创建口令文件 [
[email protected] ~]$ orapwd file=/u01/app/oracle/product/11.2.0/db_1/dbs/orapwking password=oracle entries=5 force=y [
[email protected] ~]$ sqlplus / as sysdba sql> show parameter remote_login_passwordfile NAME TYPE VALUE ------------------------------------ --------------------------------- ------------------------------ remote_login_passwordfile string EXCLUSIVE sql> grant sysdba to tpcc; sql> select * from v$pwfile_users; USERNAME SYSDBA SYSOPER SYSASM -------------------- --------------- --------------- --------------- SYS TRUE TRUE FALSE TPCC TRUE FALSE FALSE sql> revoke sysdba from tpcc; sql> select * from v$pwfile_users; USERNAME SYSDBA SYSOPER SYSASM -------------------- --------------- --------------- --------------- SYS TRUE TRUE FALSE
sql> show parameter spfile NAME TYPE VALUE ------------------------------------ --------------------------------- ------------------------------ spfile string /u01/app/oracle/product/11.2.0 /db_1/dbs/spfileking.ora sql> create pfile from spfile; File created.
[[email protected] ~]$ cd $ORACLE_HOME/dbs [[email protected] dbs]$ more initking.ora king.__db_cache_size=771751936 king.__java_pool_size=4194304 king.__large_pool_size=4194304 king.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment king.__pga_aggregate_target=268435456 king.__sga_target=1073741824 king.__shared_io_pool_size=0 king.__shared_pool_size=276824064 king.__streams_pool_size=4194304 *.audit_file_dest='/u01/app/oracle/admin/king/adump' *.audit_trail='db' *.compatible='11.2.0.0.0' *.control_files='/u01/app/oracle/oradata/king/control01.ctl','/u02/app/oracle/oradata/king/control02.ctl' *.db_block_size=8192 *.db_domain='' *.db_name='king' *.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area' *.db_recovery_file_dest_size=42949672960 *.diagnostic_dest='/u01/app/oracle' *.dispatchers='(PROTOCOL=TCP) (SERVICE=kingXDB)' *.log_archive_dest_1='LOCATION=/u01/app/oracle/archive/ mandatory' *.log_archive_dest_2='LOCATION=/u02/app/oracle/archive/ optional' *.log_archive_format='%t_%s_%r.dbf' *.open_cursors=300 *.pga_aggregate_target=268435456 *.processes=150 *.remote_login_passwordfile='EXCLUSIVE' *.sga_target=1073741824 *.undo_tablespace='UNDOTBS2'