Oracle中Instance实例和数据库的区别
欢迎进入Oracle社区论坛,与200万技术人员互动交流 >>进入 Oracle中Instance实例和数据库的区别 什么是数据库,其实很简单,数据库就是存储数据的一种媒介。比如常用的文件就是一种,在Oracle10G中,数据的存储有好几种。第一种是文件形式,也就是在你的磁盘
欢迎进入Oracle社区论坛,与200万技术人员互动交流 >>进入
Oracle中Instance实例和数据库的区别
什么是数据库,其实很简单,数据库就是存储数据的一种媒介。比如常用的文件就是一种,在Oracle10G中,数据的存储有好几种。第一种是文件形式,也就是在你的磁盘中创建一批文件,然后在这些文件中存储信息。第二种就是磁盘阵列形式,这个是什么意思呢,这个就是说明数据库不是存放为某个文件,而是把一个或者多个磁盘格式化成Oracle的一种格式了,等于整个磁盘就是存放Oracle数据库的,不能作为别的用途。
这样的优点是存储性能高,因为不再借助别的文件格式了,而是把整个磁盘都成为Oracle最适应的文件系统格式。当然还可能有别的形式,比如网络什么的。不过我们最常用的还是文件格式的,在文件格式中,数据库指的就是那些数据文件,控制文件以及REDO文件等等一系列文件。
而什么是Instance呢,Instance其实就是指的操作系统中一系列的进程以及为这些进程所分配的内存块。在Oracle中,我们可以新建一个Oracle的Instance,这个时候虽然有了进程还有SGA等一系列的内存快,但是这个时候并没有把数据库文件读取进来。所以只是一个实例,在后来,你可以通过命令手动或者自动地把数据库文件加载进我们的数据库Instance中,这个时候的数据库才可以让我们真正的开始访问操作。
www.2cto.com
所以说,数据库的应用如果想实现,数据库和数据库Instance是缺一不可的,如果只有数据库的那些文件,那么,只能代表数据在这个文件中,但是我们无法直接进行操作。而如果只有数据库Instance,那么我们虽然可以急性操作,但是也不知道操作哪些数据,操作生成的数据也无法保存等等。所以,当一个Oracle Instance真正Load了一个Oracle Database了以后,数据库才可以被我们使用。
在这里要注意一点的是,Oracle的实例在启动以后,只能load一次数据库,如果想把数据库与Instance断开,然后再重新挂在一个数据库Instance,那么就需要你首先把数据库Instance进程结束,然后重新建立这个instance的一个进程,再load另外一个数据库。否则肯定要抛除ORA-16169错误,说数据库已经被打开。因为一个数据库Instance在其生存期中最多只能load和打开一个instance。
ORACLE实例 = 进程 + 进程所使用的内存(SGA)
实例是一个临时性的东西,你也可以认为它代表了数据库某一时刻的状态!
数据库 = 重做文件 + 控制文件 + 数据文件 + 临时文件
数据库是永久的,是一个文件的集合。
ORACLE实例和数据库之间的关系
1.
临时性和永久性
2.
实例可以在没有数据文件的情况下单独启动 startup nomount , 通常没什么意义
3.
一个实例在其生存期内只能装载(alter database mount)和打开(alter database open)一个数据库
4.
一个数据库可被许多实例同时装载和打开(即RAC),RAC环境中实例的作用能够得到充分的体现!
下面对实例和数据库做详细的诠释:
在Oracle领域中有两个词很容易混淆,这就是“实例”(instance)和“数据库”(database)。作为Oracle术语,这两个词的定义如下:
q
数据库(database):物理操作系统文件或磁盘(disk)的集合。使用Oracle 10g的自动存储管理(Automatic Storage Management,ASM)或RAW分区时,数据库可能不作为操作系统中单独的文件,但定义仍然不变。
q
实例(instance):一组Oracle后台进程/线程以及一个共享内存区,这些内存由同一个计算机上运行的线程/进程所共享。这里可以维护易失的、非持久性内容(有些可以刷新输出到磁盘)。就算没有磁盘存储,数据库实例也能存在。也许实例不能算是世界上最有用的事物,不过你完全可以把它想成是最有用的事物,这有助于对实例和数据库划清界线。
这两个词有时可互换使用,不过二者的概念完全不同。实例和数据库之间的关系是:数据库可以由多个实例装载和打开,而实例可以在任何时间点装载和打开一个数据库。实际上,准确地讲,实例在其整个生存期中最多能装载和打开一个数据库!稍后就会介绍这样的一个例子。
是不是更糊涂了?我们还会做进一步的解释,应该能帮助你搞清楚这些概念。实例就是一组操作系统进程(或者是一个多线程的进程)以及一些内存。这些进程可以操作数据库;而数据库只是一个文件集合(包括数据文件、临时文件、重做日志文件和控制文件)。在任何时刻,一个实例只能有一组相关的文件(与一个数据库关联)。大多数情况下,反过来也成立:一个数据库上只有一个实例对其进行操作。不过,Oracle的真正应用集群(Real Application Clusters,RAC)是一个例外,这是Oracle提供的一个选项,允许在集群环境中的多台计算机上操作,这样就可以有多台实例同时装载并打开一个数据库(位于一组共享物理磁盘上)。由此,我们可以同时从多台不同的计算机访问这个数据库。Oracle RAC能支持高度可用的系统,可用于构建可扩缩性极好的解决方案。

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

