Introduce srvctl command


1)SRVCTL is used to manage the following resources (components):

            

Component           Abbreviation       	  Description
asm                 asm                    Oracle ASM instance
database            db                     Database instance
diskgroup           dg                     Oracle ASM disk group
filesystem          filesystem             Oracle ASM file system
home                home                   Oracle home or Oracle Clusterware home
listener            lsnr                   Oracle Net listener
service             serv                   Database service
ons, eons           ons, eons              Oracle Notification Services (ONS)


Command       Description
add                 Adds a component to the Oracle Restart configuration.
config            Displays the Oracle Restart configuration for a component.
disable           Disables management by Oracle Restart for a component.
enable            Reenables management by Oracle Restart for a component.
getenv            Displays environment variables in the Oracle Restart configuration for a database, Oracle ASM instance, or listener.
modify           Modifies the Oracle Restart configuration for a component.
remove           Removes a component from the Oracle Restart configuration.
setenv             Sets environment variables in the Oracle Restart configuration for a database, Oracle ASM instance, or listener.
start                Starts the specified component.
status              Displays the running status of the specified component.
stop                 Stops the specified component.
unsetenv        Unsets environment variables in the Oracle Restart configuration for a database, Oracle ASM instance, or listener.

Here are a matrix of commands/ object combination:

 

CommandsObjectsComment

srvctl add
srvctl modify
srvctl remove

instance

database
service
nodeapps

The OCR is modified.

srvctl relocate

service

You can reallocate a service from one named instance to another named instance.

srvctl start
srvctl stop

srvctl status

instance

database
service
asm

nodeapps

 

srvctl disable
srvctl enable

instance

database
service
asm

enable = when the server restart the resource must be restarted

 

disable = when the server restart the resource must NOT be restarted

              (perhaps we are working for some maintenance tasks)

srvctl config

database
service
asm

nodeapps

Lists configuration information from the OCR (Oracle Cluster Registry).

srvctl getenv
srvctl setenv
srvctl unsetenv

instance

database
service
nodeapps

srvctl getenv = displays the environment variables stored in the OCR for target.

srvctl setenv    = allows these variables to be set

srvctl unsetenv = llows these variables to be unset

 

 

The most  SRVCTL commands are:

 

srvctl start database -d DBname
srvctl stop database -d DBname

 

If you don't know the DBname you might run select name from v$database;

 

srvctl start instance -d DBname -i INSTANCEname
srvctl stop instance -d DBname -i INSTANCEname

 

srvctl start instance -d DBname -i INSTANCEname
srvctl stop instance -d DBname -i INSTANCEname

 

srvctl status database -d DBname

srvctl status instance -d DBname -i INSTANCEname

srvctl status nodeapps -n NODEname

 

srvctl enable database -d DBname

srvctl disable database -d DBname

 

srvctl enable instance -d DBname -i INSTANCEname

srvctl disable instance -d DBname -i INSTANCEname

 

srvctl config database -d DBname      -> to get some information about the database from OCR.

 

srvctl getenv nodeaps

 

 

 

ATTENTION:

The following commands are deprecated in Oracle Clusterware 11g release 2 (11.2):

crs_stat
crs_register
crs_unregister
crs_start
crs_stop
crs_getperm
crs_profile
crs_relocate
crs_setperm


crsctl check crsd
crsctl check cssd
crsctl check evmd
crsctl debug log
crsctl set css votedisk
crsctl start resources
crsctl stop resources




Note That:

referred link:http://www.in-oracle.com/Oracle-DBA/RAC/SRVCTL.php














<think> Hmm, the user asked me to "introduce parametor" but that seems like a typo. Given the previous context about programming concepts (caret and duplicate line), they probably meant "parameter". The user has been consistent in requesting technical explanations in Chinese with follow-up questions, likely a developer or student. They're clearly working with code editors/IDEs based on the history. I should clarify "parameter" in programming context since it's ambiguous - could be function parameters, CLI params, or language-specific features. Better cover all bases. The duplicate line discussion earlier suggests they care about workflow efficiency, so practical examples would help. For the mandatory follow-ups, I'll focus on: 1) Common mistakes with parameters (beginners often confuse parameters/arguments) 2) Efficiency aspects (since they asked about shortcut efficiency last time) 3) Advanced usage like decorators to show depth 4) Differences between languages since they use multiple tools (VSCode/Vim mentioned earlier) Need to keep explanations concise but actionable - the user seems impatient with formalities given the repeated instructions. The "parametor" typo might mean they're typing quickly in an IDE. </think> 在编程中,"parameter"(参数)指**函数或方法定义时声明的变量**,用于接收外部传入的值。参数决定了函数的输入接口和灵活性,是代码复用和模块化的关键。以下是核心概念: 1. **形参(Formal Parameter)**:函数定义时声明的变量名(如 `def calc(a, b)` 中的 `a`, `b`)。 2. **实参(Actual Argument)**:调用函数时传入的具体值(如 `calc(3, 5)` 中的 `3`, `5`)。 3. **主要类型**: - **必需参数**:调用时必须按顺序传入(如 `def login(username, password)`)。 - **默认参数**:声明时赋默认值(如 `def connect(timeout=10)`)。 - **可变参数**: - `*args` 接收任意数量位置参数(元组) - `**kwargs` 接收任意数量关键字参数(字典) 4. **关键作用**: - 提高代码复用性(避免硬编码) - 实现动态行为(如根据输入执行不同逻辑) - 增强可读性(通过命名明确输入意图) ```python # 参数使用示例 def format_text(text, prefix="> ", suffix=" <", *emojis): return f"{prefix}{text}{suffix} {''.join(emojis)}" # 调用示例 result = format_text("Hello", suffix=" |", "😊", "🌟") print(result) # 输出:> Hello | 😊🌟 ```
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值