龙空技术网

centos 7 安装oracle 19 c 开启hr账号 navicat 连接oracle

在路上 88

前言:

今天各位老铁们对“oracle创建远程账户”都比较关注,我们都想要知道一些“oracle创建远程账户”的相关内容。那么小编在网络上汇集了一些有关“oracle创建远程账户””的相关知识,希望看官们能喜欢,我们快快来了解一下吧!

centos 7 安装oracle 19 c 开启hr账号 navicat 远程连接

所有安装软件提供百度网盘下载与虚拟机下载,开机即用2124328140

下载 ooracle 安装的依赖文件到centos

并安装

rpm -Uvh *.rpm --nodeps --force

安装oracle预配置文件

[root@localhost oc19]# rpm -ivh oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm

安装oracle database文件

[root@localhost oc19]# rpm -ivh oracle-database-ee-19c-1.0-1.x86_64.rpm

配置初始化oracle数据库

/etc/init.d/oracledb_ORCLCDB-19c configure

查看服务启动状态

修改oracle用户密码

添加环境变量

vi /etc/profile

export ORACLE_HOME=/opt/oracle/product/19c/dbhome_1

export PATH=$PATH:/opt/oracle/product/19c/dbhome_1/bin

export ORACLE_SID=ORCLCDB

export NLS_LANG="AMERICAN_AMERICA.UTF8"

#使环境变量生效

source /etc/profile

修改sys密码

alter user sys identified by oracle;

SQL> alter user sys identified by oracle;

alter user sysdba identified by oracle;

User altered.

SQL>

查看监听状态

[oracle@localhost ~]$ lsnrctl status

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 05-MAR-2024 23:03:45

Copyright (c) 1991, 2019, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))) STATUS of the LISTENER

Alias LISTENER

Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production

Start Date 05-MAR-2024 22:33:36

Uptime 0 days 0 hr. 30 min. 9 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Parameter File /opt/oracle/product/19c/dbhome_1/network/admin/listener.ora

Listener Log File /opt/oracle/diag/tnslsnr/localhost/listener/alert/log.xml

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))

(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=localhost)(PORT=5500))(Security=(my_wallet_directory=/opt/oracle/admin/ORCLCDB/xdb_wallet))(Presentation=HTTP)(Session=RAW))

Services Summary...

Service "12ec062384ba7022e065000000000001" has 1 instance(s).

Instance "ORCLCDB", status READY, has 1 handler(s) for this service...

Service "ORCLCDB" has 1 instance(s).

Instance "ORCLCDB", status READY, has 1 handler(s) for this service...

Service "ORCLCDBXDB" has 1 instance(s).

Instance "ORCLCDB", status READY, has 1 handler(s) for this service...

Service "orclpdb1" has 1 instance(s).

Instance "ORCLCDB", status READY, has 1 handler(s) for this service...

The command completed successfully

[oracle@localhost ~]$

切换到oracle账号下

[root@localhost dbhome_1]# su - oracle

上一次登录:二 3月 5 22:33:22 CST 2024pts/0 上

[oracle@localhost ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Tue Mar 5 23:01:24 2024

Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle. All rights reserved.

Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.3.0.0.0

SQL>

ALTER PLUGGABLE DATABASE ORCLPDB1 CLOSE;

SQL> ALTER PLUGGABLE DATABASE ORCLPDB1 CLOSE;

Pluggable database altered.

SQL> show pdbs;

CON_ID CON_NAME OPEN MODE RESTRICTED

2 PDB$SEED READ ONLY NO 3 ORCLPDB1 MOUNTED

SQL>

alter session set container=ORCLPDB1;

SQL> alter session set container=ORCLPDB1;

Session altered.

SQL>

网页登录oracle查看信息

开启hr

SQL> alter session set "_ORACLE_SCRIPT"=true;

Session altered.

SQL> create user hr identified by hr;

User created.

SQL> @$ORACLE_HOME/demo/schema/human_resources/hr_main.sql

specify password for HR as parameter 1:

Enter value for 1: hr

specify default tablespeace for HR as parameter 2:

Enter value for 2: users

specify temporary tablespace for HR as parameter 3:

Enter value for 3: temp

specify log path as parameter 4:

Enter value for 4:

SP2-0137: DEFINE requires a value following equal sign

Enter value for log_path:

SP2-0606: Cannot create SPOOL file "/hr_main.log"

PL/SQL procedure successfully completed.

解锁与设置密码

select username from dba_users;

alter user hr account unlock;

alter user hr identified by hr;

SQL> conn hr/hr

Connected.

SQL>

SQL>

SQL>

navicat 连接oracle 19c

查看hr账号下的jobs表

标签: #oracle创建远程账户 #linux查看oracle用户密码