Create a database for Oracle10g manually in Linux

Source: Internet
Author: User
Install Oracle10g in Linux and create a database. After installation, create it manually. Step 1: create a directory: oracleora_dataxldb2: Create

Install Oracle 10 Gb in Linux and create a database. After installation, create it manually. Step 1: create a directory:/oracle/ora_data/xldb 2: create a directory

Install Oracle 10 Gb in Linux and create a database. After installation, create it manually. Follow these steps to create a database manually:

1: create a directory:/oracle/ora_data/xldb

2: Create a parameter file:/oracle/product/10.2.0/db_1/dbs/initXLDB. ora
$ Cp init. ora initXLDB. ora
Where initXLDB. ora is modified:
Db_name = XLDB
Control_files = ("$ ORACLE_HOME/dbs/XLDB_ctl01.ctl", "$ ORACLE_HOME/dbs/XLDB_ctl02.ctl ")
3: Create a password file: orapwd file = $ ORACLE_HOME/dbs/orapwXLDB password = oracle

4: Create a database creation Script:/oracle/ora_data/XLDB/createXLDB. SQL
Create database XLDB
Datafile '/oracle/ora_data/XLDB/system01.dbf' size 300 m
Sysaux datafile '/oracle/ora_data/XLDB/sysaux01.dbf' size: 120 m
Undo tablespace undotbs1 datafile '/oracle/ora_data/XLDB/undotbs01.dbf' size 100 m autoextend on next 5 M maxsize unlimited
Default temporary tablespace temp tempfile '/oracle/ora_data/XLDB/temp01.dbf' size 50 m autoextend on next 5 M maxsize unlimited
Logfile group 1 ('/oracle/ora_data/XLDB/redo01.log') size 50 m,
Group 2 ('/oracle/ora_data/XLDB/redo02.log') size 50 m,
Group 3 ('/oracle/ora_data/XLDB/redo03.log') size 50 m
Maxlogfiles 5
Character set ZHS16GBK
National character set AL16UTF16;

5: Execute createXLDB. SQL
$ Export ORACLE_SID = XLDB (set when oracle is installed)
$ Sqlplus/as sysdba
SQL> startup nomount
ORA-00371: not enough shared pool memory, shocould be atleast 62198988 bytes
Modify the shared_pool_size of initXLDB. ora to 75000000
SQL> shutdown immediate
SQL> startup nomount
ORACLE instance started.
Total System Global Area 113246208 bytes
Fixed Size 1217956 bytes
Variable Size 100665948 bytes
Database Buffers 8388608 bytes
Redo Buffers 2973696 bytes
SQL> start/oracle/ora_data/XLDB/createXLDB. SQL
Create database XLDB
*
ERROR at line 1:
ORA-30014: operation only supported in Automatic Undo Management mode
Modify initXLDB. ora to add an undo_management = AUTO
SQL> shutdown immediate
SQL> startup nomount
ORACLE instance started.
Total System Global Area 113246208 bytes
Fixed Size 1217956 bytes
Variable Size 100665948 bytes
Database Buffers 8388608 bytes
Redo Buffers 2973696 bytes
SQL> start createXLDB. SQL
Database created.

6. Run catalog. SQL to create a data dictionary and run catproc. SQL to create a package:
SQL> start $ ORACLE_HOME/rdbms/admin/catalog. SQL
SQL> start $ ORACLE_HOME/rdbms/admin/catproc. SQL
The two steps are smooth, but it takes a dozen minutes.

7. Execute the pupbld. SQL script so that all users can use sqlplus:
SQL> start $ ORACLE_HOME/sqlplus/admin/pupbld. SQL

8: Create a users tablespace,
SQL> create tablespace users
2 datafile '/oracle/ora_data/XLDB/users01.dbf' size 50 m
3/
Tablespace created.
SQL> alter database default tablespace users;
Database altered.

9: run the utlsampl. SQL script to create the scolt test mode:
SQL> start $ ORACLE_HOME/rdbms/admin/utlsampl. SQL
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-Production
With the Partitioning, OLAP and Data Mining options
Test $ sqlplus scott/tiger
SQL> select count (*) from dept;
COUNT (*)
----------
4

10: the database has been created.

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.