Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ Manually create Oracle Database Explanations     - Unix system security configuration (Linux)

- Ubuntu 14.10 / 14.04 / 12.04 installation GNOME Pie 0.5.6 (Linux)

- How to use GRUB2 files directly from the hard disk to run ISO (Linux)

- Using Java arrays implement sequential stack (Programming)

- Ubuntu iptables prevent IP attacks (Linux)

- Use SecureCRT to transfer files between local and remote hosts (Linux)

- Installation under Linux to deploy Java (Linux)

- Ubuntu buffalo wzr-hp-300nh brush DD-WRT router system (Linux)

- Ubuntu 12.04 install RTL8723BE wireless network card driver (Programming)

- How to download GOG games in Linux command line (Linux)

- To help you easily protect the Linux System (Linux)

- Ubuntu 14.04 Enable root and disable the guest (Linux)

- The simple multi-threaded Python (Programming)

- How to Install Linux kernel 4.0 on Ubuntu / CentOS (Linux)

- Why is better than Git SVN (Linux)

- OpenNMS separate database (Server)

- Standard and IO redirection (Linux)

- CentOS 7 Test Marathon start Docker container (Server)

- Magical Virtualbox under Ubuntu (Linux)

- Linux start the process (Linux)

 
         
  Manually create Oracle Database Explanations
     
  Add Date : 2018-11-21      
         
         
         
  Read the navigation
Database version:
1. Set up environment variables and create directories
2. Create an initialization parameter file
3. Start the instance to the nomount state to create the database
4. Run the script to create the dictionary, view, package, role, permissions, synonyms
5. Check the database-related information
6. Enable the archive log

Database version:

SQL> select * from v $ version;
BANNER
-------------------------------------------------- ------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL / SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production

1. Set up environment variables and create directories

$ Export ORACLE_HOME = / u01 / app / product / 11.2.0 / db_1
$ Export ORACLE_SID = mandb
$ Mkdir -p / disk2 / oradata / mandb / datafile
$ Mkdir -p / disk2 / oradata / mandb / logfile

2. Create an initialization parameter file

$ Vim /disk2/oradata/mandb/datafile/mandb.ora
Db_name = 'mandb' #database name
Instance_name = 'mandb'
Control_files = '/ disk2 / oradata / mandb / datafile / mandb_control01.ctl'
Memory_target = 500m
Db_block_size = 32768
Db_create_file_dest = '/ disk2 / oradata / mandb / datafile'

Db_block_size specifies the default database block size to be created. If not specified, the default is 8192. Note:
Db_create_file_dest When a data file path is not specified, the data file is created by default

3. Start the instance to the nomount state to create the database

$ Sqlplus / as sysdba
SQL> create spfile from pfile = '/ disk2 / oradata / mandb / datafile / mandb.ora';
SQL> startup nomount
SQL> create database mandb
  2 user sys identified by oracle
  3 user system identified by oracle
  4 logfile group 1 '/disk2/oradata/mandb/logfile/redo01.log' size 50m blocksize 512,
  5 group 2 '/disk2/oradata/mandb/logfile/redo02.log' size 50m blocksize 512,
  6 group 3 '/disk2/oradata/mandb/logfile/redo03.log' size 50m blocksize 512
  7 maxlogfiles 10
  8 maxlogmembers 5
  9 maxloghistory 5
 10 maxdatafiles 200
 11 character set al32UTF8
 12 National character set al16UTF16
 13 extent management local
 14 datafile '/disk2/oradata/mandb/datafile/system01.dbf' size 500m reuse
 15 sysaux
 16 datafile '/disk2/oradata/mandb/datafile/sysaux01.dbf' size 500m reuse
 17 default tablespace users
 18 datafile '/disk2/oradata/mandb/datafile/user01.dbf' size 100m reuse
 19 default temporary tablespace tempfile
 20 tempfile '/disk2/oradata/mandb/datafile/temp01.dbf' size 20m autoextend on
 21 undo tablespace undotbs01
 22 datafile '/disk2/oradata/mandb/datafile/undotbs01.dbf' size 20m autoextend on
 23 maxsize unlimited;

Log file block size: 512bytes, you can set 1024bytes, 4096bytes, control file block size: 16k;
Note: If an error occurs halfway or stops unexpectedly, delete files that are not specified or can not be specified for reuse (eg, control file, tempfile, undofile), and then run:

Rm /disk2/oradata/mandb/datafile/mandb.ora
Rm /disk2/oradata/mandb/datafile/undotbs01.dbf
Rm /disk2/oradata/mandb/datafile/undotbs01.dbf

4. Run the script to create the dictionary, view, package, role, permissions, synonyms

SQL> @? / Rdbms / admin / catalog.sql #### Dictionaries, Views, Public Synonyms, Roles, Permissions
SQL> @? / Rdbms / admin / catproc.sql #### system required pl / sql package

