Oracle数据库的global
Oracle数据库的global_name,在Database Link与GLOBAL_NAMES参数一文中提到了,设置global_names初始化参数为true后,本地的数据库链接名称必须与远程数据库的global_name相同,才能正常使用数据库链接。那么怎么查询数据库的global_name呢? SQL col global
Oracle数据库的global_name,在Database Link与GLOBAL_NAMES参数一文中提到了,设置global_names初始化参数为true后,本地的数据库链接名称必须与远程数据库的global_name相同,才能正常使用数据库链接。那么怎么查询数据库的global_name呢?
SQL> col global_name for a30
SQL> select * from global_name;GLOBAL_NAME
------------------------------
DMDB
那么怎么样修改global_name?
ALTER DATABASE
RENAME GLOBAL_NAME TO NEW_NAME;
注意不要直接用update global_name set global_name=”将global_name设置为空,否则数据库不能启动,会报ORA-00600[18061] 或 ORA-00600[18062]这样的错误。 只有用备份进行恢复后才能打开。(参见metalink note 743676.1)。
那么global_name到底是个什么对象呢?
SQL> select owner,object_name,object_type from dba_objects where object_name=’GLOBAL_NAME’;
OWNER OBJECT_NAME OBJECT_TYPE
---------- -------------------- --------------------
SYS GLOBAL_NAME VIEW
PUBLIC GLOBAL_NAME SYNONYMSQL> select text from dba_views where view_name=’GLOBAL_NAME’;
TEXT
----------------------------------------------------------------
select value$ from sys.props$ where name = ‘GLOBAL_DB_NAME’
可以看到global_name实际上是一个视图,来源于sys.props$表,而这个表是非常重要的一个关于数据库属性的表,不要随意更改此表的内容,否则将引起无可预料的、无法挽回的损失。
在用alert database rename global_name时,如果设置了global_name类似于”dmdb.com”这样的名称,则以后更改名称,则没有常规的办法去掉”.”分隔符了。
SQL> select * from global_name;
GLOBAL_NAME
------------------------------
DMDBSQL> alter database rename global_name to dmdb.com;
Database altered.
SQL> select * from global_name;
GLOBAL_NAME
------------------------------
DMDB.COMSQL> alter database rename global_name to dmdb.cn;
Database altered.
SQL> select * from global_name;
GLOBAL_NAME
------------------------------
DMDB.CNSQL> alter database rename global_name to dmdb;
Database altered.
SQL> select * from global_name;
GLOBAL_NAME
------------------------------
DMDB.CNSQL> alter database rename global_name to dm;
Database altered.
SQL> select * from global_name;
GLOBAL_NAME
------------------------------
DM.CNSQL> alter database rename global_name to dm.com.cn;
Database altered.
SQL> select * from global_name;
GLOBAL_NAME
------------------------------
DM.COM.CNSQL> alter database rename global_name to dmdb;
Database altered.
SQL> select * from global_name;
GLOBAL_NAME
------------------------------
DMDB.COM.CN
SQL> alter database rename global_name to dmdb.net;Database altered.
SQL> select * from global_name;
GLOBAL_NAME
------------------------------
DMDB.NET
要去掉点分隔符,只有用update:
SQL> update global_name set global_name=’DMDB’;
1 row updated.
SQL> commit;
Commit complete.
SQL> select * from global_name;
GLOBAL_NAME
------------------------------
DMDB
郑重提示:除非万不得已,不要去更新global_name视图,即时更新,也不要去更新global_name的基表props$,更不要将global_name更新为空。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Apple's latest releases of iOS18, iPadOS18 and macOS Sequoia systems have added an important feature to the Photos application, designed to help users easily recover photos and videos lost or damaged due to various reasons. The new feature introduces an album called "Recovered" in the Tools section of the Photos app that will automatically appear when a user has pictures or videos on their device that are not part of their photo library. The emergence of the "Recovered" album provides a solution for photos and videos lost due to database corruption, the camera application not saving to the photo library correctly, or a third-party application managing the photo library. Users only need a few simple steps

How to use MySQLi to establish a database connection in PHP: Include MySQLi extension (require_once) Create connection function (functionconnect_to_db) Call connection function ($conn=connect_to_db()) Execute query ($result=$conn->query()) Close connection ( $conn->close())

To handle database connection errors in PHP, you can use the following steps: Use mysqli_connect_errno() to obtain the error code. Use mysqli_connect_error() to get the error message. By capturing and logging these error messages, database connection issues can be easily identified and resolved, ensuring the smooth running of your application.

The official website of Gate.io can be accessed by clicking on the link or entering the URL in the browser. It is recommended to add the URL to a bookmark or favorite for easy access. If you encounter inaccessible issues, try clearing the browser's cache and cookies. Be careful to prevent phishing, the official website of Gate.io will not take the initiative to ask for personal information. In addition, Gate.io provides mobile applications that can be found through the app provider

BitMEX exchange currency withdrawal requirements: Two-step verification and identity verification must be completed. The minimum amount of withdrawal varies by currency. The withdrawal process includes logging into the account, entering the withdrawal address, entering the amount and confirming transactions. The advantages of BitMEX withdrawal include fast processing, low handling fees, multiple currency support and strict security measures. However, it also faces shortcomings such as insufficient supervision, risk of hacker attacks, restrictions on withdrawals and account freezes.

How to integrate GoWebSocket with a database: Set up a database connection: Use the database/sql package to connect to the database. Store WebSocket messages to the database: Use the INSERT statement to insert the message into the database. Retrieve WebSocket messages from the database: Use the SELECT statement to retrieve messages from the database.

Transactions on TREZOR Connect the TREZOR device and install the TREZORBridge application. Open the TREZOR suite and select the transaction type (send, receive, or redeemed). Enter transaction details (address, amount, fee, etc.). Check the details and press Confirm on the TREZOR device to authorize the transaction.

The top ten digital currency trading apps in 2025 are: Binance, OKX, Gate.io, Bitget, Huobi, KuCoin, BitMart, Bybit, Bitfinex, and Poloniex. These transactions stand out in the market for their trading volume, asset selection, leveraged trading, social trading, compliance, ease of use, low transaction fees and fund security.
