使用oradim创建新的实例、启动删除实例
更新时间: 2021-03-26 15:06
oradim是oracle在Windows上的一个命令行工具,能够用来手动创建、删除、修改实例oradim -? | -h | -help 可以查看具体用法 1.创建实例: oradim [-NEW -SID SID] | -SRVC service_name | -ASMSID SID | -ASMSRVC service_name [-SYSPWD password] [-STARTMODE auto | manual] [-SRVCSTART system | demand] [-PFILE filename | -SPFILE] [-SHUTMODE normal | immediate | abort] [-TIMEOUT secs] [-RUNAS osusr/ospass] 其中: -NEW indicates that you are creating a new instance. This is a mandatory parameter. -SID SID is the name of the instance to create. -SRVC service_name is the name of the service to create (OracleServiceSID). -ASMSID SID is the name of the Automatic Storage Management instance to create. -ASMSRVC service_name is the name of the Automatic Storage Management service to create. -SYSPWD password is the system password. -STARTMODE auto | manual indicates whether to start the instance when the Oracle Database service is started. Default is manual. -SRVCSTART system | demand indicates whether to start the Oracle Database service on computer restart. Default is demand. Here, system specifies that the service be configured to automatically start when the system boots or reboots. Demand specifies that the user has to explicitly start the service. -PFILE filename is the initialization parameter file to be used with this instance. Ensure that you specify the complete path name of this file, including drive letter. -SPFILE indicates that a server parameter file (SPFILE) be used during startup instead of a PFILE. -SHUTMODE normal|immediate|abort specifies how to stop an instance. This is an optional parameter. If you do not specify how to stop an instance, thennormal is the default mode.-SHUTMODE requires an argument and the default is immediate. If SHUTMODE is omitted, then there is no attempt made to shutdown the instance when the service is shutdown. -TIMEOUT secs sets the maximum time to wait (in seconds) before the service for a particular SID stops. The default is 90 seconds. It cannot be used without the SHUTDOWN argument. -RUNAS osusr/ospass ("run as") sets the operating system user with which the Oracle service logs on to the system. You supply an operating system user name and password, and the service logs on and runs with the privileges of that user. If omitted, the service logs on to the system using the Local system account, which is a privileged user. oradim -DELETE -SID SID | -ASMSID SID | -SRVC service_name | -ASMSRVC service_name 其中: -DELETE indicates that you are deleting an instance or service. This is a mandatory parameter. -SID SID specifies the name of the SID to delete. -SRVC service_name specifies the name of the service to delete (OracleServiceSID). User should specify either SID or SRVC. -ASMSID SID is the name of the Automatic Storage Management instance to delete. -ASMSRVC service_name is the name of the Automatic Storage Management service to delete. 3.启动实例 oradim -STARTUP -SID SID | -ASMSID SID [-SYSPWD password] [-STARTTYPE srvc | inst | srvc,inst] [-PFILE filename | -SPFILE] |