In traditional financial markets, pre-market and after-market trading refers to trading activities outside the regular trading period. Although the cryptocurrency market is trading around the clock, trading platforms like Bitget also offer similar features, especially some comprehensive platforms that trade stocks and cryptocurrencies at the same time. This article will clarify the differences in pre-market and after-market trading and explore its impact on currency price. Four major differences between pre-market and after-market trading: The main differences between pre-market and after-market trading and regular trading periods are in four aspects: trading time, liquidity, price fluctuations and trading volume: Trading time: Pre-market trading occurs before the official trading starts, and after-market trading is carried out after the regular trading ends. Liquidity: The liquidity of pre- and after-hours trading is low, there are few traders, and the bid and offer price difference is large; while the liquidity is high during the regular trading period, the price is

Original title: Bittensor=AIBitcoin? Original author: S4mmyEth, Decentralized AI Research Original translation: zhouzhou, BlockBeats Editor's note: This article discusses Bittensor, a decentralized AI platform, hoping to break the monopoly of centralized AI companies through blockchain technology and promote an open and collaborative AI ecosystem. Bittensor adopts a subnet model that allows the emergence of different AI solutions and inspires innovation through TAO tokens. Although the AI market is mature, Bittensor faces competitive risks and may be subject to other open source

The Bitcoin investment boom continues to heat up. As the world's first decentralized digital asset, Bitcoin has attracted much attention on its decentralization and global liquidity. Although China was once the largest market for Bitcoin, policy impacts have led to transaction restrictions. Today, South Korea has become one of the major Bitcoin markets in the world, causing investors to question the differences between it and its domestic Bitcoin. This article will conduct in-depth analysis of the differences between the Bitcoin markets of the two countries. Analysis of the differences between South Korea and China Bitcoin markets. The main differences between South Korea and China’s Bitcoin markets are reflected in prices, market supply and demand, exchange rates, regulatory supervision, market liquidity and trading platforms. Price difference: South Korea’s Bitcoin price is usually higher than China, and this phenomenon is called “Kimchi Premium.” For example, in late October 2024, the price of Bitcoin in South Korea was once

Artificial intelligence agents (AIAgents) are rapidly integrating into daily operations of enterprises, from large companies to small businesses, almost all areas have begun to be used, including sales, marketing, finance, law, IT, project management, logistics, customer service and workflow automation. We are moving from an era of manual processing of data, performing repetitive tasks, and using Excel tables to an era of autonomous operation by AI agents around the clock, which not only improves efficiency but also significantly reduces costs. Application case of AI agents in Web2: YCombinator's Perspective Apten: A sales and marketing optimization tool combining AI and SMS technology. BildAI: A model that can read architectural blueprints,

This time, the Redstone token $RED will be launched on Binance Launchpool on Binance TGE! This is also the first time Binance has launched a pre-market trading limit mechanism! The first day limit is 200%, and the ban will be lifted after 3 days to avoid "the peak will be achieved when the market opens"! Launchpool mechanism introduces the BinanceLaunchpool participating in Redstone that needs to pledge designated tokens (BNB, USDC, FDUSD) activity period is 48 hours: 08:00 UTC on February 26, 2025 to 08:00 UTC on February 28, 2025 ending this pre-market daily limit rule: 18:00 on February 28, 2025

Nexo: Not only is it a cryptocurrency exchange, but also your digital financial manager. Nexo is not a traditional cryptocurrency exchange, but a financial platform that focuses more on cryptocurrency lending. It allows users to obtain loans in cryptocurrency as collateral and provides services to earn interest. While Nexo also offers cryptocurrency buying, selling and redemption capabilities, its core business is crypto lending. This article will explore the operating model and security of Nexo in depth to provide investors with a more comprehensive understanding. Nexo's operating model was founded in 2018 and is headquartered in Zug, Switzerland, and is a pioneer in the field of digital finance. It is different from other centralized exchanges and focuses more on providing comprehensive financial services. Users can buy, sell, trade cryptocurrencies without selling assets and

The difference between Ethereum and Bitcoin is significant. Technically, Bitcoin uses PoW, and Ether has shifted from PoW to PoS. Trading speed is slow for Bitcoin and Ethereum is fast. In application scenarios, Bitcoin focuses on payment storage, while Ether supports smart contracts and DApps. In terms of issuance, the total amount of Bitcoin is 21 million, and there is no fixed total amount of Ether coins. Each security challenge is available. In terms of market value, Bitcoin ranks first, and the price fluctuations of both are large, but due to different characteristics, the price trend of Ethereum is unique.

Detailed explanation of closing positions in virtual currency trading: Strategies to avoid the risk of liquidation. This article will deeply explore the concept of "closing positions" in the virtual currency market, and clarify the difference between it and "sell", and how to effectively avoid the risk of forced liquidation (filtering positions). What is virtual currency closing? Close positions refers to investors ending existing positions through reverse trading, thereby locking in profits and losses. For example, investors holding long positions (buy) can close their positions by selling equal amounts of virtual currency; investors holding short positions (sell) need to buy equal amounts of virtual currency to close their positions. A closing operation is essentially closing or releasing an established investment position. Is closing a position equal to selling? Although long closing does involve selling operations, closing and selling are not exactly the same. Close position definition: End opened