The official documentation also says that the user logged in to the system user to execute the @@ / sqlplus / admin / pupbld.sql script, but was not found on the 11.2.0.1.0 installation. At this point the database is created;

5. Check the database-related information

SQL> column name format a10
SQL> select DBID, name, DB_UNIQUE_NAME, CURRENT_SCN, open_mode from v $ database; - Database information
      DBID NAME DB_UNIQUE_NAME CURRENT_SCN OPEN_MODE
---------- ---------- ------------------------------ ----------- --------------------
3530583721 MANDB 385901 READ WRITE
SQL> column name format a50
SQL> select file #, name, block_size from v $ datafile; - Data file information
    FILE # NAME BLOCK_SIZE
---------- ---------------------------------------- ---------- ----------
        1 /disk2/oradata/mandb/datafile/system01.dbf 32768
        2 /disk2/oradata/mandb/datafile/sysaux01.dbf 32768
        3 /disk2/oradata/mandb/datafile/undotbs01.dbf 32768
        4 /disk2/oradata/mandb/datafile/user01.dbf 32768
SQL> column member format a40
SQL> select * from v $ Logfile; - Log file information
    GROUP # STATUS TYPE MEMBER IS_
---------- ------- ------- -------------------------- -------------- ---
        1 ONLINE /disk2/oradata/mandb/logfile/redo01.log NO
        2 ONLINE /disk2/oradata/mandb/logfile/redo02.log NO
        3 ONLINE /disk2/oradata/mandb/logfile/redo03.log NO
SQL> column name format a60
SQL> select * from v $ controlfile; - Control file information
STATUS NAME IS_ BLOCK_SIZE FILE_SIZE_BLKS
------- ------------------------------------------- ----------------- --- ---------- --------------
        /disk2/oradata/mandb/datafile/mandb_control01.ctl NO 16384 668
SQL> column window_name format a17
SQL> select WINDOW_NAME, WINDOW_NEXT_TIME, WINDOW_ACTIVE, AUTOTASK_STATUS from DBA_AUTOTASK_WINDOW_CLIENTS; - Window information
WINDOW_NAME WINDOW_NEXT_TIME WINDO AUTOTASK
----------------- --------------------------------- ------------------------------------------ ----- --- -----
WEDNESDAY_WINDOW 08-APR-15 10.00.00.000000 PM PRC FALSE ENABLED
FRIDAY_WINDOW 10-APR-15 10.00.00.000000 PM PRC FALSE ENABLED
TUESDAY_WINDOW 07-APR-15 10.00.00.000000 PM PRC FALSE ENABLED
SATURDAY_WINDOW 11-APR-15 06.00.00.000000 AM PRC FALSE ENABLED
SUNDAY_WINDOW 05-APR-15 06.00.00.000000 AM PRC FALSE ENABLED
MONDAY_WINDOW 06-APR-15 10.00.00.000000 PM PRC FALSE ENABLED
THURSDAY_WINDOW 09-APR-15 10.00.00.000000 PM PRC FALSE ENABLED

Check for object errors:

SQL> select COUNT (*) "OBJECTS WITH ERRORS" from obj $ where status = 3;

If there are packages, java code wrong, can be provided by the oracle utlrp.sql re-translation

SQL> @? / Rdbms / admin / utlrp.sql

6. Enable the archive log

$ Sqlplus / as sysdba < < EOF
Alter system checkpoint;
Alter system checkpoint;
Alter system checkpoint;
Shutdown immediate;
Startup mount
Alter database archivelog;
Alter database open;
EOF

- The end
     
         
         
         
  More:      
 
- Java proxy mode (Programming)
- ElasticSearch basic usage and cluster structures (Server)
- Android Delete project useless resource file (Programming)
- 12 Linux Process Management Commands (Linux)
- Android development, may cause a memory leak problem (Programming)
- Using 30 seconds to write a detailed analysis of garbage removal system (Linux)
- Python Multithreaded Programming (Programming)
- Ubuntu 14.04 / 13.10 users how to install Ubuntu Touch core applications (Linux)
- Build a super simple "hardware" firewall router (Linux)
- System Safety: Windows and Linux platforms (Linux)
- ActionContext and ServletActionContext Summary (Programming)
- Installation Elementary OS Freya 20 things to do (Linux)
- Linux distributed message queue RocketMQ deployment and monitoring - Dual Master (Server)
- Intrusion prevention network server security maintenance tips (Linux)
- Detailed installation OpenCV2.3.1 under CentOS 6.5 (Linux)
- Based AutoYaST automated installation of SUSE practice (Linux)
- MySQL flip-flop (Database)
- Linux Proc File System Experiment (Linux)
- In Debian 4.3 compiler under Linux-2.6.28 kernel Summary (Programming)
- DRBD installation configuration, working principle and Recovery (Server)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.