Time of Update: 2018-07-24
dba_free_space:描述資料空間的剩餘大小 dba_data_file:描述資料資料表空間的總大小 select a.tablespace_name, a.bytes bytes_used, b.largest,round(((a.bytes-b.bytes)/a.bytes)*100,2) percent_used from (select tablespace_name,sum(bytes) bytes from dba_data_files group
Time of Update: 2018-07-24
OpenScript現在對於很多人來說應該是個很陌生的名字,但是估計6月份以後隨著9.0的正式版推出市場,將會被越來越多的人所知,而且使用者也會發現這個工具真的非常好用,特別對於熟悉Java語言的使用者而言更是輕而易舉.好了,先來說說它的曆史吧. 提到OpenScript,必須先說說Oracle的另一個產品Oracle Applications Testing
Time of Update: 2018-07-24
/*======================================================================================================================================*//*tp_orders資料表空間,大小10M,檔案大小可自動成長,允許檔案擴充,最大限度為無限制建立A_oe使用者的預設資料表空間為tp_orders 密碼
Time of Update: 2018-07-24
一、資料庫建立: 1、利用資料庫配置助手(DBCA,Database Configuration Assistant)圖形化方式 2、建立完成之後,找到 D:\oracle\product\11.2.0\dbhome_1\NETWORK\ADMIN下的 tnsnames.ora 監聽設定檔開啟 配置一下新資料庫的資料庫名和sid 3、然後重新啟動 pl\sql登陸即可 二、建立暫存資料表空間:(如不建立則使用預設暫存資料表空間) create
Time of Update: 2018-07-24
@ set ORACLE_HOME=D:\oracle\product\10.2.0\db_1 @rem echo %ORACLE_HOME% @ set ORACLE_SID=orcl @rem echo %ORACLE_SID% @ set NLS_LANG=SIMPLIFIED CHINESE_CHINA.ZHS16GBK @rem echo
Time of Update: 2018-07-24
1、sqlplus sys/password as sysdba 管理員登入 2、建立暫存資料表空間 紅色部分更換成自己的路徑 create temporary tablespace mytest tempfile 'D:\app\Administrator\oradata\orcl\mytest.dbf' size 200m autoextend on next 200m maxsize 20480m extent management
Time of Update: 2018-07-24
操作詳情:https://www.cnblogs.com/xiaodf/p/6030102.html 注意:在匯出前需要先建立待匯出的表結構。如果匯出的表在資料庫中不存在則會報錯;如果重複匯出多次,表中的資料會重複; create table EMP_DEMO as select * from EMP where 1=2;create table SALGRADE_DEMO as select * from SALGRADE where 1=2;
Time of Update: 2018-07-24
關於ORACLE的UPDATE更新多表的問題有以下幾種方式可以實現:一種是: update table1 set (field1,field2...) = (Select Field1,field2....
Time of Update: 2018-07-24
create or replace function Get_StrArrayStrOfIndex ( av_str varchar2, --要分割的字串 av_split varchar2, --分隔字元號 av_index number --取第幾個元素 ) return varchar2 is lv_str varchar2(1024);
Time of Update: 2018-07-24
Oracle中to_char()函數的用法 轉:http://blog.csdn.net/jiangnan2014/article/details/16908585 (1)用作日期轉換: to_char(date,'格式'); select to_date('2005-01-01 ','yyyy-MM-dd') from dual;select to_char(sysdate,'yyyy-MM-dd HH24:mi:ss') from
Time of Update: 2018-07-24
單欄位去重 查看重複資料 select * from testrepeat t where t.id in (select id from testrepeat group by id having count(id) > 1); 重複資料刪除記錄,保留rowid最小的行 delete from testrepeat t where t.id in (select id from testrepeat group by id
Time of Update: 2018-07-24
選擇表中的某一行記錄:(理解:rownum是oracle系統順序分配為從查詢返回的行的編號) select * from (select rownum a,t.* from testtab t) where a=2; 不能為: select * from (select rownum,t.* from testtab t) where rownum=2;或 select * from testtab where rownum=2; 返回多行記錄: select * from testtab
Time of Update: 2018-07-24
後來查了查資料,發現資料表空間資料檔案容量與DB_BLOCK_SIZE有關,在初始建庫時,DB_BLOCK_SIZE要根據實際需要,設定為 4K,8K、16K、32K、64K等幾種大小,ORACLE的物理檔案最大隻允許4194304個資料區塊(由作業系統決定),資料表空間資料檔案的最大值為 4194304×DB_BLOCK_SIZE/1024M。 即: 4k最大資料表空間為:16384M 8K最大資料表空間為:32768M
Time of Update: 2018-07-24
前面我們介紹了在oralce中使用natural join,也就是自然串連。在Oracle中的join串連中使用using關鍵字,是相對於natural join的。 我們在前面提到,如果是使用natraul join,並且兩張表中如果有多個欄位是具有相同的名稱和資料類型的,那麼這些欄位都將被oracle自作主張的將他們串連起來。 但實際上我們有時候是不需要這樣來串連的。我們只需要將他們的多個具有相同的名稱和資料類型的欄位中挑選一兩個。這時候我們就需要用到using 關鍵字了。
Time of Update: 2018-07-24
查看庫名和執行個體名show parameter instance name;show parameter db name;查看版本select INSTANCE_NUMBER,INSTANCE_NAME,HOST_NAME,VERSION from v$instance;select * from product_component_version;select * from v$version;select COMP_NAME, VERSION from
Time of Update: 2018-07-24
以前查oracle的版本資訊,只知道一種方法,就是用v$versions視圖,如下: SQL> select * from v$version; BANNER ---------------------------------------------------------------- Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production PL/SQL
Time of Update: 2018-07-24
碰到的一個OGG 12.2.0.1的一個問題,按照之前的ogg的配置方法配置goldengate同步,但是碰到了以下問題: pump進程啟動後abend,報錯如下: 2016-07-12 11:02:38 INFO OGG-00993 Oracle GoldenGate Capture for Oracle, pmp_tc.prm: EXTRACT pmp_tc started. 2016-07-12 11:02
Time of Update: 2018-07-24
作者: 瀟湘隱者 出處: http://www.cnblogs.com/kerrycode/ ------------------------------------------類型轉換函式---------------------------------------------- --自動類型轉換, ORACLE 可以自動根據具體情況進行如下轉換: *字串到數值 *字串到日期 *數值到字串 *日期到字串 EX: --*字串到數值
Time of Update: 2018-07-24
常用日期型資料類型:date與TIMESTAMP 二者在資料庫中的儲存固定為7個位元組。 1. 擷取系統時間 select sysdate from dual; --時間格式取決於系統設定 2. 將日期轉字元: select to_char(sysdate,'yy-mm-dd hh24:mi:ss') from dual; --顯示:15-11-25 19:55:42 將字元轉日期: select to_date('2015-11-25
Time of Update: 2018-07-24
對於資料庫表的串連操作在資料看之中一共定義了兩種: 內串連:也成為等值串連(或者成為串連)是最早的一種串連方式,內串連是從別國表中刪除與其他被串連表中沒有匹配行的所有元祖,所以當匹配條件不滿足時內串連可能會丟失資訊,在之前所使用的串連方式都屬於內串連,而在where子句中設定的消除笛卡爾積的條件就採用了等值判斷的方式進行的;