Object Name Resolution (248)
Object names referenced in SQL statements can consist of several pieces, separated by
periods. The following describes how Oracle resolves an object name.
1. Oracle attempts to qualify the first piece of the name referenced in the SQL
statement. For example, in hr.employees, hr is the first piece. If there is only one
piece, then the one piece is considered the first piece.
a. In the current schema, Oracle searches for an object whose name matches the
first piece of the object name. If it does not find such an object, then it
continues with step b.
b. Oracle searches for a public synonym that matches the first piece of the name.
If it does not find one, then it continues with step c.
c. Oracle searches for a schema whose name matches the first piece of the object
name. If it finds one, then it returns to step b, now using the second piece of
the name as the object to find in the qualified schema. If the second piece does
not correspond to an object in the previously qualified schema or there is not a
second piece, then Oracle returns an error.
If no schema is found in step c, then the object cannot be qualified and Oracle
returns an error.
2. A schema object has been qualified. Any remaining pieces of the name must match
a valid part of the found object. For example, if hr.employees.department_id
is the name, then hr is qualified as a schema, employees is qualified as a table,
and department_id must correspond to a column (because employees is a
table). If employees is qualified as a package, then department_id must
correspond to a public constant, variable, procedure, or function of that package.
Because of how Oracle resolves references, it is possible for an object to depend on the
nonexistence of other objects. This situation occurs when the dependent object uses a
reference that would be interpreted differently were another object present.
解析物件名稱
1. 在 SQL 語句中引用的方案物件名稱可由多段組成,各段之間使用“.”分隔
a. 在當前方案中搜尋名稱與物件名首段相符的物件 , 不存在進入步驟b
b. 搜尋名稱與物件名稱首段相符的公有同義詞 , 不存在進入步驟c
c. Oracle 搜尋名稱與物件名稱首段相符的方案。如果找到一個這樣的方案,則返回步驟 b,使用物件名稱的第二段
在方案中搜尋相符的物件。如果方案中不存在相符的物件,或者引用的物件名稱只由一段構成,則 Oracle 將返回一個錯誤
如果在步驟 c 中沒有找到相符的方案,那麼引用的物件名稱也不能被驗證,Oracle 將返回一個錯誤
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10599713/viewspace-984632/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Resolution of Schema Object Dependencies (241)Object
- [virtualbox] temporary failure in name resolutionAI
- name server cannot be used, reason: Temporary failure in name resolutionServerAI
- IP address could not be resolved: Temporary failure in name resolutionAI
- fatal: Not a valid object name: 'master'ObjectAST
- Temporary failure in name resolution - DNS引發的問題和思考AIDNS
- MySQL could not be resolved: Temporary failure in name resolution報錯解決方法MySqlAI
- Resolving failed: Temporary failure in name resolution 錯誤解決方法AI
- python函式每日一講 - delattr(object, name)Python函式Object
- 寶塔:續簽SSL證書報錯Verification failed, domain name resolution error or verification URL cannot be accessed!AIError
- Solution for Deepin DNS resolution errorDNSError
- [LeetCode] 248. Strobogrammatic Number IIILeetCode
- DB_NAME&TANCE_NAME&DB_UNIQUE_NAME&ORACLE_SID&GLOBAL_NAME&DB_DOMAIN&SERVICE_NAMEOracleAI
- 2021 New Year‘s Resolution
- error: '[class name]' does not name a typeError
- 解決RMAN中 recovery catalog database: ORA-00955: name is already used by an existing objectDatabaseObject
- CUUG 筆記ORACLE db_name instance_name gobal_name service_name db_unique_name分析筆記OracleGo
- 更改Global_name, domain_name, db_name 的方法AI
- Oracle 11G OCP 1Z0-053 248Oracle
- High-Resolution Mandelbrot in Obfuscated PythonPython
- DB_NAME、DB_UNIQUE_NAME、SERVICE_NAME和INSTANCE_NAME等的區別
- Codeforces Round #248 (Div. 2) A. Kitahara Haruki's Gift
- TypeScript 裡的 module 解析過程 - Module ResolutionTypeScript
- Merge two videos into a large resolution videoIDE
- Waiting for clusterware split-brain resolutionAI
- db_name,db_domain, global_name, service_name的區別AI
- Uncaught TypeError: Object [object Object] has no method 'xxx'ErrorObject
- Oracle修改instance_name、db_name、db_unique_name、service_namesOracle
- Codeforces Round #248 (Div. 2) B. Kuriyama Mirai's StonesAI
- rust-quiz:005-trait-resolution-hrtb.rsRustUIAI
- objectObject
- instance_name、db_name、ORACLE_SID、db_name等的區別Oracle
- asp.net mvc get controller name and action nameASP.NETMVCController
- db_name和db_unique_name的區別
- 介面返回[object,Object]解決方法Object
- Effective Object C 2.0 『熟悉Object C』Object
- ORACLE_SID,INSTANCE_NAME和DB_NAMEOracle
- DB_NAME DB_UNIQUE_NAME 和 SID 的理解