sqlplus'!@#/!!!assysdba'竟然看不懂?
今日分享,今天在银行待了一天,明天可以休息一下了,祝大家周末愉快!
如果大家看到以下几种写法,大家会有什么想法?有什么区别?
告诉大家,这几种写法默认都可以登录到数据库的。
站在用户的角度思考问题,与客户深入沟通,找到黄陂网站设计与黄陂网站推广的解决方案,凭借多年的经验,让设计与互联网技术结合,创造个性化、用户体验好的作品,建站类型包括:网站设计、成都网站设计、企业官网、英文网站、手机端网站、网站推广、域名注册、雅安服务器托管、企业邮箱。业务覆盖黄陂地区。
$sqlplus xxx/xxx as sysdba
$sqlplus roidba/roidba as sysdba
$sqlplus / as sysdba
$sqlplus '!@#/!!! as sysdba'
这里有几个小知识点值得注意。
1、Oracle 默认使用系统认证,登录数据库
2、单引号在这里强调忽略所有特殊字符,这就是为什么有时候我们需要单引号,而有的时候不需要。
我们在做数据库备份的时候,有的时候用sys,有的时候用system,有的时候有业务用户来做逻辑备份,而我又不想把密码暴露出来的话,怎么办呢?
有不少朋友就是使用了expdp \'/ as sysdba\'
例如
$expdp \'/ as sysdba\'
Export: Release 12.1.0.2.0 - Production on Fri Dec 15 22:42:17 2017
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options
Starting "SYS"."SYS_EXPORT_SCHEMA_01": "/******** AS SYSDBA"
Estimate in progress using BLOCKS method...
Total estimation using BLOCKS method: 0 KB
Processing object type SCHEMA_EXPORT/STATISTICS/MARKER
ORA-31655: no data or metadata objects selected for job
Job "SYS"."SYS_EXPORT_SCHEMA_01" completed with 1 error(s) at Fri Dec 15 22:42:43 2017 elapsed 0 00:00:24
哪里来的xxx用户,别被忽悠了哈
$sqlplus xxx/xxx as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Fri Dec 15 22:44:20 2017
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options
SYS@orcl1> select user from dual;
USER
------------------------------
SYS
哪里来的!@#用户哈,这下大家应该理解了吧,眼见不一定为实,自己动手测试验证了,才能得出最终的结论。
$sqlplus '!@#/!!! as sysdba'
SQL*Plus: Release 12.1.0.2.0 Production on Fri Dec 15 22:45:35 2017
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options
SYS@orcl1> select user from dual;
USER
------------------------------
SYS
SYS@orcl1>
网站栏目:sqlplus'!@#/!!!assysdba'竟然看不懂?
浏览地址:http://scjbc.cn/article/igidpp.html