本文简单介绍通过Oracle数据库的create database命令创建一个符合OFA规范的Oracle数据库。
本文简单介绍通过Oracle数据库的create database命令创建一个符合OFA规范的Oracle数据库。
1 设置环境变量(vi .bash_profile或者是保存为一个可执行文件执行创建)
ORACLE_BASE=/u01/app
ORACLE_HOME=$ORACLE_HOME/oracle
ORACLE_SID=hsj
PATH=$ORACLE_HOME/bin:$PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
DISPLAY==192.168.138.1:0.0
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH LD_LIBRARY_PATH DISPLAY
2 创建某些目录(存放日志目录,,存放数据文件目录,存放控制文件目录,归档目录)
mkdir -p /u01/app/flash_recovery_area/hsj
mkdir -p /u01/app/diag/rdbms/hsj #用来存放alert trace 跟踪日志
mkdir -p /u01/app/oradata/hsj/archive # 用来存放归档日志,上一级目录用来存放控制文件和数据文件、联机日志文件
mkdir -p /u01/app/admin/hsj/adump
mkdir -p /u01/app/admin/hsj/dpdump
mkdir -p /u01/app/admin/hsj/pfile
mkdir -p /u01/app/admin/hsj/scripts
3 创建参数文件 inithsj.ora,并且通过inithsj.ora 创建spfile,spfile文件必须存放$ORACLE_HOME/dbs/目录下面
mkdir
inithsj.ora 文件类容(某些参数需要根据实际环境进行修改)
v inithsj.ora
hsj.__db_cache_size=327155712
hsj.__java_pool_size=4194304
hsj.__large_pool_size=4194304
hsj.__oracle_base='/u01/app'#ORACLE_BASE set from environment
hsj.__pga_aggregate_target=331350016
hsj.__sga_target=490733568
hsj.__shared_io_pool_size=0
hsj.__shared_pool_size=146800640
hsj.__streams_pool_size=0
audit_file_dest='/u01/app/admin/hsj/adump'
audit_trail='db'
compatible='11.2.0.0.0'
control_files='/u01/app/oradata/hsj/control01.ctl','/u01/app/flash_recovery_area/hsj/control02.ctl'
db_block_size=8192
db_domain=''
db_name='hsj'
db_recovery_file_dest='/u01/app/flash_recovery_area'
db_recovery_file_dest_size=4039114752
diagnostic_dest='/u01/app'
dispatchers='(PROTOCOL=TCP) (SERVICE=hsjXDB)'
log_archive_format='%t_%s_%r.dbf'
memory_target=818937856
nls_language='AMERICAN'
open_cursors=300
remote_login_passwordfile='EXCLUSIVE'
undo_tablespace='UNDOTBS1'
sqlplus / as sysdba
create spfile from pfile #需要确保是在dbs目录下,否则需要指定具体的pfile文件路径和名称
4 启动数据库到nomount状态
Startup nomount;
5 创建数据库脚本 createdb.sql
spool createdb.log
create database hsj
user sys identified by root
user system identified by root
logfile group 1
('/u01/app/oradata/hsj/redo01.log') size 50M blocksize 512,
group 2
('/u01/app/oradata/hsj/redo02.log') size 50M blocksize 512,
group 3
('/u01/app/oradata/hsj/redo03.log') size 50M blocksize 512
maxlogfiles 30
maxlogmembers 5
maxloghistory 1
maxdatafiles 100
character set al32utf8
national character set al16utf16
extent management local
datafile '/u01/app/oradata/hsj/system01.dbf' size 300M reuse
sysaux datafile '/u01/app/oradata/hsj/sysaux01.dbf' size 300M reuse
default tablespace users
datafile '/u01/app/oradata/hsj/users01.dbf' size 300M reuse
autoextend on maxsize unlimited
default temporary tablespace tempts1
tempfile '/u01/app/oradata/hsj/temp01.dbf' size 20M reuse
undo tablespace UNDOTBS1
datafile '/u01/app/oradata/hsj/undotbs01.dbf'
size 200M reuse autoextend on maxsize unlimited;
spool off
6 进入到sqlplus执行创建数据库的脚本
@createdb.sql
7 如果有报错,请查看createdb.log alert日志 和trace日志
8 进入到 $ORACLE_HOME/rdbms/admin目录,执行创建数据字典的sql和创建系统包的sql
@catalog.sql
@catproc.sql
--------------------------------------分割线 --------------------------------------
Oracle 11g 在RedHat Linux 5.8_x64平台的安装手册
Linux-6-64下安装Oracle 12C笔记
在CentOS 6.4下安装Oracle 11gR2(x64)
Oracle 11gR2 在VMWare虚拟机中安装步骤
Debian 下 安装 Oracle 11g XE R2
本文永久更新链接地址:

MySQLviewshavelimitations:1)Theydon'tsupportallSQLoperations,restrictingdatamanipulationthroughviewswithjoinsorsubqueries.2)Theycanimpactperformance,especiallywithcomplexqueriesorlargedatasets.3)Viewsdon'tstoredata,potentiallyleadingtooutdatedinforma

ProperusermanagementinMySQLiscrucialforenhancingsecurityandensuringefficientdatabaseoperation.1)UseCREATEUSERtoaddusers,specifyingconnectionsourcewith@'localhost'or@'%'.2)GrantspecificprivilegeswithGRANT,usingleastprivilegeprincipletominimizerisks.3)

MySQLdoesn'timposeahardlimitontriggers,butpracticalfactorsdeterminetheireffectiveuse:1)Serverconfigurationimpactstriggermanagement;2)Complextriggersincreasesystemload;3)Largertablesslowtriggerperformance;4)Highconcurrencycancausetriggercontention;5)M

Yes,it'ssafetostoreBLOBdatainMySQL,butconsiderthesefactors:1)StorageSpace:BLOBscanconsumesignificantspace,potentiallyincreasingcostsandslowingperformance.2)Performance:LargerrowsizesduetoBLOBsmayslowdownqueries.3)BackupandRecovery:Theseprocessescanbe

Adding MySQL users through the PHP web interface can use MySQLi extensions. The steps are as follows: 1. Connect to the MySQL database and use the MySQLi extension. 2. Create a user, use the CREATEUSER statement, and use the PASSWORD() function to encrypt the password. 3. Prevent SQL injection and use the mysqli_real_escape_string() function to process user input. 4. Assign permissions to new users and use the GRANT statement.

MySQL'sBLOBissuitableforstoringbinarydatawithinarelationaldatabase,whileNoSQLoptionslikeMongoDB,Redis,andCassandraofferflexible,scalablesolutionsforunstructureddata.BLOBissimplerbutcanslowdownperformancewithlargedata;NoSQLprovidesbetterscalabilityand

ToaddauserinMySQL,use:CREATEUSER'username'@'host'IDENTIFIEDBY'password';Here'showtodoitsecurely:1)Choosethehostcarefullytocontrolaccess.2)SetresourcelimitswithoptionslikeMAX_QUERIES_PER_HOUR.3)Usestrong,uniquepasswords.4)EnforceSSL/TLSconnectionswith

ToavoidcommonmistakeswithstringdatatypesinMySQL,understandstringtypenuances,choosetherighttype,andmanageencodingandcollationsettingseffectively.1)UseCHARforfixed-lengthstrings,VARCHARforvariable-length,andTEXT/BLOBforlargerdata.2)Setcorrectcharacters


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

SublimeText3 Chinese version
Chinese version, very easy to use

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

Atom editor mac version download
The most popular open source editor
