search
HomeDatabaseMysql TutorialOracle 01090问题如何解决

1、使用SQL*PLUS 使用SQL*PLUS连接到具有管理员权限的Oracle上,然后发布startup命令,从而启动数据库。2、使用Recovery

Oracle数据库的启动和关闭

启动oracle数据库的同时也就创建了一个数据库实例,并且可以选择数据库启动的状态。通常,可以通过装载和打开数据库来启动实例,这样任何一个有效的用户都可以链接到实例并执行典型的数据库访问操作,下面介绍这方面的内容。

一、启动数据库的方法

启动数据库实例的方法有很多种,分别介绍如下:

1、使用SQL*PLUS         使用SQL*PLUS连接到具有管理员权限的Oracle上,然后发布startup命令,从而启动数据库。

2、使用Recovery   Manager       即使用RMAN来执行startup和shutdown命令来启动和关闭数据库实例。若是在RMAN环境中最好使用这种方法,,而不是调用SQL*PLUS方法。

3、使用Oracle   Enterprise   Manager       可以使用Oracle   Enterprise   Manager来管理oracle数据库,当然也包含启动和关闭数据库。Oracle   Enterprise   Manager是一个独立的oracle数据库产品,它与图形控制台、代理程序、公用服务以及各种工具一起为管理oracle产品提供了一个集成的和复杂的系统管理平台。

启动数据库实例的步骤:以没有连接数据库的方法启动SQL*PLUS:sqlplus   /nolog,然后作为SYSDBA连接到oracle:connect   username/password   as   sysdba,至此,就连接到了oralce数据库,并准备好启动数据库实例。接着使用startup命令来启动数据库实例,oracle必须从服务器参数文件或者传统的文本初始化参数文件中读取实例配置文件。当使用不带pfile子句的startup命令时,oracle将从平台指定的默认位置上的服务器参数文件(spfile)中读取初始化参数。也可以指定初始化参数所在的位置,如startup   pfile=/u01/oracle/dbs/init.ora。

启动数据库实例可以采用不同的模式:

1、启动但没有装载数据库实例,这种模式不允许访问数据库,并且通常只适用于数据库创建或者控制文件的重新创建的情况。要启用这种数据库模式,可以使用命令startup   nomount来启动数据库实例。

2、启动实例并装载数据库,但保持数据库关闭状态。这种模式适用于某些dba的动作,比如重命名数据文件、添加取消或者重命名重做日志文件、执行完整的数据库恢复操作,但不允许对数据库的一般性访问动作。要启用这种数据库模式,可以使用命令startup   mount来启动数据库实例。

3、启动实例,装载并打开数据库。这种模式可以在不受限制的方式下使用,允许所有合法的用户访问。要启用这种数据库模式,可以使用命令startup来启动数据库实例。

4、迫使数据库启动,startup   force。在一些特殊的情况下,可能会在启动数据库实例的时候遇到一些问题。一般不要迫使数据库启动,除非在以下的情况下:使用shutdown   normal、shutdown   immediate、shutdown   transactional命令不能关闭当前的实例。如果正在运行某个实例,那么在重新启动实例前startup   force可以使用abort模式关闭该实例。

二、改变数据库的可用性

可以改变数据库的可用性。这么做的目的也许时因为维护的原因而限制访问或者时数据库只读。

当需要执行特定的数据库管理操作时,必须启动数据库并将其装载在实例上,但数据库必须时关闭的,通过启动实例和装载数据库可以获得这种方案。要装载一个先前打开的数据库,但又不打开实例,可以使用命令:alter   database   mount

通过打开一个数据库,使得已经装载但是还处于关闭状态的数据库用于一般用途,可以使用命令alter   database   open。在执行这条语句之后,任何一个拥有create   session系统权限的有效的oracle用户都能连接到该数据库上。

以只读模式打开数据库。只读模式打开数据库可以保证数据文件和重做日志文件不被重写,但这种模式不会限制数据库的恢复火车或者不生成重做的有关改变数据库状态的操作,例如,可以使数据文件脱机或者联机,因为这些操作不影响数据内容。使用命令alter   database   open   read   only使数据库处于只读状态。也可以使用读写模式打开数据库,alter   database   open   read   write。

三、关闭数据库

要初始化数据库的关闭操作,可以使用sql*plus的shutdown命令,在关闭操作完成之前,控制权不会返回到初始化数据库关闭操作的会话中。当正在进行关闭操作时,若用户试图进行连接,那么他会收到类似下面的信息:

ORA-01090:shutdown   in   progress-connection   is   not   permitted

要关闭数据库实例,必须首先以sysdba或者sysoper进行连接。可以采用多种模式关闭数据库,如,normal、immediate、transactional、abort等。至于他们的含义,请查阅有关资料。

