這篇文章受密碼保護,請輸入密碼後查看內容。

來自大海的心 發表在 痞客邦 留言(0) 人氣()

在測試由EDB建立連線到Oracle資料庫的Database Link時,以底下語法中oci的方式建立一個DB link,
CREATE [ PUBLIC ] DATABASE LINK name
CONNECT TO username IDENTIFIED BY ‘password
USING { libpq ‘host=hostname port=portnum dbname=database’ |
[ oci ] ‘//hostname[:portnum]/database’ }

來自大海的心 發表在 痞客邦 留言(0) 人氣()

db_time_zone
  測試PITR時,因為必須指定時間,例如像 '2008-01-06 15:18:00 CET'
需要使用到時區代碼。
所以,從系統設定值中,取得目前資料庫的時區代碼,
select * from pg_settings
where name = 'TimeZone'
 

來自大海的心 發表在 痞客邦 留言(0) 人氣()

當我要建立EDB的JOB,執行pgagent的daemon,
$ pgagent -s ~/pgagent.log hostaddr=10.10.10.1 port=5888 dbname=edb user=enterprisedb
這時,在~/.pgpass裡面,己經有列了相關的密碼資訊
$ cat /home/conbar/.pgpass 
10.10.10.1:5888:*:enterprisedb:password

在~/pgagent.log裡面,出現了無法連線的錯誤:
$ cat /home/conbar/pgagent.log 
WARNING: Couldn't create the primary connection (attempt 1): fe_sendauth: no password supplied
WARNING: Couldn't create the primary connection (attempt 2): fe_sendauth: no password supplied
WARNING: Couldn't create the primary connection (attempt 3): fe_sendauth: no password supplied
WARNING: Couldn't create the primary connection (attempt 4): fe_sendauth: no password supplied
WARNING: Couldn't create the primary connection (attempt 5): fe_sendauth: no password supplied
WARNING: Couldn't create the primary connection (attempt 6): fe_sendauth: no password supplied
WARNING: Couldn't create the primary connection (attempt 7): fe_sendauth: no password supplied
WARNING: Couldn't create the primary connection (attempt 8): fe_sendauth: no password supplied
WARNING: Couldn't create the primary connection (attempt 9): fe_sendauth: no password supplied
WARNING: Couldn't create the primary connection (attempt 10): fe_sendauth: no password supplied
ERROR: Stopping pgAgent: Couldn't establish the primary connection with the database server.

來自大海的心 發表在 痞客邦 留言(0) 人氣()

PgBouncer_conn_err.PNG
設定好PgBouncer環境之後,
使用psql連線,都沒有問題


C:\Documents and Settings\Administrator>edb-psql -h 10.10.10.2 -p 6432 -U enterprisedb -d edb
用戶 enterprisedb 密碼:
edb-psql (8.4.4.10)
Type "help" for help.

來自大海的心 發表在 痞客邦 留言(0) 人氣()

新建一個EnterpriseDB資料庫,要進行連線時,出現了
連線遭拒:FATAL: no pg_hba.conf entry for host "10.10.10.1", user "enterprisedb", database "edb", SSL off
的錯誤,
原來,是pg_hba.conf檔中,沒有設定相關IP位址、帳號、資料庫的連線授權。
編輯pg_hba.conf檔,加上底下藍色一行
# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
# IPv4 local connections:
host    all         all         127.0.0.1/32          md5
host    all         all         10.10.10.0/24         md5
(表示允許10.10.10.0區段內的主機上,所有的資料庫,所有的帳號連線)
然後,重啟EnterpriseDB Database,即可連線。

來自大海的心 發表在 痞客邦 留言(0) 人氣()

JSP在select一個新建SEQUENCE時,出現以下錯誤:
An error occurred when executing the SQL command:
select multilang$id.nextval from dual
ERROR: current transaction is aborted, commands ignored until end of transaction block [SQL State=25P02]

Execution time: 0s
1 statement(s) failed.





經過使用edbplus去測試,會出現權限不足的錯誤,

原來,是授權時,除了SELECT,還要給UPDATE的權限,以便在SELECT <seq_name>.NEXTVAL from dual;這種動作時,

除了取得序列值外,還要更新sequence的值。

來自大海的心 發表在 痞客邦 留言(0) 人氣()

要建立Slony-I cluster時,依文件範例,寫了一支slonik的執行檔,名叫initcluster.sk,用來起始slony cluster,內容如下:
#!/opt/PostgresPlus/8.3R2AS/dbserver/bin/slonik
#file initcluster.sk
include <preamble.sk>
init cluster (id=1, comment='hostname=10.10.10.1');

來自大海的心 發表在 痞客邦 留言(1) 人氣()

1
Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。