In a stand-alone environment, you must first switch to an Oracle user to start or shut down the Oracle system, as follows
Oracle databases have several startup methods:
1,
Non-installation startup, this way to launch executable: Rebuild control file, rebuild database
Read the Init.ora file, start the instance, that is, start the SGA and background processes, this startup requires only Init.ora files.
2,
Install startup, this way to start under executable:
Database log archiving,
Database Media Recovery,
Bring the data file online or offline,
Reposition the data file and redo the log file.
Execute "nomount" and then open the control file to confirm the location of the data file and the online log file.
However, the data file and log files are not checked for verification at this time.
3,
Execute "nomount" first, then "Mount", and then open all the database files, including the redo log file,
In this way, the data in the database can be accessed.
4, startup, equal to the following three orders
Startup Nomount
ALTER DATABASE Mount
ALTER DATABASE open
5,
Constraint start
This way the database can be started, but only users with certain privileges are allowed to access
When an unprivileged user accesses, the following prompts appear:
ERROR:
Ora-01035:oracle only allow users with restricted session permissions to use
6,
Forced start mode
When you cannot close the database, you can use startup force to complete the shutdown of the database
Close the database before performing the normal start database command
7, startup pfile= parameter filename
Startup method with initialization parameter file
Read the parameter file first, then start the database by setting in the parameter file
Cases:
Startup Pfile=e:oracleadminoradbpfileinit.ora
several ways to close Oracle databases:
1,
Shut down the database in the normal way.
2,
Close the database immediately.
Shutdown immediate is executed in SVRMGRL, the database is not immediately closed,
Instead of shutting down (terminating the session, releasing the session resource) after Oracle performs some cleanup work,
When you cannot close a database using shutdown, shutdown immediate can complete the operation of the database shutdown.
3,
Close the database directly, the session that is accessing the database will be abruptly terminated,
If a large number of operations in the database are in progress, it will take a long time to restart the database after performing shutdown abort.
Startup Error Problem resolution
Problem Description:
[Oracle@node1 dbs]$ sqlplus/as sysdba
sql*plus:release 11.2.0.1.0 Production on Sun Mar 16:38:03 2013
Ght (c) 1982, 2009, Oracle. All rights reserved.
Connected to a idle instance
sql> startup Nomount
Ora-00845:memory_target not supported on this system
When starting the database, the newspaper Memory_target does not support, the Internet search for a while, the specific reason is that the Linux system's shared memory than the SGA configuration small. The/DEV/SHM is defined according to the TMPFS configuration.
[Root@node1 ~]# df-h/dev/shm
filesystem Size Used avail use% mounted on
tmpfs 1000M 0 1000M 0% /DEV/SHM
sql> Show parameter Memory_target
NAME TYPE VALUE
----------------------------- ------------------------------------------------
memory_target big integer 1G
Check the configuration of the Tmpfs, only 1000M, and the SGA configured 1G (conversion system 1024M), not big enough. The solution is to change the small SGA or change the large tmpfs (the SGA 1G is already small, not recommended in the small).
Workaround 1, modify TMPFS (Modify/etc/fstab configuration):
[Root@node1 ~]# vim/etc/fstab
# tmpfs /dev/shm tmpfs defaults 0 0
tmpfs /dev/ SHM tmpfs defaults,size=2048m 0 0
[root@node1 ~]# umount/dev/shm
[Root@node1 ~]# Mount/dev/shm
[root@node1 ~]# df-h/dev/shm
filesystem Size Used avail use%
mounted on Tmpfs 2.0G 0 2.0G 0%/dev/shm
Workaround 2, modify the SGA:
Sql> Show parameter SGA NAME TYPE VALUE--------------------------------------------------------- --------------------Lock_sga Boolean False Pre_page_sga Boolean false sga_max_size
Big integer 1G sga_target the big integer 0 sql> alter system set sga_max_size=768m Scope=spfile;
System altered.
sql> shutdown immediate ora-01507:database not mounted ORACLE instance shut down.
Sql> Startup Nomount ORACLE instance started. Total System Global area 801701888 bytes Fixed Size 2217632 bytes Variable Size 348129632 bytes Database Buf 444596224 bytes Redo buffers 6758400 bytes sql> show parameter SGA NAME TYPE VALUE-fers ----------------------------------------------------------------------------Lock_sga boolean FALSE pre_
PAGE_SGA boolean FALSE sga_max_size big integer 768M sga_target Big integer 0
It is recommended to modify Memory_target directly to allow Oracle to manage the size of the SGA itself (MEMORY_TARGET=SGA+PGA)
Sql> Show parameter Memory_target
NAME TYPE VALUE
-------------------------------------------- ---------------------------------
memory_target big integer 1G
sql> alter system set memory_target= 768M Scope=spfile;
System altered.
sql> shutdown immediate
ora-01507:database not mounted
ORACLE instance shut down.
sql> startup Nomount;
ORACLE instance started.
Total System Global area 801701888 bytes
Fixed Size 2217632 bytes
Variable Size 469764448 bytes
Database buffers 322961408 bytes
Redo buffers
6758400 bytes sql> sql> Sql> Show parameter Memory_target
NAME TYPE VALUE
---------------------------------------- -------------------------------------
memory_target big integer 768M
Extended:
Note here, Memory_target can not be less than the SGA or PGA, or startup database will be the error, the database can not start.
sql> startup Nomount
Ora-00844:parameter not taking Memory_target to account
ora-00851:sga_max_size 1073741824 cannot is set to the more than Memory_target 805306368.
Solution:
[Oracle@node1 dbs]$ sqlplus/as sysdba
sql*plus:release 11.2.0.1.0 Production on Sun Mar 17:14:38 2013
Ght (c) 1982, 2009, Oracle. All rights reserved.
Connected to a idle instance.
Sql> create Pfile from SPFile;
File created.
Sql> exit
modifying Init.ora file Parameters
[Oracle@node1 dbs]$ vim Initoranode1.ora
oranode1.__db_cache_size=444596224
oranode1.__large_pool_size= 4194304
oranode1.__oracle_base= '/u01/app/oracle ' #ORACLE_BASE set from environment
*.audit_file_dest= '/u01 /app/oracle/admin/oranode1/adump '
*.audit_trail= ' db '
*.compatible= ' 11.2.0 '
*.control_files= '/u01/ Oradata/ora_control1 ', '/u01/fast_recovery_area/ora_control
2 '
*.db_block_size=8192
*.db_domain= ' Node1.example.com '
*.db_name= ' oranode1 '
*.db_recovery_file_dest= '/u01/fast_recovery_area '
*.db_ recovery_file_dest_size=2g
*.diagnostic_dest= '/u01/app/oracle '
*.dispatchers= ' (protocol=tcp) (SERVICE =ORCLXDB) '
*.memory_target=805306368
*.open_cursors=300
*.processes=150
*.remote_login_ Passwordfile= ' EXCLUSIVE '
*.sga_max_size=805306368
*.undo_tablespace= ' UNDOTBS1 '
Regenerate SPFile
[Oracle@node1 dbs]$ sqlplus/as sysdba
sql*plus:release 11.2.0.1.0 Production on Sun Mar 17:15:28 2013
Ght (c) 1982, 2009, Oracle. All rights reserved.
Connected to a idle instance.
Sql> create SPFile from Pfile;
File created.
sql> startup Nomount;
ORACLE instance started.
Total System Global area 801701888 bytes
Fixed Size 2217632 bytes
Variable Size 469764448 bytes
Database buffers 322961408 bytes
Redo buffers
6758400 bytes sql> sql> Sql> Show parameter Memory_target
NAME TYPE VALUE
---------------------------------------- -------------------------------------
memory_target big integer 768M