Manually create an Oracle database instance

Source: Internet
Author: User

1. First set Oracle_SID = manual
2. Create a password file
Go to the/u01/app/oracle/product/10.2.0/db_1/dbs directory and run the command to create the Database Password File.
[Oracle @ myorcl dbs] $ orapwd file = orapmanual password = oracle
3. create the required directory structure
[Oracle @ myorcl dbs] $ cd/u01/app/oracle/admin/
[Oracle @ myorcl admin] $ mkdir manual
Then go to the manual directory and create a file.
[Oracle @ myorcl manual] $ ls
Adumpbdumpcdumppfileudump
4. create the required parameter file
[Oracle @ myorcl ~] $ Cd/u01/app/oracle/admin/manual/pfile/
[Oracle @ myorcl pfile] $ vi init. ora
Db_name = manual
Db_domain = ""
Sga_target = 285212672
Pga_aggregate_target = 94371840
DB _ block_size = 8192
Db_file_multiblock_read_count = 16
Open_cursors = 300
Processes = 150
Background_dump_dest =/u01/app/oracle/admin/manual/bdump
Core_dump_dest =/u01/app/oracle/admin/manual/cdump
User_dump_dest =/u01/app/oracle/admin/manual/udump
Audit_file_dest =/u01/app/oracle/admin/manual/adump
Control_files = ("/u01/app/oracle/oradata/manual/control01.ctl",/u01/app/oracle/oradata/manual/control02.ctl)
Db_recovery_file_dest =/u01/app/oracle/flash_recovery_area/manual/
Db_recovery_file_dest_size = 2147483648
Log_archive_format = % t _ % s _ % r. dbf
Compatible = 10.2.0.1.0
Remote_login_passwordfile = EXCLUSIVE
Undo_management = AUTO
Undo_tablespace = UNDOTBS1
5. Use the created parameter file to start the database instance to the nomount status.
SQL> startup nomount pfile =/u01/app/oracle/admin/manual/pfile/init. ora
ORACLE instance started.
Total System Global Area285212672 bytes
Fixed Size1218992 bytes
Variable Size92276304 bytes
Database Buffers188743680 bytes
Redo buffers2974256 bytes
6. Execute SQL statements to create a database.
SQL> create database manual
2 datafile '/u01/app/oracle/oradata/manual/system01.dbf' size 300 m reuse
3 autoextend on next 10240 K maxsize unlimited
4 extent management local
5 sysaux datafile '/u01/app/oracle/oradata/manual/sysaux01.dbf' size 120 m reuse
6 autoextend on next 1024 k maxsize unlimited
7 smallfile default temporary tablespace
8 temp tempfile '/u01/app/oracle/oradata/manual/temp01.dbf' size 20 m reuse
9 autoextend on next 640 k maxsize unlimited
Smallfile undo tablespace "UNDOTBS1" datafile '/u01/app/oracle/oradata/manual/undotbs01.dbf' size 200 m reuse autoextend on next 5120 k maxsize unlimited
11 character set ZHS16GBK
12 national character set AL16UTF16
13 logfile group 1 ('/u01/app/oracle/oradata/manual/redo01.log') size 51200 k,
14 group 2 ('/u01/app/oracle/oradata/manual/redo02.log') size 51200 k,
15 group 3 ('/u01/app/oracle/oradata/manual/redo03.log') size 51200 k
16 user sys identified by oracle
17 user system identified by oracle;
Database created.
7. Create the user's default tablespace users
SQL> create smallfile tablespace users logging datafile '/u01/app/oracle/oradata/manual/user01.dbf 'size 5 M reuse autoextend on next 1280 K maxsize unlimited extent management local segment space management auto;
8. Specify the user's default tablespace as users.
SQL> alter database default tablespace users;
9. Install the data dictionary
SQL> @/u01/app/oracle/product/10.2.0/db_1/rdbms/admin/catalog. SQL
SQL> @/u01/app/oracle/product/10.2.0/db_1/rdbms/admin/catproc. SQL
10. Create a PL/SQL resource set as a system user
SQL> connect system/oracle
Connected.
SQL> @/u01/app/oracle/product/10.2.0/db_1/sqlplus/admin/pupbld. SQL
SQL> @/u01/app/oracle/product/10.2.0/db_1/sqlplus/admin/help/hlpbld. SQL helpus. SQL
A simplified version of the database is created
SQL> select status from v $ instance;
STATUS
------------------------------------
OPEN
[Oracle @ myorcl ~] $ Lsnrctl status
LSNRCTL for Linux: Version 10.2.0.1.0-Production on 05-JUL-2013 00:30:43
Copyright (c) 1991,200 5, Oracle. All rights reserved.
Connecting to (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1 )))
STATUS of the LISTENER
------------------------
AliasLISTENER
VersionTNSLSNR for Linux: Version 10.2.0.1.0-Production
Start Date04-JUL-2013 19:58:59
Uptime0 days 4 hr. 31 min. 44 sec
Trace Leveloff
SecurityON: Local OS Authentication
SNMPOFF
Listener Parameter File/u01/app/oracle/product/10.2.0/db_1/network/admin/listener. ora
Listener Log File/u01/app/oracle/product/10.2.0/db_1/network/log/listener. log
Listening Endpoints Summary...
(DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (KEY = EXTPROC1 )))
(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = myorcl.oracle.com) (PORT = 1521 )))
Services Summary...
Service "PLSExtProc" has 1 instance (s ).
Instance "PLSExtProc", status UNKNOWN, has 1 handler (s) for this service...
Service "manual" has 1 instance (s ).
Instance "manualorcl", status READY, has 1 handler (s) for this service...
Service "manual_XPT" has 1 instance (s ).
Instance "manualorcl", status READY, has 1 handler (s) for this service...
Service "orcl" has 1 instance (s ).
Instance "orcl", status READY, has 1 handler (s) for this service...
Service "orclXDB" has 1 instance (s ).
Instance "orcl", status READY, has 1 handler (s) for this service...
Service "orcl_XPT" has 1 instance (s ).
Instance "orcl", status READY, has 1 handler (s) for this service...
The command completed successfully

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.