重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 3435|回复: 0
打印 上一主题 下一主题

[Oracle] 使用oradim创建新的实例、启动删除实例

[复制链接]
跳转到指定楼层
楼主
发表于 2021-3-21 16:55:17 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
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.


2.删除实例
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]


更多内容可以参见官方文档:https://docs.oracle.com/cd/E1188 ... create.htm#NTQRF151
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-11-30 01:31 , Processed in 0.086700 second(s), 20 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表