Time of Update: 2017-02-28
3、round函數 ROUND(number, num_digits) 將number四捨五入到只有num_digits個小數位。 4、lpad、rpad函數 lpad()函數的用法: lpad函數將左邊的字串填充一些特定的字元其文法格式如下: lpad(string,n,[pad_string]) string:可是字元或者參數
Time of Update: 2017-02-28
–新增臨時列 alter table tablename add filedname_temp number(2); –將臨時列的值置空 update zyt set id_temp=null; -----#alter table tablename modify filedname null; –將要更新的欄位值挪到臨時列,共置空該列 update tablename set
Time of Update: 2017-02-28
oracle包分為包規範和包體 一:首先建立包規範 create or replace package p_pagewithgroup is -- Author : 肖偉 -- Created : 2014/3/18 -- Purpose : 分組分頁過程 TYPE type_cur IS REF CURSOR; --定義遊標變數用於返回記錄集 PROCEDURE UP_GetRecordWithGroupByPage( tblName in varchar2,
Time of Update: 2017-02-28
一台老的測試AIX伺服器,沒人理過,最近一看Oracle閃回滿了。清理了下。 Version: Oracle 10gR2 for AIX 現象:? 1 2 3 4 5 6 7 SQL&
Time of Update: 2017-02-28
在向orale資料庫匯入資料的時候報 ORA-01658: 無法為資料表空間 XXX中的段建立 INITIAL 區錯誤。 Oracle我在建立資料表空間的時候初始化大小為200M,當資料庫中資料量達到這個值,再向資料庫中匯入資料就會報錯。 解決方案是擴充資料表空間。 可以選擇將表容量擴大,比如擴充到2G,或者當資料表空間不夠時每次自動增加一定的容量,如每次自增200M。 查看各資料表空間分配情況? 1
Time of Update: 2017-02-28
通常將Oracle預存程序編譯為本地編譯方式的測試記錄. 測試用表:? 1 2 3 4 5 6 7 SQL> create table t1(rid number);
Time of Update: 2017-02-28
1 2 3 4 5 6 7 ABS(x) 【功能】返回x的絕對值 【參數】x,數字型運算式 【返回】數字 【樣本】
Time of Update: 2017-02-28
[oraprod@db01 oraprod ]$ sqlplus "/as sysdba" SQL*Plus: Release 11.1.0.7.0 - Production on Mon Mar 17 14:36:41 2014 Copyright (c) 1982, 2008, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition
Time of Update: 2017-02-28
個人實驗的時候有時會用到一些大表,在此分享用dba_objects來建立測試大表的方法: 首先建立測試表 SYS@ORCL>create table test nologging as select rownum id,a.* from dba_objects a where 1=2; Table created. 插入500萬條資料: SYS@ORCL>declare l_cnt number; l_rows
Time of Update: 2017-02-28
1、組函數的用法規則: MySql中組函數在select語句中可以隨意使用,但Oracle中如果查詢語句中有組函數, 那其他列名必須是組函數處理過的,或者group by
Time of Update: 2017-02-28
/*執行一條insert語句並傳參數*/create or replace procedure p_test2(i in number) asbegininsert into t values (i,’x'||to_char(i));commit;end;<%@ page language=”java” contentType=”text/html;charset=gb2312″%><%@page
Time of Update: 2017-02-28
(資料表空間縮容指令碼)] --1、擷取需要釋放空間的資料表空間資訊(包含oracle database自有資料表空間) --drop table system.tbs_detail; create table system.tbs_detail as select a.tablespace_name, a.bytes/1024/1024 "Sum_MB", (a.bytes-b.bytes)/1024/1024
Time of Update: 2017-02-28
學習Oracle是一個漫長艱辛的過程。如果沒有興趣,只是被迫學習,那麼是很難學好的。學習到一定程度的時候,要想進一步提高,就不得不接觸很多Oracle之外的東西,如Unix,如網路、儲存等。因此,要真的決心學好Oracle,就一定要有興趣。有了興趣,就會一切變得簡單快樂起來。簡單總結一下,那就是:興趣、學習、實踐。 如何入門是許多初學者最頭疼的事情。Oracle涉及的方面太多了:SQL、管理、最佳化、備份恢複……那麼從哪開始學好呢?如果在大學期間學過
Time of Update: 2017-02-28
本文執行個體講述了python連結Oracle資料庫的方法。分享給大家供大家參考。具體如下: 這裡使用python連結Oracle資料庫需要引用cx_Oracle庫 ? 1 2 3 4 5 6 7 8 9 10
Time of Update: 2017-02-28
怎麼監控oracle資料庫表和資料表空間的現狀 declare unf number; unfb number; fs1 number; fs1b number; fs2 number; fs2b number; fs3 number; fs3b number; fs4 number; fs4b number; full number; fullb
Time of Update: 2017-02-28
Oracle Linux 6橋接網卡 最近把公司一台老掉牙的舊HP格式化了進行Linux虛擬化,安裝一些測試伺服器。作業系統使用的是Oracle Linux 6.4,虛擬機器使用了KVM。 前面安裝都非常順利,但是到了設定網卡橋接的時候卻出現了問題,像以前5.x一樣設定的br0設定檔根本就沒用,只要一橋接就會出錯,網卡和橋接的虛擬網卡都報錯。 1 eth0: Connection activation failed: Master connection not
Time of Update: 2017-02-28
一次Oracle建庫錯誤的排除,無法在指定的範圍內為以下進程分配連接埠解決 前幾天安裝Oracle資料庫。按照說明配置Linux環境,安裝rpm,然後先安裝10.2.0.1安裝包,完了之後又安裝10.2.0.4補丁,最後打em補丁。到這一切正常,我開始用dbca建立資料庫,結果報錯誤如下: 1 嚴重: 無法在指定的範圍內為以下進程分配連接埠: JMS [5540-5559],RMI [5520-5539],Database Control [5500-5519],EM
Time of Update: 2017-02-28
一、關閉資料庫 [oracle@RHEL5]$sqlplus / as sysdba SQL>shutdown immediate; 二、關監聽 [oracle@RHEL5]$lsnrctl stop 三、刪除oracle_base 我這裡切換到了root [root@RHEL5]#rm -rf /s01 三、清除殘餘檔案 [root@RHEL5]# rm -f /usr/local/bin/dbhome [root@RHEL5]# rm -f
Time of Update: 2017-02-28
問題提示 錯誤提示:ERROR:ORA-12514: TNS:listener could not resolve SERVICE_NAME given in connect 解決方案: 代碼如下 1. 開啟/network/admin/listener.ora檔案,找到: SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = PLSExtProc) (ORACLE_HOME =
Time of Update: 2017-02-28
建立暫存資料表空間建立暫存資料表空間 CREATE TEMPORARY TABLESPACE test_temp TEMPFILE 'C:oracleproduct10.1.0oradataorcltest_temp01.dbf' SIZE 32M AUTOEXTEND ON NEXT 32M MAXSIZE 2048M EXTENT MANAGEMENT LOCAL; 建立資料表空間 CREATE TABLESPACE HISTDB datafile