Oracle安装和登录建立表空间的详细步骤

安装

Windows10安装Oracle19c数据库详细记录(图文详解)

相关命令

登录

本地登录


sqlplus / as sysdba
sqlplus /nolog

sqlplus xianxianrenmin_his/oracle123@localhost:1521/orcl

远程登录

>sqlplus scott/tiger@172.16.100.144:1521/orcl
用 SQL*Plus 连接数据库的时候,除了用户名和密码外,还要在口令后面加一个主机字符串。如下:
  请输入用户名:scott
  口令:tiger,orcl as sysdba

sqlplus sys/oracle123@172.16.100.144:1521/orcl

请输入用户名:  sys as sysdba
密码:安装时设置的 oracle123

创建表空间

create tablespace xianxianrenmin_his
logging
datafile  'E:\java-need\db\oracle\oradata\ps\xianxianrenmin_his.DBF'
size 32M
autoextend on
next 32M maxsize 2048M
extent management local;

-- 创建用户名,用户名是xianxianrenmin_his,密码是oracle123,语句如下
create user xianxianrenmin_his identified by oracle123 default tablespace xianxianrenmin_his;

--分配用户权限,语句如下:
grant connect,resource,dba to xianxianrenmin_his;

对应用户登录后,使用sql语句创建表即可

启动

bash-4.1$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Mon Oct 7 14:15:10 2013

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

Connected to an idle instance.

SQL> startup nomount
ORACLE instance started.
————————————————
版权声明:本文为CSDN博主「神笔码靓」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/daxues_/article/details/119911735

关闭

bash-4.1$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Mon Oct 7 14:50:17 2013

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

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
————————————————
版权声明:本文为CSDN博主「神笔码靓」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/daxues_/article/details/119911735
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值