Manually Creating an Oracle Database

简介:  Manually Creating an Oracle Database 一、Set environment variablesexport ORACLE_SID=WOO 一、Create corresponding direct...


Manually Creating an Oracle Database

一、Set environment variables

export ORACLE_SID=WOO


一、Create corresponding directory

mkdir -p $ORACLE_BASE/{{admin/WOO/{a,b,c,u}dump},oradata/WOO}


二、Create simplest parameter file

cd $ORACLE_HOME/dbs
cat init.ora | grep -v ^# | grep -v ^$ > initWOO.ora



三、The first time start database

sqlplus / as sysdba

SQL> startup nomount;
ORA-00371: not enough shared pool memory, should be atleast 62198988 bytes


The wrong solution:
change init.ora file values >=62198988 
shared_pool_size = 62198988




四、create spfile,and change other others parameters;

SQL> create spfile from pfile='?/dbs/initWOO.ora';

File created.


五、reboot database,and change other parameters;

SQL> startup force nomount; 
ORACLE instance started.

Total System Global Area   96468992 bytes
Fixed Size                  1217884 bytes
Variable Size              88083108 bytes
Database Buffers            4194304 bytes
Redo Buffers                2973696 bytes

alter system set background_dump_dest="/DBSoft/admin/Woo/bdump";
alter system set core_dump_dest="/DBSoft/admin/Woo/cdump";
alter system set user_dump_dest="/DBSoft/admin/Woo/udump";
alter system set db_create_file_dest ="/DBSoft/oradata/WOO";
alter system set db_create_online_log_dest_1 ="/DBSoft/oradata/WOO";
alter system set undo_management=auto scope=spfile;
alter system set undo_tablespace=undotbs1 scope=spfile;
alter system set job_queue_processes=5;


六、Restart the database again,Began to create the database

SQL> CREATE DATABASE WOO
USER SYS IDENTIFIED BY oracle
USER SYSTEM IDENTIFIED BY oracle
LOGFILE GROUP 1 ('/DBSoft/oradata/WOO/redo01.log') SIZE 100M,
GROUP 2 ('/DBSoft/oradata/WOO/redo02.log') SIZE 100M,
GROUP 3 ('/DBSoft/oradata/WOO/redo03.log') SIZE 100M
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXLOGHISTORY 1
MAXDATAFILES 100
MAXINSTANCES 1
CHARACTER SET US7ASCII
NATIONAL CHARACTER SET AL16UTF16
DATAFILE '/DBSoft/oradata/WOO/system01.dbf' SIZE 325M REUSE
EXTENT MANAGEMENT LOCAL
SYSAUX DATAFILE '/DBSoft/oradata/WOO/sysaux01.dbf' SIZE 325M REUSE
DEFAULT TABLESPACE tbs_1
DEFAULT TEMPORARY TABLESPACE tempts1
TEMPFILE '/DBSoft/oradata/WOO/temp01.dbf'
SIZE 20M REUSE
UNDO TABLESPACE UNDOTBS1
DATAFILE '/DBSoft/oradata/WOO/undotbs01.dbf'
SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;

Database created.

SQL> select instance_name,status from v$instance

INSTANCE_NAME                                    STATU
------------------------------------------------ -----
WOO                                              OPEN

SQL> select name,CREATED,LOG_MODE,OPEN_MODE,PROTECTION_MODE from v$database

NAME     CREATED            LOG_MODE             OPEN_MODE    PROTECTION_MODE
-------- ------------------ -------------------- ------------ --------------------
WOO      29-DEC-13          NOARCHIVELOG         READ WRITE   MAXIMUM PERFORMANCE

七、Run Scripts to Build Data Dictionary Views

@?/rdbms/admin/catalog.sql
@?/rdbms/admin/catproc.sql


八、create password file

[oracle@woo dbs]$ orapwd file=$ORACLE_HOME/dbs/orapwWOO password=oracle entries=5;

九、create em

[oracle@woo dbs]$ emca -config dbcontrol db -repos create

STARTED EMCA at Dec 29, 2013 8:00:17 AM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Enter the following information:
Database SID: WOO
Listener port number: 1521
Password for SYS user: 
Password for DBSNMP user: 
Password for SYSMAN user: 
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
-----------------------------------------------------------------

