5-sql语句

Oracle数据库启动与用户管理
本文介绍了Oracle数据库的启动过程及基本操作,包括通过SQL*Plus工具连接到Oracle实例、查看当前用户、启动数据库实例、以及解锁并使用特定的数据库用户(如SCOTT用户)。这些步骤对于日常管理和维护Oracle数据库至关重要。

1

[oracle@ocp ~]$ . oraenv  #
ORACLE_SID = [oracle] ? orcl
The Oracle base has been set to /u01/app/oracle
[oracle@ocp ~]$ 
[oracle@ocp ~]$ sqlplus / as sysdba   #

SQL*Plus: Release 11.2.0.3.0 Production on Wed Mar 7 14:12:32 2018

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


Connected to an idle instance.

SQL> 
SQL> startup        #启动
ORACLE instance started.

Total System Global Area  521936896 bytes
Fixed Size            2229944 bytes
Variable Size          356518216 bytes
Database Buffers      159383552 bytes
Redo Buffers            3805184 bytes
Database mounted.
Database opened.
SQL> 
SQL> show user  # show用户
USER is "SYS"
SQL> 
    

 

 

 

2

 

SQL> alter user scott identified by oracle account unlock;   #解锁scott用户

User altered.

SQL> 
SQL> conn scott/oracle   # scott用户连接oracle
Connected.
SQL> 
SQL> show user   #
USER is "SCOTT"
SQL> 

 

3

 

 

 

4

 

 

5

 

 

6

 

转载于:https://www.cnblogs.com/venicid/p/8522456.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值