随笔分类 -  Oracle

some notes of Oracle
摘要:发出一个sql语句或sql命令,让数据库执行,那么sql语句在数据库内部就要被解析,建立它的execution plan(执行规划(计划)),然后按照执行计划去执行。 每一个sql语句都要被解析,解析成原子操作去执行。解析好的sql语句都会存在共享池里面。 Shared Pool used to store: --Most recently executed SQL statements --Mo... 阅读全文
posted @ 2009-03-27 13:54 shuang 阅读(154) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2009-01-08 15:32 shuang 阅读(0) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2009-01-08 15:26 shuang 阅读(0) 评论(0) 推荐(0)
摘要:2、表 查看用户下所有的表 中国网管论坛bbs.bitsCN.com SQL>select * from user_tables; 查看名称包含log字符的表 SQL>select object_name,object_id from user_objects where instr(object_name,'LOG')>0; 查看某表的创建... 阅读全文
posted @ 2009-01-08 14:25 shuang 阅读(625) 评论(0) 推荐(0)
摘要:ora 普通数据字典的"数据字典" ++++++++++++++++++ 如果我们想查询跟索引有关的数据字典时,可以用下面这条SQL语句: SQL>select * from dictionary where instr(comments,'index')>0; SQL> set line 300; SQL> col table_name for a30; SQL> col comments f... 阅读全文
posted @ 2009-01-08 13:52 shuang 阅读(159) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2009-01-08 13:14 shuang 阅读(125) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2009-01-08 13:11 shuang 阅读(251) 评论(0) 推荐(0)
摘要:pfile的位置: ++++++++++++++++++++++ ++++++++++++++++++++++++++++++ 一、什么是数据库名(db_name) 数据库名是用于区分数据的内部标识,是以二进制方式存储于数据库控制文件中的参数,在数据安装或创建之后将不得修改。数据库安装完成后,该参数被写入数据库参数文件pfile中,格式如下: (db_name="orapw" #(不允许修... 阅读全文
posted @ 2009-01-08 11:52 shuang 阅读(326) 评论(0) 推荐(0)
摘要:++++++++++++++++++++++++++++++ 阅读全文
posted @ 2009-01-07 14:04 shuang 阅读(232) 评论(0) 推荐(0)
摘要:select trunc(sysdate,'month')from dual trunc会自动载取当月的第一天 ++++++++++++++++++++++ select to_char(trunc(sysdate,'mon'),'yyyymmdd') from dual +++++++++++++++++++++ select trunc(sysdate,'mm') from dual; SE... 阅读全文
posted @ 2009-01-06 12:34 shuang 阅读(474) 评论(0) 推荐(0)
摘要:Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->create or replace package xyd is -- Author : USER -- Created : 2007-4-16 15:24:16 -- Purpo... 阅读全文
posted @ 2009-01-06 10:40 shuang 阅读(324) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2009-01-06 09:46 shuang 阅读(127) 评论(0) 推荐(0)
摘要:察看当前数据库当前用户的所有表: ++++++++++++++++++++++++++++++++++++++++++++++++++++ 创建表: +++++++++++++++++++++++++++++++++++++++++++++++++++++ 阅读全文
posted @ 2008-12-29 11:15 shuang 阅读(148) 评论(0) 推荐(0)
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->SQL> alter user hr identified by hr; User altered. SQL> conn hr/hr; ERROR: ... 阅读全文
posted @ 2008-12-25 13:43 shuang 阅读(193) 评论(0) 推荐(0)
摘要:select prep_key_no,cdf_no from tb_report_cust_dec t where rownum <=30 阅读全文
posted @ 2008-12-24 14:15 shuang 阅读(240) 评论(0) 推荐(0)
摘要:我用的登陆用户是mms_dem,他有dba的权限。 +++++++++++++++++++++++++++++++++++ --------------------------- ++++++++++++++++++++++++++++++++++++++ 阅读全文
posted @ 2008-12-24 09:26 shuang 阅读(116) 评论(0) 推荐(0)
摘要:安装完Oracle 后把 D:\oracle\ora92\network\admin下的文件 listener.ora 和 tnsnames.ora 都备份一下。 Configuration and Migration Tools-> Net Configuration Assistant -> 使用IPC协议-> KEY = EXTPROC0 阅读全文
posted @ 2008-12-18 16:01 shuang 阅读(110) 评论(0) 推荐(0)
摘要:+++++++++ ++++++++++++++++++++++++ 阅读全文
posted @ 2008-12-17 09:58 shuang 阅读(156) 评论(0) 推荐(0)
摘要:1. 创建表空间。 2. 创建用户,把刚才创建的表空间授予该用户。 3. 该用户有自己的表后,才有schema,无论是create的表,还是imp进来的表,索引等等。 4. 新建用户时有没有分配给他DBA的权限,如果用该用户imp 文件,而被imp的文件是另一个有DBA权限的用户exp出来的,此时只有grant 给该新建用户DBA权限,操作才能继续进行。 阅读全文
posted @ 2008-12-17 09:14 shuang 阅读(221) 评论(0) 推荐(0)
摘要:select TO_CHAR(SYSDATE,'YYYY-MM-DD HH24:MI:SS') from pt_access ---需要有一个载体 结果:2008-12-16 14:46:52 +++++++++++++++++++++++++++++++++++++++++ TO_NUMBER(STR):将字符串转换成数字;若转换不成功,则抛错:ORA-01722: invalid numbe... 阅读全文
posted @ 2008-12-16 14:50 shuang 阅读(455) 评论(0) 推荐(0)