【DBLINK】不可使用 DBLINK在遠端資料庫上執行DDL類SQL
很少使用dblink在遠端資料庫中建立表,今天偶爾嘗試,收穫的是“ORA-02021”錯誤。錯誤本身提示的資訊已經非常的明顯:在遠端資料庫不可以執行DDL型別的SQL語句。
簡單記錄一下,供參考。
1.嘗試使用dblink在遠端資料庫建立表
sec@ora10g> create table t@dblink_to_ora10 as select * from t;
create table t@dblink_to_ora10 as select * from t
*
ERROR at line 1:
ORA-02021: DDL operations are not allowed on a remote database
此處的錯誤資訊已經非常的明顯。
2.使用oerr工具可以查詢到如下的解釋
ora10g@secDB/home/oracle$ oerr ora 2021
02021, 00000, "DDL operations are not allowed on a remote database"
// *Cause: An attempt was made to use a DDL operation on a remote database.
// For example, "CREATE TABLE tablename@remotedbname ...".
// *Action: To alter the remote database structure, you must connect to the
// remote database with the appropriate privileges.
3.MOS中的[ID 19304.1]文章也有同樣的描述
Error: ORA 2021
Text: DDL operations are not allowed on a remote database
-------------------------------------------------------------------------------
Cause: An attempt was made to use a DDL operation on a remote database.
For example, "CREATE TABLE tablename@remotedbname...".
Action: To alter the remote database structure, you must connect to the remote
database with the appropriate privileges.
4.小結
嘗試--> 遇到問題 --> 根據提示資訊分析問題 --> 總結問題 --> 提高。
Good luck.
secooler
10.04.11
-- The End --
簡單記錄一下,供參考。
1.嘗試使用dblink在遠端資料庫建立表
sec@ora10g> create table t@dblink_to_ora10 as select * from t;
create table t@dblink_to_ora10 as select * from t
*
ERROR at line 1:
ORA-02021: DDL operations are not allowed on a remote database
此處的錯誤資訊已經非常的明顯。
2.使用oerr工具可以查詢到如下的解釋
ora10g@secDB/home/oracle$ oerr ora 2021
02021, 00000, "DDL operations are not allowed on a remote database"
// *Cause: An attempt was made to use a DDL operation on a remote database.
// For example, "CREATE TABLE tablename@remotedbname ...".
// *Action: To alter the remote database structure, you must connect to the
// remote database with the appropriate privileges.
3.MOS中的[ID 19304.1]文章也有同樣的描述
Error: ORA 2021
Text: DDL operations are not allowed on a remote database
-------------------------------------------------------------------------------
Cause: An attempt was made to use a DDL operation on a remote database.
For example, "CREATE TABLE tablename@remotedbname...".
Action: To alter the remote database structure, you must connect to the remote
database with the appropriate privileges.
4.小結
嘗試--> 遇到問題 --> 根據提示資訊分析問題 --> 總結問題 --> 提高。
Good luck.
secooler
10.04.11
-- The End --
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/519536/viewspace-631838/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 通過dblink,資料泵expdp遠端跨版本導庫
- 配置達夢資料庫同構DBLINK資料庫
- 如何通過DBLINK取remote DB的DDLREM
- Oracle DBLink跨資料庫訪問SQL server資料同步 踩坑實錄Oracle資料庫SQLServer
- SQL Server建立dblink至MySQLServerMySql
- 配置ORACLE資料庫到達夢資料庫的異構DBLINKOracle資料庫
- 【等待事件】SQL*Net message from dblink事件SQL
- 建立dblink
- 【等待事件】SQL*Net more data from dblink事件SQL
- ORACLE dblink遠端DB表truncat導致本地proc執行報錯ORA-12012&ORA-06550&PLS-00907Oracle
- 配置Oracle DBlink連線MySQL庫OracleMySql
- sql中select列有自定義函式 dblinkSQL函式
- PostgreSQL DBA(58) - DBLinkSQL
- 不能刪除DBLINK
- Oracle資料庫連結(DBLink)中如何訪問包含BLOB欄位的資料Oracle資料庫
- 在Ubuntu上使用MySQL設定遠端資料庫優化站點效能UbuntuMySql資料庫優化
- dblink建立語句模板
- powerbuildr中如何使用dblink連線的表UI
- oracle dblink用法總結和expdp和impdp利用dblink倒入匯出到本地Oracle
- PL/SQL Developer連線遠端Oracle資料庫SQLDeveloperOracle資料庫
- SQL Server 2014如何使用遊標迴圈向遠端資料庫插入資料SQLServer資料庫
- MsSql資料庫使用SQL plus建立DDL和DML操作方法SQL資料庫
- EBS:Oracle 資料庫執行慢SQLOracle資料庫SQL
- 如何在 12.2.0.1 透過 dblink 線上複製 PDB
- Oracle dblink監聽問題Oracle
- PostgreSQL DBA(68) - 使用DBLink實現自治事務SQL
- 【DBLINK】DBLINK域名問題及與global_name和db_domian的關係
- 暑期自學 Day 09 | 資料庫(一)- SQL,DDL資料庫SQL
- Classy:根據資料庫表在執行時建立類/模型資料庫模型
- 如何通過 SSH 在遠端 Linux 系統上執行命令Linux
- 在登入資料庫的使用!sql資料庫SQL
- 乾貨好文:分散式資料庫DDL的編譯與執行分散式資料庫編譯
- [20210201]dblink建立連線串使用ENABLE=BROKEN.txt
- dblink涉及的表的賦權
- MySQL下的DBlink--FEDERATED引擎MySql
- 演算法相同,純SQL在資料庫內執行 與Golang呼叫database. SQL執行的速率?演算法SQL資料庫GolangDatabase
- 在Pycharm上使用遠端伺服器進行除錯PyCharm伺服器除錯
- Laravel 使用 sql 語句 和 sql 檔案 來建立執行資料庫遷移LaravelSQL資料庫
- Oracle資料庫SQL語句執行過程Oracle資料庫SQL