@clisdodo
2019-11-19T17:03:58.000000Z
字数 18117
阅读 1980
OEL7.7
18c
SingleInstance
ASM
AskScuti :搭建类 2-0-2 Oracle 18c 单实例ASM采用UDEV方式静默搭建
0级搭建类
1级搭建类
磁盘 | 容量 | 作用 |
---|---|---|
/dev/sdb | 32.2 GB | Oracle Software |
/dev/sdc | 1073 MB | OCR1 |
/dev/sdd | 1073 MB | OCR2 |
/dev/sde | 1073 MB | OCR3 |
/dev/sdf | 214.7 GB | Data1 |
/dev/sdg | 214.7 GB | Data2 |
/dev/sdh | 107.4 GB | Archived |
/dev/sdi | 536.9 GB | Backup |
最终磁盘分区格式呈现如下
[root@asmsi18c ~]# ls /dev/sd*1 |grep -v sda1
/dev/sdb1
/dev/sdc1
/dev/sdd1
/dev/sde1
/dev/sdf1
/dev/sdg1
/dev/sdh1
/dev/sdi1
格式化分区并创建文件系统(仅 /dev/sdb1),其他分区用于ASM存储
[root@asmsi18c ~]# mkfs.xfs /dev/sdb1
[root@asmsi18c ~]# mkdir /u01
[root@asmsi18c ~]# mount /dev/sdb1 /u01/
[root@asmsi18c ~]# blkid /dev/sdb1
/dev/sdb1: UUID="2efa9121-cc38-4868-93b4-914fa77ff103" TYPE="xfs"
[root@asmsi18c ~]# vim /etc/fstab
/*** 编辑文件,添加以下行
UUID=2efa9121-cc38-4868-93b4-914fa77ff103 /u01 xfs defaults 0 0
***/
[root@asmsi18c ~]# mount -a
[root@asmsi18c ~]# df -Th
主机名及IP
echo "192.168.1.12 asmsi18c" >> /etc/hosts
用户和组
/usr/sbin/groupadd -g 54321 oinstall
/usr/sbin/groupadd -g 54322 dba
/usr/sbin/groupadd -g 54323 oper
/usr/sbin/groupadd -g 54324 asmadmin
/usr/sbin/groupadd -g 54325 asmoper
/usr/sbin/groupadd -g 54326 asmdba
/usr/sbin/useradd -g oinstall -G dba,asmdba,oper oracle
/usr/sbin/useradd -g oinstall -G asmadmin,asmdba,asmoper,oper,dba grid
passwd oracle --> Changing password for user oracle.
passwd grid --> Changing password for user grid.
文件夹及权限
mkdir -p /u01/app/grid
mkdir -p /u01/app/18.0.0/grid
mkdir -p /u01/app/oracle/product/18.0.0/dbhome_1
mkdir -p /u01/app/oraInventory
chown -R oracle:oinstall /u01
chown -R grid:oinstall /u01/app/grid
chown -R grid:oinstall /u01/app/18.0.0
chmod -R 775 /u01/
RPM 包
mv /etc/yum.repos.d/* /tmp/
echo "[local_yum]" >> /etc/yum.repos.d/henry.repo
echo "name = henry_repo" >> /etc/yum.repos.d/henry.repo
echo "baseurl = file:///mnt/" >> /etc/yum.repos.d/henry.repo
echo "enabled = 1" >> /etc/yum.repos.d/henry.repo
echo "gpgcheck = 0" >> /etc/yum.repos.d/henry.repo
mount /dev/cdrom /mnt/
yum -y install autoconf
yum -y install automake
yum -y install binutils
yum -y install binutils-devel
yum -y install bison
yum -y install cpp
yum -y install dos2unix
yum -y install ftp
yum -y install gcc
yum -y install gcc-c++
yum -y install lrzsz
yum -y install python-devel
yum -y install compat-libcap1
yum -y install compat-libstdc++-33
yum -y install compat-libstdc++-33.i686
yum -y install glibc-*
yum -y install glibc-*.i686
yum -y install libXpm-*.i686
yum -y install libXext
yum -y install libXext.i686
yum -y install libXtst
yum -y install libXtst.i686
yum -y install libX11
yum -y install libX11.i686
yum -y install libXau
yum -y install libXau.i686
yum -y install libxcb
yum -y install libxcb.i686
yum -y install libXi
yum -y install libXi.i686
yum -y install libstdc++.i686
yum -y install libstdc++-devel
yum -y install libstdc++-devel.i686
yum -y install libaio
yum -y install libaio.i686
yum -y install libaio-devel
yum -y install libaio-devel.i686
yum -y install ksh
yum -y install libXp
yum -y install libaio-devel
yum -y install numactl
yum -y install numactl-devel
yum -y install make -y
yum -y install sysstat -y
yum -y install unixODBC
yum -y install unixODBC-devel
yum -y install elfutils-libelf-devel
yum -y install redhat-lsb-core
yum -y install unzip
yum -y install libXrender
yum -y install libXrender-devel
yum -y install nfs-utils
yum -y install smartmontools
yum -y install tigervnc
资源限制
vim /etc/security/limits.conf
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
grid soft stack 10240
grid hard stack 32768
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768
内核参数
vim /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
kernel.panic_on_oops = 1
kernel.shmmax = 7730941132
kernel.shmall = 1887436
kernel.shmmni = 4096
sysctl -p
SHELL资源限制
echo "session required pam_limits.so" >> /etc/pam.d/login
防火墙
systemctl status firewalld.service
systemctl stop firewalld.service
systemctl disable firewalld.service
SELINUX
vim /etc/selinux/config
SELINUX=disabled
Oracle环境变量
su - oracle
vim .bash_profile
PS1="[`whoami`@`hostname`:"'$PWD]$'
export PS1
export TMP=/tmp
export TMPDIR=$TMP
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/18.0.0/dbhome_1; export ORACLE_HOME
ORACLE_SID=SIASM18C; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"; export NLS_DATE_FORMAT
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;export NLS_LANG
PATH=.:$PATH:$HOME/bin:$ORACLE_BASE/product/18.0.0/dbhome_1/bin:$ORACLE_HOME/bin; export PATH
THREADS_FLAG=native; export THREADS_FLAG
if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
su - grid
vim .bash_profile
PS1="[`whoami`@`hostname`:"'$PWD]$'
export PS1
umask 022
export TMP=/tmp
export TMPDIR=$TMP
ORACLE_SID=+ASM; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
ORACLE_BASE=/u01/app/grid; export ORACLE_BASE
ORACLE_HOME=/u01/app/18.0.0/grid; export ORACLE_HOME
NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"; export NLS_DATE_FORMAT
PATH=.:$PATH:$HOME/bin:$ORACLE_HOME/bin; export PATH
THREADS_FLAG=native; export THREADS_FLAG
if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
echo "options=-g" > /etc/scsi_id.config
/usr/lib/udev/scsi_id -g -u -d 分区名
确认标识符,最终对应关系如下分区 | SCSI标识符 |
---|---|
/usr/lib/udev/scsi_id -g -u -d /dev/sdc1 | 36000c2976a776add818a93264891b590 |
/usr/lib/udev/scsi_id -g -u -d /dev/sdd1 | 36000c29312aa0a9406f202760c690e9d |
/usr/lib/udev/scsi_id -g -u -d /dev/sde1 | 36000c29e98d5ab3b8fe9cc4bba81f723 |
/usr/lib/udev/scsi_id -g -u -d /dev/sdf1 | 36000c299f75c2fea6123eede18dc7f3b |
/usr/lib/udev/scsi_id -g -u -d /dev/sdg1 | 36000c29de5af3331b80aac9bfc85e7aa |
/usr/lib/udev/scsi_id -g -u -d /dev/sdh1 | 36000c298de4210b35dfe718a1e146866 |
/usr/lib/udev/scsi_id -g -u -d /dev/sdi1 | 36000c29c7f5fa636f0b246b2e98789dd |
vim /etc/udev/rules.d/99-oracle-asmdevices.rules
,按以下格式编辑条目,替换 RESULT
对应的SCSI标识符
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="36000c2976a776add818a93264891b590", SYMLINK+="oracleasm/asm-ocr1", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="36000c29312aa0a9406f202760c690e9d", SYMLINK+="oracleasm/asm-ocr2", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="36000c29e98d5ab3b8fe9cc4bba81f723", SYMLINK+="oracleasm/asm-ocr3", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="36000c299f75c2fea6123eede18dc7f3b", SYMLINK+="oracleasm/asm-data1", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="36000c29de5af3331b80aac9bfc85e7aa", SYMLINK+="oracleasm/asm-data2", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="36000c298de4210b35dfe718a1e146866", SYMLINK+="oracleasm/asm-archived", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="36000c29c7f5fa636f0b246b2e98789dd", SYMLINK+="oracleasm/asm-backup", OWNER="grid", GROUP="asmadmin", MODE="0660"
执行 partprobe 识别
/sbin/partprobe /dev/sdc1
/sbin/partprobe /dev/sdd1
/sbin/partprobe /dev/sde1
/sbin/partprobe /dev/sdf1
/sbin/partprobe /dev/sdg1
/sbin/partprobe /dev/sdh1
/sbin/partprobe /dev/sdi1
重启UDEV服务
udevadm control --reload-rules
查看磁盘
请确保所有链接磁盘均可见,并具有对应的正确权限,否则,在进行下一步之前请解决该问题。
[root@asmsi18c ~]# ls -lathr /dev/oracleasm/*
lrwxrwxrwx 1 root root 7 Nov 11 09:26 /dev/oracleasm/asm-ocr3 -> ../sde1
lrwxrwxrwx 1 root root 7 Nov 11 09:26 /dev/oracleasm/asm-archived -> ../sdh1
lrwxrwxrwx 1 root root 7 Nov 11 09:26 /dev/oracleasm/asm-data2 -> ../sdg1
lrwxrwxrwx 1 root root 7 Nov 11 09:26 /dev/oracleasm/asm-ocr1 -> ../sdc1
lrwxrwxrwx 1 root root 7 Nov 11 09:26 /dev/oracleasm/asm-data1 -> ../sdf1
lrwxrwxrwx 1 root root 7 Nov 11 09:26 /dev/oracleasm/asm-ocr2 -> ../sdd1
lrwxrwxrwx 1 root root 7 Nov 11 09:26 /dev/oracleasm/asm-backup -> ../sdi1
上面链接归 root 用户所有,但是链接所指向的磁盘是拥有正确权限的。
[root@asmsi18c ~]# ls -lathr /dev/sd*1 |grep -v sda1 |grep -v sdb1
brw-rw---- 1 grid asmadmin 8, 65 Nov 11 09:26 /dev/sde1
brw-rw---- 1 grid asmadmin 8, 113 Nov 11 09:26 /dev/sdh1
brw-rw---- 1 grid asmadmin 8, 97 Nov 11 09:26 /dev/sdg1
brw-rw---- 1 grid asmadmin 8, 33 Nov 11 09:26 /dev/sdc1
brw-rw---- 1 grid asmadmin 8, 81 Nov 11 09:26 /dev/sdf1
brw-rw---- 1 grid asmadmin 8, 49 Nov 11 09:26 /dev/sdd1
brw-rw---- 1 grid asmadmin 8, 129 Nov 11 09:26 /dev/sdi1
chown -R oracle:oinstall /soft
chmod -R 775 /soft
su - oracle
cd $ORACLE_HOME (注意oracle用户家目录:/u01/app/oracle/product/18.0.0/dbhome_1)
unzip -q /soft/LINUX.X64_180000_db_home.zip
./runInstaller -ignorePrereq -waitforcompletion -silent \
-responseFile /u01/app/oracle/product/18.0.0/dbhome_1/install/response/db_install.rsp \
oracle.install.option=INSTALL_DB_SWONLY \
UNIX_GROUP_NAME=oinstall \
INVENTORY_LOCATION=/u01/app/oraInventory \
SELECTED_LANGUAGES=en,en_GB \
ORACLE_HOME=/u01/app/oracle/product/18.0.0/dbhome_1 \
ORACLE_BASE=/u01/app/oracle \
oracle.install.db.InstallEdition=EE \
oracle.install.db.OSDBA_GROUP=dba \
oracle.install.db.OSOPER_GROUP=oper \
oracle.install.db.OSBACKUPDBA_GROUP=dba \
oracle.install.db.OSDGDBA_GROUP=dba \
oracle.install.db.OSKMDBA_GROUP=dba \
oracle.install.db.OSRACDBA_GROUP=dba \
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false \
DECLINE_SECURITY_UPDATES=true
su - root
As a root user, execute the following script(s):
1. /u01/app/oraInventory/orainstRoot.sh
2. /u01/app/oracle/product/18.0.0/dbhome_1/root.sh
su - oracle
cd $ORACLE_HOME
lsnrctl stop
netca -silent -responseFile /u01/app/oracle/product/18.0.0/dbhome_1/assistants/netca/netca.rsp
lsnrctl status
lsnrctl start
su - grid
cd $ORACLE_HOME (注意grid用户家目录:/u01/app/18.0.0/grid)
unzip -q /soft/LINUX.X64_180000_grid_home.zip
su - root
cd /u01/app/18.0.0/grid/cv/rpm
chmod +x *
rpm -ivh cvuqdisk-1.0.10-1.rpm
su - grid
cd $ORACLE_HOME
./gridSetup.sh -ignorePrereq -waitforcompletion -silent \
-responseFile /u01/app/18.0.0/grid/install/response/gridsetup.rsp \
oracle.install.option=HA_CONFIG \
INVENTORY_LOCATION=/u01/app/oraInventory \
ORACLE_BASE=/u01/app/grid \
oracle.install.asm.storageOption=ASM \
oracle.install.asm.SYSASMPassword=oracle \
oracle.install.asm.monitorPassword=oracle \
oracle.install.asm.diskGroup.name=ocr \
oracle.install.asm.diskGroup.redundancy=NORMAL \
oracle.install.asm.diskGroup.AUSize=4 \
oracle.install.asm.diskGroup.diskDiscoveryString=/dev/oracleasm/* \
oracle.install.asm.diskGroup.disks=/dev/oracleasm/asm-ocr1,/dev/oracleasm/asm-ocr2,/dev/oracleasm/asm-ocr3 \
oracle.install.asm.OSDBA=asmdba \
oracle.install.asm.OSOPER=asmoper \
oracle.install.asm.OSASM=asmadmin \
oracle.install.crs.config.gpnp.configureGNS=false \
oracle.install.crs.config.useIPMI=false \
oracle.install.asm.upgradeASM=false
# root 执行脚本(等待 root 用户执行完毕,再去执行 grid 脚本)
As a root user, execute the following script(s):
1. /u01/app/18.0.0/grid/root.sh
# grid 执行脚本(Attention! 执行这个脚本前,请先仔细阅读 6.2 小节:脚本补充说明)
As install user, execute the following command to complete the configuration.
/u01/app/18.0.0/grid/gridSetup.sh -executeConfigTools -responseFile /u01/app/18.0.0/grid/install/response/gridsetup.rsp [-silent]
从 Oracle 12cR2 版本开始,在安装 Oracle Grid Infrastructure 或 Oracle Database 软件后,系统会在 Grid 用户或 Oracle 用户对应的家目录中自动创建响应文件用于后期配置,具体可参考官方文档。以下为具体路径示例:
Oracle Grid Infrastructure(grid):$ORACLE_HOME/install/response/grid_2019-11-11_09-25-26PM.rsp
Oracle Database(oracle):$ORACLE_HOME/install/response/db_2019-11-11_09-51-15AM.rsp
在 6.1 小节中 grid 脚本执行方法
# 接 6.1 小节,当 root 脚本执行完毕后
su - grid
cd $ORACLE_HOME/install/response/
# 这里找到自动生成的文件,文件名格式:[product_timestamp.rsp] 例如:grid_2019-11-11_09-25-26PM.rsp
vim grid_2019-11-11_09-25-26PM.rsp
# 编辑该文件,对两个参数设置密码,保存
oracle.install.asm.SYSASMPassword=oracle
oracle.install.asm.monitorPassword=oracle
# grid 执行脚本
su - grid
cd $ORACLE_HOME
./gridSetup.sh -executeConfigTools -responseFile /u01/app/18.0.0/grid/install/response/grid_2019-11-11_09-25-26PM.rsp -silent
[grid@asmsi18c:/u01/app/18.0.0/grid]$crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
ONLINE ONLINE asmsi18c STABLE
ora.OCR.dg
ONLINE ONLINE asmsi18c STABLE
ora.asm
ONLINE ONLINE asmsi18c Started,STABLE
ora.ons
OFFLINE OFFLINE asmsi18c STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 ONLINE ONLINE asmsi18c STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.evmd
1 ONLINE ONLINE asmsi18c STABLE
--------------------------------------------------------------------------------
[grid@asmsi18c:/u01/app/18.0.0/grid]$lsnrctl status
LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 11-NOV-2019 22:43:22
Copyright (c) 1991, 2018, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=asmsi18c)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 18.0.0.0.0 - Production
Start Date 11-NOV-2019 21:36:32
Uptime 0 days 1 hr. 6 min. 49 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/18.0.0/grid/network/admin/listener.ora
Listener Log File /u01/app/grid/diag/tnslsnr/asmsi18c/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=asmsi18c)(PORT=1522)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1522)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM", status READY, has 1 handler(s) for this service...
Service "+ASM_OCR" has 1 instance(s).
Instance "+ASM", status READY, has 1 handler(s) for this service...
The command completed successfully
asmca
# 创建 ASM 磁盘组:DATA (/dev/oracleasm/asm-data1 | /dev/oracleasm/asm-data2)
asmca -silent -createDiskGroup \
-diskGroupName data \
-disk '/dev/oracleasm/asm-data1' \
-disk '/dev/oracleasm/asm-data2' \
-redundancy NORMAL \
-au_size 4 \
-compatible.asm '18.0.0.0.0' \
-compatible.rdbms '18.0.0.0.0' \
-compatible.advm '18.0.0.0.0'
sysasm
登录进行磁盘维护
[grid@asmsi18c:/u01/app/18.0.0/grid]$sqlplus / as sysasm
SQL*Plus: Release 18.0.0.0.0 - Production on Mon Nov 11 23:12:45 2019
Version 18.3.0.0.0
Copyright (c) 1982, 2018, Oracle. All rights reserved.
Connected to:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0
SQL> set linesize 200
SQL> col name for a10
SQL> col failgroup for a10
SQL> col path for a50
SQL> col group_number for 99
SQL> col disk_number for 99
# 查询当前 ASM 磁盘组
SQL> select group_number,name,type,total_mb,free_mb,usable_file_mb from v$asm_diskgroup;
GROUP_NUMBER NAME TYPE TOTAL_MB FREE_MB USABLE_FILE_MB
------------ ---------- ------ ---------- ---------- --------------
1 OCR NORMAL 3060 2716 848
2 DATA NORMAL 409592 409392 204696
# 查询当前 ASM 磁盘
SQL> select group_number,disk_number,mount_status,name,failgroup,create_date,path from v$asm_disk order by 1,2;
GROUP_NUMBER DISK_NUMBER MOUNT_S NAME FAILGROUP CREATE_DA PATH
------------ ----------- ------- ---------- ---------- --------- ----------------------------
0 0 CLOSED /dev/oracleasm/asm-archived
0 1 CLOSED /dev/oracleasm/asm-backup
1 0 CACHED OCR_0000 OCR_0000 11-NOV-19 /dev/oracleasm/asm-ocr3
1 1 CACHED OCR_0001 OCR_0001 11-NOV-19 /dev/oracleasm/asm-ocr2
1 2 CACHED OCR_0002 OCR_0002 11-NOV-19 /dev/oracleasm/asm-ocr1
2 0 CACHED DATA_0000 DATA_0000 11-NOV-19 /dev/oracleasm/asm-data1
2 1 CACHED DATA_0001 DATA_0001 11-NOV-19 /dev/oracleasm/asm-data2
# SQL 语句创建磁盘组 ARCHIVE 和 BAK
SQL> create diskgroup archive external redundancy disk '/dev/oracleasm/asm-archived' attribute 'au_size'='4M';
Diskgroup created.
SQL> create diskgroup bak external redundancy disk '/dev/oracleasm/asm-backup' attribute 'au_size'='4M';
Diskgroup created.
# 查询 ASM 磁盘组
SQL> select group_number,name,type,total_mb,free_mb,usable_file_mb from v$asm_diskgroup;
GROUP_NUMBER NAME TYPE TOTAL_MB FREE_MB USABLE_FILE_MB
------------ ---------- ------ ---------- ---------- --------------
1 OCR NORMAL 3060 2716 848
2 DATA NORMAL 409592 409392 204696
3 ARCHIVE EXTERN 102396 102316 102316
4 BAK EXTERN 511996 511916 511916
dbca -silent -createDatabase -templateName General_Purpose.dbc \
-gdbname SIASM18C \
-sid SIASM18C \
-databaseConfigType SI \
-createAsContainerDatabase TRUE \
-numberOfPDBs 1 \
-pdbName orders \
-useLocalUndoForPDBs TRUE \
-pdbAdminPassword oracle \
-sysPassword oracle \
-systemPassword oracle \
-characterSet AL32UTF8 \
-memoryPercentage 40 \
-storageType ASM \
-diskGroupName DATA \
-asmsnmpPassword oracle
[oracle@asmsi18c:/home/oracle]$sqlplus / as sysdba
SQL*Plus: Release 18.0.0.0.0 - Production on Tue Nov 12 00:29:47 2019
Version 18.3.0.0.0
Copyright (c) 1982, 2018, Oracle. All rights reserved.
Connected to:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 ORDERS READ WRITE NO
SQL> alter session set container=orders;
Session altered.
SQL> select name from v$datafile;
NAME
---------------------------------------------------------------------------------
+DATA/SIASM18C/971576BF22F65ACAE0530C01A8C01D9B/DATAFILE/system.271.1024100231
+DATA/SIASM18C/971576BF22F65ACAE0530C01A8C01D9B/DATAFILE/sysaux.272.1024100231
+DATA/SIASM18C/971576BF22F65ACAE0530C01A8C01D9B/DATAFILE/undotbs1.270.1024100231
+DATA/SIASM18C/971576BF22F65ACAE0530C01A8C01D9B/DATAFILE/users.274.1024100247
SQL> create tablespace askscuti datafile '+DATA' size 10m;
Tablespace created.
SQL> select name from v$datafile;
NAME
---------------------------------------------------------------------------------
+DATA/SIASM18C/971576BF22F65ACAE0530C01A8C01D9B/DATAFILE/system.271.1024100231
+DATA/SIASM18C/971576BF22F65ACAE0530C01A8C01D9B/DATAFILE/sysaux.272.1024100231
+DATA/SIASM18C/971576BF22F65ACAE0530C01A8C01D9B/DATAFILE/undotbs1.270.1024100231
+DATA/SIASM18C/971576BF22F65ACAE0530C01A8C01D9B/DATAFILE/users.274.1024100247
+DATA/SIASM18C/971576BF22F65ACAE0530C01A8C01D9B/DATAFILE/askscuti.275.1024101305