首页 技术 正文
技术 2022年11月16日
0 收藏 514 点赞 2,848 浏览 1130 个字

oracle登录

sqlplus  sys/oracle as sysdba

这个登录之后呢

会出现这个:

Connected to an idle instance.

这一步是连接上

[oracle@redhat ~]$ sqlplus sys/oracle as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Mon Jun 13 13:04:36 2016

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

Connected to an idle instance.

创建实例

SQL> startup
ORACLE instance started.

Total System Global Area  792723456 bytes
Fixed Size            2929400 bytes
Variable Size          545262856 bytes
Database Buffers      239075328 bytes
Redo Buffers            5455872 bytes
Database mounted.
Database opened.

SQL> ed
SP2-0107: Nothing to save.

果然oracle啥都不懂,说实话我还去应聘了一家公司的dba,我也是没谁了

Linux环境下启动oracle实例

在linux环境下启动和关闭oracle实例,一般是在SQL * Plus提示下分别采用startup和shutdown命令来实现的

Connected to an idle instance.

startup

startup nomount

startup open

在SQL>下用startup正常启动Oracle数据库实例

1:sqlplus /nolog

2:connect /as sysdba

3:startup

新安装oracle时,默认scott账户为锁定,需要用sys的身份来解锁

以sys登录之后

alter user scott account unlock;

解锁成功之后,在启动sqlplus后发现口令过期,需要更改口令

alter user scott identified by tiger;

再次登录

sqlplus scott/tiger;

SQL> alter user scott account unlock;
alter user scott account unlock
           *
ERROR at line 1:
ORA-01918: user ‘SCOTT’ does not exist

ctrl+backspace组合键可以回删错误的命令

oracle scott已经被移除,我已哭晕在厕所。。。

还是要先startup一下

不能直接运行scott.sql

不然会报错

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,077
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,552
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,400
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,176
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,813
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,896