# 进入 oracle 用户
su - oralce
# 查看归档
SQL> archive log list;
# 查看归档路径及大小限制
SQL> show parameter recover;
# 看看归档日志(按百分比),超 90% 随时有宕机的危险
SQL> select * from v$flash_recovery_area_usage;
SQL> select * from v$recovery_file_dest;
{"version": 2, "width": 81, "height": 20}
[0.006808, "o", "> "]
[0.8880290000000001, "o", "#"]
[0.9601360000000001, "o", " "]
[1.160145, "o", "W"]
[1.343879, "o", "e"]
[1.53569, "o", "l"]
[1.631953, "o", "c"]
[1.735633, "o", "o"]
[1.808077, "o", "m"]
yum install net-tools # 安装 netstat
yum install nc.x86_64 # 安装 nc
apt install netcat # 安装 nc
# 查看占用端口
netstat -tunlp
# tcp6 包含 ipv4? ref: https://unix.stackexchange.com/questions/496137
cat /proc/sys/net/ipv6/bindv6only
-- 旧版本加密、解密(已弃用)
INSERT INTO users (username, password) VALUES ('john', ENCODE('guessme', 'salt')); -- 写入加密
SELECT username, DECODE(password,'salt') AS password FROM users WHERE username = 'john'; -- 查询解密
-- 新版本加密、解密(安全级别、性能高)
INSERT INTO users (username, password) VALUES ('steven', aes_encrypt('password', 'salt')); -- 写入加密
SELECT username, aes_decrypt(password,'salt') AS password FROM users WHERE username = 'steven'; -- 查询解密
SET block_encryption_mode = 'aes-256-cbc'; -- 修改加密模式
-- 或添加到配置文件 /etc/my.cnf 重启服务