You have specified the following settings

Database ORACLE_HOME ................ /DBSoft/Product/10.2.0/db_1

Database hostname ................ woo
Listener port number ................ 1521
Database SID ................ WOO
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............

-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Dec 29, 2013 8:01:09 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /DBSoft/Product/10.2.0/db_1/cfgtoollogs/emca/WOO/emca_2013-12-29_08-00-17-AM.log.
Dec 29, 2013 8:01:12 AM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Dec 29, 2013 8:04:04 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Dec 29, 2013 8:04:12 AM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Dec 29, 2013 8:05:50 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Dec 29, 2013 8:05:50 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is http://woo:5500/em <<<<<<<<<<<
Enterprise Manager configuration completed successfully
FINISHED EMCA at Dec 29, 2013 8:05:50 AM


九、Create listener

WOO =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = woo)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = WOO)
    )
  )






目录
相关文章
|
6月前
|
SQL Oracle 关系型数据库
WARNING: Too Many Parse Errors With error=911 When Running a JDBC Application Connected to an Oracle 19c database
WARNING: Too Many Parse Errors With error=911 When Running a JDBC Application Connected to an Oracle 19c database (
91 2
|
6月前
|
Oracle 关系型数据库
19c 开启Oracle Database Vault
19c 开启Oracle Database Vault
162 1
|
6月前
|
SQL Oracle 关系型数据库
Connect to Autonomous Database Using Oracle Database Tools
Connect to Autonomous Database Using Oracle Database Tools
61 1
|
5月前
|
Oracle 关系型数据库 Linux
Requirements for Installing Oracle Database/Client 19c on OL8 or RHEL8 64-bit (x86-64) (Doc ID 2668780.1)
Requirements for Installing Oracle Database/Client 19c on OL8 or RHEL8 64-bit (x86-64) (Doc ID 2668780.1)
47 0
|
6月前
|
人工智能 Oracle 关系型数据库
一篇文章弄懂Oracle和PostgreSQL的Database Link
一篇文章弄懂Oracle和PostgreSQL的Database Link
|
6月前
|
SQL Oracle 安全
Oracle Database Vault Access Control Components
Oracle Database Vault Access Control Components
54 0
|
6月前
|
Oracle 安全 关系型数据库
What Is Oracle Database Vault?
The Oracle Database Vault security controls protect application data from unauthorized access, and helps you to comply with privacy and regulatory requirements. You can deploy controls to block privileged account access to application data and control sensitive operations inside the database using
41 0
|
6月前
|
Oracle 关系型数据库 Linux
服务器Centos7 静默安装Oracle Database 12.2
服务器Centos7 静默安装Oracle Database 12.2
267 0
|
6月前
|
Oracle 关系型数据库 数据库
windows Oracle Database 19c 卸载教程
打开任务管理器 ctrl+Shift+Esc可以快速打开任务管理器,找到oracle所有服务然后停止。 停止数据库服务 在开始卸载之前,确保数据库服务已经停止。你可以使用以下命令停止数据库服务: net stop OracleServiceORCL Universal Installer 卸载Oracle数据库程序 一般情况运行Oracle自带的卸载程序,如使用Universal Installer 工具卸载。 点击开始菜单找到Oracle,然后点击Oracle安装产品,再点击Universal Installer。 点击之后稍等一会然后会进入进入下图界面,点击卸载产品。 选中要删除的Orac
643 1
|
存储 Oracle 关系型数据库
windows 使用 Oracle Database 19c
Oracle数据库是由美国Oracle Corporation(甲骨文公司)开发和提供的一种关系型数据库管理系统,它是一种强大的关系型数据库管理系统(RDBMS)。它使用表格(表)组织和存储数据,通过SQL语言进行数据管理。数据以表格形式存储,表之间可以建立关系。支持事务处理、多版本并发控制、安全性和权限控制。具有高可用性、容错性,支持分布式数据库和可扩展性。Oracle Corporation提供全面的支持和服务,使其成为企业级应用的首选数据库系统。
126 0