Oracle相关

作者: zilanhu | 来源:发表于2017-07-10 10:25 被阅读0次

Google一般比百度靠谱,英文资料一般比中文资料丰富、准确。所以还是建议遇到问题直接Google,不要在百度浏览大量的重复文章浪费时间。


Oracle相关资料


Oracle相关语法及函数

  • Win10 用户:ora-01031: insufficient privileges,权限不足问题
    如果尝试网上的办法都不可行的话,可以尝试以下办法:
    将电脑从微软账号切换为本地账户。再次尝试即可。
  • Oracle Dual
//几种有意思的用法
SELECT 7*9 FROM DUAL
63

DUAL is a table automatically created by Oracle Database along with the data dictionary. DUAL is in the schema of the user SYS but is accessible by the name DUAL to all users. It has one column, DUMMY, defined to be VARCHAR2(1), and contains one row with a value X. Selecting from the DUAL table is useful for computing a constant expression with the SELECT statement. Because DUAL has only one row, the constant is returned only once.
Alternatively, you can select a constant, pseudocolumn, or expression from any table, but the value will be returned as many times as there are rows in the table. Please refer to "SQL Functions" for many examples of selecting a constant value from DUAL.

  • Connect By、Start With、Level
  • LPAD
    要注意这个例子中字符串的截取方式,大部分文章中都简单用单字母或者重复符号进行填充,太简单,完全不具有代表性。
SELECT LPAD('Page 1',15,'*.') "LPAD example" FROM DUAL;
LPAD example
*.*.*.*.*Page 1

Oracle遇到的相关问题

用户无法drop

今天在现场遇到一个问题,导致数据库崩溃,需要恢复数据库。在删除用户时使用命令:

DROP USER XX CASCADE;

一直提示无法删除当前用户,使用

SELECT USERNAME,SID,SERIAL#,STATUS FROM V$SESSION;

发现XX用户一旦被删除会重新连接,暂时不知道是什么原因。
后来发现,可以先锁定用户

ALTER USER XX ACCOUNT LOCK;
ALTER SYSTEM KILL SESSION'SID,SERIAL#';
DROP USER XX CASCADE;

相关文章

  • Windows环境下Oracle完全卸载

    1.关闭所有Oracle相关服务 2.打开注册表删除与Oracle相关注册信息(1)Oracle在windows下...

  • Oracle相关

    查看当前数据库监听状态命令:lsnrctl status/stop/status服务端监听文件 Listener...

  • Oracle相关

    Google一般比百度靠谱,英文资料一般比中文资料丰富、准确。所以还是建议遇到问题直接Google,不要在百度浏览...

  • Oracle相关

    使用绑定变量的SQL效率更高。因为硬编码的语句对于Oracle来说完全是全新的语句,每次都需要编译。绑定变量的语句...

  • oracle相关

    1、用户 1.1、创建用户 --创建用户test,密码test CREATE USER "test" --...

  • 非图形界面linux创建oracle的实例

    1.查看oracle相关的系统参数 $su - oracle //进入oracle用户模式下 $echo $ORA...

  • Oracle相关操作

    1. 索引 1.1 创建索引 create index index_name on table_name(colu...

  • oracle时间相关

    查看当前时间在第几个季度SELECT TO_CHAR(SYSDATE, 'Q') FROM DUAL; 获取当前时...

  • oracle 相关操作

  • Oracle 相关特性

    11G新功能的官方文档https://docs.oracle.com/cd/E11882_01/server.11...

网友评论

    本文标题:Oracle相关

    本文链接:https://www.haomeiwen.com/subject/lsryhxtx.html