请教oracle表名中的前缀、后缀的含义。

Higher 2013-12-07 07:20:23
在oracle中表名的前缀、后缀是什么意思,哪位高手给详细解释一下。
如:select * from abc.tablename@def 中abc、def分别是什么意思?
(似乎def是数据库名字,但abc是什么意思呢?)
多谢!
...全文
1078 15 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
15 条回复
切换为时间正序
请发表友善的回复…
发表回复
0o_静心尽力_o0 2015-08-14
  • 打赏
  • 举报
回复
@def 是oracle采用的解析名称技术,通常采用的是本地命名解析,通过读取tnsname.ora文件中对应的def值可以解析到ip地址、端口和服务名,并通过oracle服务器上启动的listener进程进行分配、建立会话。
不写代码的钦 2015-02-01
  • 打赏
  • 举报
回复
前面是用户名、后面是dblink
wangqi_521_csdn 2015-02-01
  • 打赏
  • 举报
回复
select * from abc.tablename@def ABC是SCHEMA 也可以说是用户名。TABLENAME是表名 DEF是DBLINK的名称 是你要访问DEF库下面的ABC.用户下的表
aoxuelingshuang 2015-01-29
  • 打赏
  • 举报
回复
select * from abc.tablename@def abc 指数据库中你使用的用户名 abc.tablename 指用户abc的schema下面的某一个表名 def 实例名,是数据库连接的别名。
请叫我-雷人 2013-12-20
  • 打赏
  • 举报
回复
引用 7 楼 z_shousi 的回复:
[quote=引用 5 楼 u012760284 的回复:] abc是schema,oracle中的模块,通常是指数据库的用户,def是oracle中的dblink,创建dblink用于配置数据库连接的别名,sql的意思是在查询def库中abc用户下的表
+1

Oracle Database uses the global database name to name the schema objects globally using the following scheme:

schema.schema_object@global_database_name

where:

schema is a collection of logical structures of data, or schema objects. A schema is owned by a database user and has the same name as that user. Each user owns a single schema.

schema_object is a logical data structure like a table, index, view, synonym, procedure, package, or a database link.

global_database_name is the name that uniquely identifies a remote database. This name must be the same as the concatenation of the remote database initialization parameters DB_NAME and DB_DOMAIN, unless the parameter GLOBAL_NAMES is set to FALSE, in which case any name is acceptable.

For example, using a database link to database sales.division3.acme.com, a user or application can reference remote data as follows:

SELECT * FROM scott.emp@sales.division3.acme.com;  # emp table in scott's schema
SELECT loc FROM scott.dept@sales.division3.acme.com;
If GLOBAL_NAMES is set to FALSE, then you can use any name for the link to sales.division3.acme.com. For example, you can call the link foo. Then, you can access the remote database as follows:

SELECT name FROM scott.emp@foo;  # link name different from global name
[/quote] +2 鸟语花香啊
gongjie416 2013-12-19
  • 打赏
  • 举报
回复
扫盲了,oracle马上要用到,还不懂
醉爱梁静茹 2013-12-19
  • 打赏
  • 举报
回复
引用 5 楼 u012760284 的回复:
abc是schema,oracle中的模块,通常是指数据库的用户,def是oracle中的dblink,创建dblink用于配置数据库连接的别名,sql的意思是在查询def库中abc用户下的表
+1
  • 打赏
  • 举报
回复
select * from abc.tablename@def 这个后面的是连接服务器的名字
  • 打赏
  • 举报
回复
引用 5 楼 u012760284 的回复:
abc是schema,oracle中的模块,通常是指数据库的用户,def是oracle中的dblink,创建dblink用于配置数据库连接的别名,sql的意思是在查询def库中abc用户下的表
+1

Oracle Database uses the global database name to name the schema objects globally using the following scheme:

schema.schema_object@global_database_name

where:

schema is a collection of logical structures of data, or schema objects. A schema is owned by a database user and has the same name as that user. Each user owns a single schema.

schema_object is a logical data structure like a table, index, view, synonym, procedure, package, or a database link.

global_database_name is the name that uniquely identifies a remote database. This name must be the same as the concatenation of the remote database initialization parameters DB_NAME and DB_DOMAIN, unless the parameter GLOBAL_NAMES is set to FALSE, in which case any name is acceptable.

For example, using a database link to database sales.division3.acme.com, a user or application can reference remote data as follows:

SELECT * FROM scott.emp@sales.division3.acme.com;  # emp table in scott's schema
SELECT loc FROM scott.dept@sales.division3.acme.com;
If GLOBAL_NAMES is set to FALSE, then you can use any name for the link to sales.division3.acme.com. For example, you can call the link foo. Then, you can access the remote database as follows:

SELECT name FROM scott.emp@foo;  # link name different from global name
shenlele088 2013-12-09
  • 打赏
  • 举报
回复
楼上是对的。
空心兜兜 2013-12-08
  • 打赏
  • 举报
回复
def貌似是个dblink
agrr 2013-12-08
  • 打赏
  • 举报
回复
abc 用户名 tablename 表名 def 实例名
狂热的土豆 2013-12-08
  • 打赏
  • 举报
回复
abc是schema,oracle中的模块,通常是指数据库的用户,def是oracle中的dblink,创建dblink用于配置数据库连接的别名,sql的意思是在查询def库中abc用户下的表
大话EPM 2013-12-07
  • 打赏
  • 举报
回复
abc是schema
CT_LXL 2013-12-07
  • 打赏
  • 举报
回复
引用 楼主 Higher 的回复:
在oracle中表名的前缀、后缀是什么意思,哪位高手给详细解释一下。 如:select * from abc.tablename@def 中abc、def分别是什么意思? (似乎def是数据库名字,但abc是什么意思呢?) 多谢!
用户名,表明你查询的表是属于哪个用户

17,382

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 基础和管理
社区管理员
  • 基础和管理社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