Oracle11.2 the process of manually creating a database using the command line

Source: Internet
Author: User

Environment: RHEL 5.4x86, oracle 11.2
1. Set Environment Variables
Edit in/home/oracle
#. Bash_profile
# Get the aliases and functions
If [-f ~ /. Bashrc]; then
.~ /. Bashrc
Fi
# User specific environment and startup programs
#11g R2
Export ORACLE_HOME =/app/oracle/product/11.2.0/dbhome_1
Export PATH = $ PATH: $ HOME/bin: $ ORACLE_HOME/bin
Export LD_LIBRARY_PATH = $ ORACLE_HOME/lib
Export NLS_LANG = AMERICAN_AMERICA.UTF8
Export ORACLE_SID = orcl
Umask 022

2. Disable SELinux
If SELinux is enabled when RHEL is installed
Use the root user setenforce 0
Otherwise, the following error occurs: sqlplus: error while loading shared libraries.

3. Log On As an oracle user and edit init. ora.
Only 1 line
Db_name = orcl

4. log on to sqlplus/as sysdba
Create spfile = 'spfileorcl. ora 'from pfile ='/home/oracle/init. ora'
Startup nomount
Create database orcl;
Wait until the database is created successfully.
Select sysdate from dual;
You can check the date.

5. execute scripts to create system views and packages
@? /Rdbms/admin/catalog
@? /Rdbms/admin/catproc
Run as a system user
@? /Sqlplus/admin/pupbld
You can see v $ datafile and v $ controlfile
Located in $ ORACLE_HOME/dbs, with the file names dbs1orcl dbx1orcl dbu1orcl cntrlorcl
Several questions:
1. In this document, at least three pfile parameters are required, and all others have default values. I only wrote one parameter.
2. The tablespace used to create the database is only system sysaux sys_undots. There is no temporary tablespace and the database does not run incorrectly.
I wonder if this is a new feature of oracle 11.2?
3. I wrote the following statement in A. SQL file, but it was not executed successfully.
Create database orcl
User sys identified by sys
User system identified by sys
Extent management local
Default temporary tablespace temp
Undo tablespace undotbs1
Default tablespace users;
4. The document does not indicate that the system user needs to execute pupbld. I use the sys user to execute
The error accessing PRODUCT_USER_PROFILE is displayed when the user oo is logged on.

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.