新裝了一個ORACLE 11.2.0,建了一個instance——orcl,卻發現串連不上資料庫,說是sid given in connect descriptor could not be resolved.關了防火牆,不work。用regedit.exe查了一下註冊表,ORACLE_SID和ORACLE_HOME都是預定的值。後來使用lsnrctl stat檢測監聽器狀態,去查正在啟動並執行instance,發現不是自己建的那個instance。是CLRExtPrc。於是想到去C:\app\
字元集修改有2中辦法:1)原庫匯出,然後重建立立新字元集的新庫,再匯入,這裡需要注意匯出匯入用戶端字元集。2)ALTER DATABASE CHARACTER SET步驟如下:A.備份資料庫(一定需要,失敗可恢複)B.關閉資料庫shutdown immediate,啟動到mountC.啟用restrict session alter system enable resricted sessionD.確認沒有job運行,沒有高可用等傳輸功能在運行E.開啟資料庫 alter database
RMAN> startup nomount;RMAN> sql 'alter session set nls_date_format=''yyyy-mm-dd hh24:mi:ss''";--因為rman預設以環境變數來讀取時間格式,與sqlplus的固定格式不同,所以,此處要設定時間格式變數。RMAN> restore controlfile from autobackup until time '2009-03-10
比如現在有一人員表 (表名:peosons) 若想將姓名、社會安全號碼、住址這三個欄位完全相同的記錄查詢出來 select p1.* from persons p1,persons p2 where p1.id<>p2.id and p1.cardid = p2.cardid and p1.pname = p2.pname and p1.address =
1、把主鍵定義為自動成長標識符類型在mysql中,如果把表的主鍵設為auto_increment類型,資料庫就會自動為主鍵賦值。例如:create table customers(id int auto_increment primary key not null, name varchar(15));insert into customers(name) values("name1"),("name2");select id from
Oracle Database Development (6). A first exploration of OCI Vert MelonJun 25,20071.Preface Last time , i provided a full example of OCI , which contains the actual code of connection and SQL . Certainly it could not cover all of the knowledge , but