[20210723]Database link and user defined datatypes.txt
[20210723]Database link and user defined datatypes.txt
--//如何透過db link訪問使用者定義型別.按照連結做測試.
1.環境:
SCOTT@book> @ ver1
PORT_STRING VERSION BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
2.測試:
create type tt as object (x number);
/
create table t (x tt);
insert into t values (tt(1));
commit;
SCOTT@book> select t.x.x from t t;
X.X
----------
1
--//OK,本地訪問沒有問題.
CREATE PUBLIC DATABASE LINK LOOPBACK USING 'localhost:1521/book';
SCOTT@book> select t.x.x from t@LOOPBACK t;
X.X
----------
1
--//採用本地loopback測試不出來.
3.繼續:
CREATE PUBLIC DATABASE LINK L78
CONNECT TO SCOTT
IDENTIFIED BY <Password>
USING '192.168.100.78:1521/book';
SCOTT@test> select sysdate from dual@l78;
SYSDATE
-------------------
2021-07-23 09:47:24
--//OK.
SCOTT@test> select t.x.x from t@L78 t;
select t.x.x from t@L78 t
*
ERROR at line 1:
ORA-22804: remote operations not permitted on object tables or user-defined type columns
SCOTT@test> select type_name,TYPE_OID from user_types@L78;
TYPE_NAME TYPE_OID
------------------------------ --------------------------------
TT C7C175F2E6ED5C33E0534E64A8C010B5
SCOTT@test> create type tt oid 'C7C175F2E6ED5C33E0534E64A8C010B5' as object(x number)
2 /
Type created.
--//視乎建立的type不指定可以唯一.
SCOTT@test> select t.x.x from t@L78 t;
X.X
----------
1
--//感覺type的東西很少用,做一個記錄.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2782847/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 12.2 使用Database Link優化Standby Database WorkloadOracleDatabase優化
- Access denied for user 'default'@'%' to database 'shop'報錯Database
- Failed to execute user defined function(anonfun$concatStr$1: (map<string,string>, string) => string)AIFunction
- User Defined Runtime Attributes (使用者定義的執行時屬性)
- [20210723]Minimum sga_target.txt
- 【本人親測 已解決】044 - Access denied for user ‘root‘@‘%‘ to database ‘資料庫名稱‘Database資料庫
- ReferenceError: webpack is not definedErrorWeb
- [20210723]adrci show 'No ADR base is set' 解決辦法.txt
- __dirname is not defined in ES module scope
- Useful link
- The database owner SID recorded in the master database differs from the database owner SID recorded in database 'DB_NAME'DatabaseAST
- oracle user$Oracle
- Author: ** not defined in users.txt file
- 【VS】_WIN32_WINNT not definedWin32
- spring getBean(String) No bean named '' is definedSpringBean
- what is conversion exit defined in ABAP domainAI
- The bean ‘xxx‘, defined in class path resource , ......Bean
- ELEC5517: Software Defined Networks
- Oracle Database Cloud - Database as a Service Quick StartOracleDatabaseCloudUI
- Error querying database. XXXXXXXXXXXXX, No database selected。ErrorDatabase
- Convert a Physical Standby Database into a Snapshot Standby DatabaseDatabase
- PRVF-4007 : User equivalence check failed for user "grid"UIAI
- TestFlight Public Link
- 快速瞭解:user-valid和:user-invalid
- Database TimeoutDatabase
- Database OverallDatabase
- database no shardingDatabase
- audit by user by table
- Vue @user 元件Vue元件
- User Account Control
- MyBatis-maven-User例子-根據id查詢UserMyBatisMaven
- Oracle data link建立Oracle
- useful link for compiling segmap
- 報錯ReferenceError: require is not defined,找不到requireErrorUI
- VS error LNK2005:**already defined in **.objErrorOBJ
- Oracle OCP(28):USEROracle
- Auth::user() 踩坑
- user表的改