linux

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Explain the role of InnoDB redo logs and undo logs.Explain the role of InnoDB redo logs and undo logs.Apr 15, 2025 am 12:16 AM

InnoDB uses redologs and undologs to ensure data consistency and reliability. 1.redologs record data page modification to ensure crash recovery and transaction persistence. 2.undologs records the original data value and supports transaction rollback and MVCC.

What are the key metrics to look for in an EXPLAIN output (type, key, rows, Extra)?What are the key metrics to look for in an EXPLAIN output (type, key, rows, Extra)?Apr 15, 2025 am 12:15 AM

Key metrics for EXPLAIN commands include type, key, rows, and Extra. 1) The type reflects the access type of the query. The higher the value, the higher the efficiency, such as const is better than ALL. 2) The key displays the index used, and NULL indicates no index. 3) rows estimates the number of scanned rows, affecting query performance. 4) Extra provides additional information, such as Usingfilesort prompts that it needs to be optimized.

What is the Using temporary status in EXPLAIN and how to avoid it?What is the Using temporary status in EXPLAIN and how to avoid it?Apr 15, 2025 am 12:14 AM

Usingtemporary indicates that the need to create temporary tables in MySQL queries, which are commonly found in ORDERBY using DISTINCT, GROUPBY, or non-indexed columns. You can avoid the occurrence of indexes and rewrite queries and improve query performance. Specifically, when Usingtemporary appears in EXPLAIN output, it means that MySQL needs to create temporary tables to handle queries. This usually occurs when: 1) deduplication or grouping when using DISTINCT or GROUPBY; 2) sort when ORDERBY contains non-index columns; 3) use complex subquery or join operations. Optimization methods include: 1) ORDERBY and GROUPB

Describe the different SQL transaction isolation levels (Read Uncommitted, Read Committed, Repeatable Read, Serializable) and their implications in MySQL/InnoDB.Describe the different SQL transaction isolation levels (Read Uncommitted, Read Committed, Repeatable Read, Serializable) and their implications in MySQL/InnoDB.Apr 15, 2025 am 12:11 AM

MySQL/InnoDB supports four transaction isolation levels: ReadUncommitted, ReadCommitted, RepeatableRead and Serializable. 1.ReadUncommitted allows reading of uncommitted data, which may cause dirty reading. 2. ReadCommitted avoids dirty reading, but non-repeatable reading may occur. 3.RepeatableRead is the default level, avoiding dirty reading and non-repeatable reading, but phantom reading may occur. 4. Serializable avoids all concurrency problems but reduces concurrency. Choosing the appropriate isolation level requires balancing data consistency and performance requirements.

MySQL vs. Other Databases: Comparing the OptionsMySQL vs. Other Databases: Comparing the OptionsApr 15, 2025 am 12:08 AM

MySQL is suitable for web applications and content management systems and is popular for its open source, high performance and ease of use. 1) Compared with PostgreSQL, MySQL performs better in simple queries and high concurrent read operations. 2) Compared with Oracle, MySQL is more popular among small and medium-sized enterprises because of its open source and low cost. 3) Compared with Microsoft SQL Server, MySQL is more suitable for cross-platform applications. 4) Unlike MongoDB, MySQL is more suitable for structured data and transaction processing.

How does MySQL index cardinality affect query performance?How does MySQL index cardinality affect query performance?Apr 14, 2025 am 12:18 AM

MySQL index cardinality has a significant impact on query performance: 1. High cardinality index can more effectively narrow the data range and improve query efficiency; 2. Low cardinality index may lead to full table scanning and reduce query performance; 3. In joint index, high cardinality sequences should be placed in front to optimize query.

MySQL: Resources and Tutorials for New UsersMySQL: Resources and Tutorials for New UsersApr 14, 2025 am 12:16 AM

The MySQL learning path includes basic knowledge, core concepts, usage examples, and optimization techniques. 1) Understand basic concepts such as tables, rows, columns, and SQL queries. 2) Learn the definition, working principles and advantages of MySQL. 3) Master basic CRUD operations and advanced usage, such as indexes and stored procedures. 4) Familiar with common error debugging and performance optimization suggestions, such as rational use of indexes and optimization queries. Through these steps, you will have a full grasp of the use and optimization of MySQL.

Real-World MySQL: Examples and Use CasesReal-World MySQL: Examples and Use CasesApr 14, 2025 am 12:15 AM

MySQL's real-world applications include basic database design and complex query optimization. 1) Basic usage: used to store and manage user data, such as inserting, querying, updating and deleting user information. 2) Advanced usage: Handle complex business logic, such as order and inventory management of e-commerce platforms. 3) Performance optimization: Improve performance by rationally using indexes, partition tables and query caches.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor