這篇文章受密碼保護,請輸入密碼後查看內容。
- Dec 09 Fri 2011 09:38
-
EnterpriseDB 問題處理經驗備忘錄 [持續更新中]
- Jan 19 Wed 2011 13:25
-
EenterpriseDB建立連線到Oracle資料庫DB link,引用時出現ORA-12705錯誤
在測試由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’ }
CREATE [ PUBLIC ] DATABASE LINK name
CONNECT TO username IDENTIFIED BY ‘password’
USING { libpq ‘host=hostname port=portnum dbname=database’ |
[ oci ] ‘//hostname[:portnum]/database’ }
- Dec 14 Tue 2010 16:55
-
EnterpriseDB取得目前資料庫之時區代碼

測試PITR時,因為必須指定時間,例如像 '2008-01-06 15:18:00 CET'
需要使用到時區代碼。
所以,從系統設定值中,取得目前資料庫的時區代碼,
select * from pg_settings
where name = 'TimeZone'
- Sep 24 Fri 2010 11:23
-
啟動pgagent時,出現 WARNING: Couldn't create the primary connection (attempt 1): fe_sendauth: no password supplied 錯誤
當我要建立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.
$ 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.
- Sep 07 Tue 2010 11:08
-
PgBouncer連線錯誤 - Unknown startup parameter

設定好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.
- Sep 07 Tue 2010 10:18
-
連線遭拒:FATAL: no pg_hba.conf entry for host "10.10.10.1", user "enterprisedb", database "edb", SSL off
新建一個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,即可連線。
連線遭拒: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,即可連線。
- Jul 08 Thu 2010 13:21
-
錯誤:ERROR: current transaction is aborted, commands ignored until end of transaction block [SQL State=25P02]
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.
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的值。
- Jul 07 Wed 2010 18:22
-
錯誤:failed to parse EnterpriseDB 8.3.0.112 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.1.0 for DB version
要建立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');
#!/opt/PostgresPlus/8.3R2AS/dbserver/bin/slonik
#file initcluster.sk
include <preamble.sk>
init cluster (id=1, comment='hostname=10.10.10.1');
1