Startup(OracleDBStartupMode, bool)
This method starts up the database using the specified startup mode.
Declaration
// C# public void Startup(OracleDbStartupMode startupMode, bool bMountAndOpen);
Parameters
startupMode
- An OracleDBStartupMode
enumeration value.
bMountAndOpen
- A true
/false
value signifying whether the database is to be mounted and opened.
Exceptions
OracleException
- The database startup request has failed.
Remarks
This method starts a database instance in the specified mode. After the database is successfully started, and if bMountAndOpen
input parameter is true
, this method also executes the ALTER DATABASE MOUNT
and ALTER DATABASE OPEN
statements.
If bMountAndOpen
is true
, then this method does not throw an exception for cases where the database is already mounted, opened, or started appropriately. If other errors are encountered, then an exception is thrown.
If bMountAndOpen
is false
, then the database must be mounted and opened explicitly by the application. For example, if db
is an instance of the OracleDatabase
class, then the application invokes the following:
-
db.Startup(OracleDBStartupMode.NoRestriction, false);
-
db.ExecuteNonQuery("ALTER DATABASE MOUNT");
-
db.ExecuteNonQuery("ALTER DATABASE OPEN");