cd /home/oracle # 进入到 oracle 用户目录
source .bash_profile # 加载 oracle 环境变量
$PATH # 查看 oracle 环境变量是否生效
sqlplus / as sysdba # 连接 oracle 数据库
alter user system identified by oracle; # 修改 DBA 账号的密码
alter user sys identified by oracle; # 修改 DBA 账号的密码
alter profile default limit password_life_time unlimited; # 设置密码为永不过期
create user mitchell identified by oracle; # 创建一个 mitchell 用户,密码 oracleselect USERNAME, ACCOUNT_STATUS from dba_users t where t.username = 'MITCHELL'; # 查询用户是否创建成功
grant connect, resource to mitchell; # 给用户授予连接和数据权限
5,相关配置(可省略)
grant select on V_$session to mitchell;
grant select on V_$sesstat to mitchell;
grant select on V_$statname to mitchell;
show parameter deferred_segment_creation; -- 查看是否启用 true 为启动
alter system set deferred_segment_creation=false; -- 修改为不启用
show parameter deferred_segment_creation; -- 查看是否修改成功 false 未启用
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步