当前位置:网站首页>Installing Oracle EE
Installing Oracle EE
2022-07-01 08:45:00 【sirwsl】
In the early
Enter the directory you need to set , Create folder , Folder Authorization
mkdir xxx
chmod o+w /oracle/oradata
chmod 777 /oracle/oradata
install ORACLE EE
1: Find image
docker search oracle19c
2: Select the appropriate mirror
docker pull heartu41/oracle19c
3: function
docker run -p 1521:1521 -p 5500:5500 \
--name oracletest \
--privileged=true \
--restart=always \
-e ORACLE_SID=ORCL \
-e ORACLE_PDB=ORCLTEST \
-e ORACLE_PWD=123456 \
-e ORACLE_CHARACTERSET=AL32UTF8 \
-e ORACLE_BASE=/opt/oracle \
-e ORACLE_EDITION=standard \
-e ORACLE_HOME=/opt/oracle/product/19c/dbhome_1 \
-e ORACLE_ALLOW_REMOTE=true \
-e TZ=Asia/Chongqing \
-e PATH=/opt/oracle/product/19c/dbhome_1/bin:/opt/oracle/product/19c/dbhome_1/OPatch/:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
-e NLS_LANG=AMERICAN_AMERICA.AL32UTF8 \
NLS_DATE_LANGUAGE
-it \
-v /data/oracle/oradata:/opt/oracle/oradata \
-d f59790109034
see :
docker logs -ft oracletest
4: Check whether the time zone setting is effective
docker exec -it oracletest date +"%Z %z"
5: Into the container
docker exec -it oracletest /bin/bash
6: Change Password
./setPassword.sh 123456
7: Set up PDB
grep $ORACLE_HOME /etc/oratab | cut -d: -f1
export ORACLE_SID=ORCL
8: Connect to database
sqlplus / as sysdba
10: Cancel restricted mode
alter system disable restricted session;
9: perform
alter session set "_ORACLE_SCRIPT"=true;
9: see
show pdbs;

10: Authorization of tablespaces after schema creation
ALTER USER user name QUOTA UNLIMITED ON Table space
11 If you need to modify the character set or environment variables
Inquire about :
SELECT USERENV('language') FROM dual;
Install vim
docker exec -it --user root oracletest /bin/bash
yum install vim
Edit the file
vim ~/.bash_profile
add to
export NLS_LANG="SIMPLIFIED CHINESE_CHINA".ZHS16GBK
or
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
or
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
Load the file
source ~/.bash_profile
modify oracle Parameter form
select * from v$nls_parameters;

Create a user table space
-- Remove tablespaces
DROP TABLESPACE HTHSETEMP INCLUDING CONTENTS AND DATAFILES
-- Remove users
drop user HSE_TEMP CASCADE
-- Create tablespace
CREATE TABLESPACE NTHSETESTPSPACE
DATAFILE '/opt/oracle/oradata/ORCL/ORCLTEST/NTHSETESTPSPACE.dbf'
SIZE 20G AUTOEXTEND ON next 4G
-- Create user
CREATE USER HSE_TEMP IDENTIFIED BY 000000
--- Change Password
alter user user name identified by New password ;
-- Modify user tablespaces
ALTER USER HSE_TEMP quota unlimited ON HTHSETEMP
-- The practical application
create user <username> identified by <password>
default tablespace <tablespace_name> -- Default tablespace
temporary tablespace temp -- Temporary table space
quota unlimited on <tablespace_name> -- Table space quota
-- Permission settings
grant create session to HSE_TEMP
grant create table to HSE_TEMP
grant create tablespace to HSE_TEMP;
grant create any view to HSE_TEMP;
grant connect,resource to HSE_TEMP;
grant create any sequence to HSE_TEMP;
grant create any table to HSE_TEMP;
grant delete any table to HSE_TEMP;
grant insert any table to HSE_TEMP;
grant select any table to HSE_TEMP;
grant unlimited tablespace to HSE_TEMP;
grant execute any procedure to HSE_TEMP;
grant update any table to HSE_TEMP;
-- View the permissions of the current user
select * from role_sys_privs;
Common commands
startup mount # start-up
shutdown immediate; close
sqlplus / as sysdba Get into
lsnrctl status Check the listening status
lsnrctl start Turn on monitoring
lsnrctl reload restart
lsnrctl stop stop it
Other questions
problem
cannot mount database in EXCLUSIVE mode
solve :
cd $ORACLE_HOME/dbs
ls lk*
rm lk*
problem
ORA-00205: error in identifying control file, check alert log for more info : (
solve
ipcs -s
ipcrm -s semid-NO.
problem
ORA-00214: control file '/opt/oracle/oradata/ORCL/control01.ctl' version 2647
inconsistent with file '/opt/oracle/oradata/ORCL/control02.ctl' version 2613
solve
cd /opt/oracle/oradata/ORCL/
ls
cp control01.ctl control02.ctl
边栏推荐
猜你喜欢

NIO-零拷贝

Screenshot tips

Principle and application of single chip microcomputer - off chip development

FreeRTOS学习简易笔记

MAVROS发送自定义话题消息给PX4

Principle and application of single chip microcomputer - principle of parallel IO port

Nacos - gestion de la configuration

Nacos - 服务发现

Nacos - 配置管理

FreeRTOS learning easy notes
随机推荐
1. Connection between Jetson and camera
Bimianhongfu queren()
Centos7 shell script one click installation of JDK, Mongo, Kafka, FTP, PostgreSQL, PostGIS, pgrouting
MATLAB小技巧(23)矩阵分析--模拟退火
Centos7 shell脚本一键安装jdk、mongo、kafka、ftp、postgresql、postgis、pgrouting
Matlab tips (23) matrix analysis -- simulated annealing
The era of low threshold programmers is gone forever behind the sharp increase in the number of school recruitment for Internet companies
Nacos - 服务发现
The meaning of yolov5 training visualization index
大型工厂设备管理痛点和解决方案
截图小妙招
【js逆向】md5加密参数破解
【无标题】
VSYNC+三重缓存机制+Choreographer
Shell脚本-字符串
Tita OKR: a dashboard to master the big picture
任务、线程、进程 区别
用C语言编程:用公式计算:e≈1+1/1!+1/2! …+1/n!,精度为10-6
个人装修笔记
AES简单介绍