SRVCTL Command detailed documentation (original translation)

Source: Internet
Author: User
Tags format config file system sql variables variable domain domain name

SRVCTL command detailed documentation (translation)



Brief introduction:



Srvctl is a tool for oracle9i RAC cluster configuration management. This article is a reference document detailing all the commands for Srvctl.



Reader object: oracle9i RAC database Cluster Administrator.



Note:

Rac:real Application Clusters

Srvm:server Management

-------------------------------------------------------------------------------



L SRVCTL ADD



Add configuration information for a database or instance. In the Add instance, the name specified with-I should match the instance_name and Oracle_sid parameters.



SRVCTL Add database-d database_name [-M domain_name]-O oracle_home [-S SPFile]



Srvctl add instance-d database_name-i instance_name-n node_name







Table 4-5 SRVCTL add Command detail options



-------------------------------------------------------------------------------



Command options



-------------------------------------------------------------------------------



-m database domain name format such as "Us.mydomain.com"



The database domain name specified by the-m option must match the Db_domain and db_name parameters in the database Init.ora or SPFile. When adding a database, the database name specified by-D must match the db_name parameter



-N Instance Section roll Call



-O $ORACLE _home (used to determine command paths such as Lsnrctl and ORACLE)



-S SPFILE filename



-------------------------------------------------------------------------------



instance: adding a new database



Srvctl Add database-d mydb-o/ora/ora9







Instance: Adding an instance to a database



Srvctl add instance-d mydb-i mydb01-n gm01



Srvctl add instance-d mydb-i mydb02-n gm02



Srvctl add instance-d mydb-i mydb03-n gm03







L SRVCTL Config



Displays the configuration information saved in the SRVM configuration file



Srvctl Config Database



Display the list of database configurations



Srvctl Config database-d database_name



format for displaying database configuration information:



Nodename1 instancename1 Oraclehome



Nodename2 instancename2 Oraclehome



Instance: displaying database configuration information



Srvctl config database-d mydb







L SRVCTL Getenv



The getenv action is used to obtain and display environment variables from the SRVM configuration file



SRVCTL getenv database-d database_name [-t name[,name,...]]



Srvctl getenv instance-d database_name-i instance_name [t name[,name,...]]



Instance: Lists all environment variables for the database



Srvctl getenv database-d MyDB







L SRVCTL Modify



Modify the node configuration information for the instance. These modifications will take effect the next time the program restarts. The modified information will be permanently saved.



Srvctl Modify instance-d database_name-i instance_name-n node_name



Instance: Modifying an instance to another node



Srvctl Modify Instance-d mydb-n My_new_node







L SRVCTL Remove



This is the command used to remove configuration information from the SRVM library. The environment settings associated with the object are also deleted. If you do not use the Force flag (-F), Oracle will prompt you to confirm the deletion.



The delete operation will not prompt with the Force option (-f)



SRVCTL Remove database-d database_name [-f]



Srvctl Remove instance-d database_name-i instance_name [f]







SRVCTL Remove Command detail options



-------------------------------------------------------------------------------



-F Force Delete application without confirmation prompt



-------------------------------------------------------------------------------



instance: Deleting a database



Srvctl Remove Database-d mydb



instance: Deleting a database instance



Srvctl Remove instance-d mydb-i mydb01



Srvctl Remove instance-d mydb-i mydb02



Srvctl Remove instance-d mydb-i mydb03







L SRVCTL setenv



Set the environment variable value in the SRVM configuration file.



Srvctl setenv database-d database_name-t name=value [, Name=value,...]



SRVCTL setenv instance-d database_name [-I instance_name]-t name=value [, Name=value,...]







Instance: Setting Database environment variables



Srvctl setenv database-d mydb-t lang=en







L SRVCTL Start



Starts the database, all instances, or specified instances, and initiates all related, not-started listening.



-------------------------------------------------------------------------------



Note:



For the start command and other operations that can use a connection string, if you do not supply a connection string, Oracle uses "/as SYSDBA" to perform the relevant action on the instance. In addition, to perform a similar operation, you must be a member of the OSDBA group. For more information on OSDBA group permissions, refer to the Oracle9i Installation Guide.



-------------------------------------------------------------------------------



Srvctl start database-d database_name [-O start_options] [-c connect_string]



Srvctl start instance-d database_name-i instance_name [, instance_name-list] [-O start_options] [-c connect_string]



Table 4-6 SRVCTL Start command detail options



-------------------------------------------------------------------------------



Command options



-------------------------------------------------------------------------------



The startup command option that is passed directly in Sql*plus can include Pfile



-C connection string using Sql*plus Connection database instance



-------------------------------------------------------------------------------



Instance: Starting the database and all instances



Srvctl Start database-d mydb



Instance: Starting the specified instance



Srvctl Start instance-d mydb-i mydb1,mydb4



L SRVCTL Status



Displays the current status of the specified database



SRVCTL Status database-d database_name



Srvctl status instance-d database_name-i instance_name [, Instance_name-list]



Instances: Displaying data and all instance states



Srvctl Status Database-d mydb



Instance: Displays the status of the specified instance



Srvctl Status instance-d mydb-i mydb1,mydb2



L SRVCTL Stop



Stop all instances of a database to specify an instance



Srvctl Stop database-d database_name [-O stop_options] [-c connect_string]



Srvctl stop instance-d database_name-i instance_name [, instance_name_list] [-O stop_options][-c connect_string]



Table 4-7 SRVCTL Stop Command detail options



-------------------------------------------------------------------------------



Command options



-------------------------------------------------------------------------------



-C connection string using Sql*plus Connection database instance



-O shutdown command options passed directly in Sql*plus



-------------------------------------------------------------------------------



Instance: Stopping all instances of the database



Srvctl Stop database-d MyDB



Instance: Stopping the specified instance



Srvctl Stop instance-d mydb-i mydb1



L SRVCTL unsetenv



To cancel an environment variable definition value in a SRVM configuration file



Srvctl unsetenv database-d database_name-t name[,name,...]



Srvctl unsetenv instance-d database_name[-i instance_name]-t name[,name,...]



Instance: Cancel environment variable, return to default value



Srvctl unsetenv database-d mydb-t CLASSPATH



L Import and export raw device configuration information using Srvconfig



You can import and export raw device configuration information using Srvconfig regardless of whether the profile is on a clustered file system or on a raw device. You can use this method to back up and restore SRVM configuration information.



For example:



The following command is used to export the contents of the configuration information to the text file of the file name you specified.



Srvconfig-exp file_name



The following command is used to import configuration information from the specified text file to the RAC environment configuration repository where you run the command.



Srvconfig-imp file_name







Ye Zhengxing (translation)



2005-04-03








Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.