• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 586
  • Last Modified:

how to stop askking parameter yes when executing srvctl remove service


I am using script to remove the service.  But when i am removing the service it is aksing for y/n.
So, the script stops at that point.

How to pass the parameter yes to the command  it self.

srvctl remove service -d <dbname> -s <service_name>

asking for y/n

How to stop asking the parameter y/n.


Thanks,
0
gopisera
Asked:
gopisera
  • 3
  • 2
5 Solutions
 
slightwv (䄆 Netminder) Commented:
There doesn't appear to be a document flag like -y for remove database but I would try it to see if it is undocumented.

http://download.oracle.com/docs/cd/E14072_01/server.112/e10595/restart005.htm#i1010691

If it doesn't work, what OS?  You might be able to pipe the 'Y' into the command or use redirects.
0
 
PilouteCommented:
Hi,

Isn't that only an approval request ? Like 'do you really want to remove it ?'.

In that case, have you tryed adding '-f' flag, that forces the remove action ?

Cheers,
P
0
 
slightwv (䄆 Netminder) Commented:
Probably to script it without human intervention.

Didn't think about trying -f.  My guess is it will still prompt for confirmation.
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
PilouteCommented:
Quote from the 10g RAC Admin doc :

If you do not use the force flag (-f), then Oracle prompts you to confirm whether to proceed. If you use the force (-f) option, then the remove operation proceeds without prompting and continues processing even when it encounters errors. Even when the CRS resources cannot be removed, the OCR configuration is removed, so that the object now appears not to exist, but there are still CRS resources. Use the -f option with extreme caution because this could result in an inconsistent OCR.

Have no environment to test it right now, but it is supposed to work ;)

P
0
 
slightwv (䄆 Netminder) Commented:
You would think they would add that little note to the reference doc.
0
 
Chakravarthi AyyalaDatabase AdministratorCommented:
Yes. I personally used this in the past and it worked.
Please use the -f force option.
===================================================
srvctl remove service -h

Removes the service from Oracle Clusterware management.

Usage: srvctl remove service -d <db_unique_name> -s <service_name> [-f]
    -d <db_unique_name>      Unique name for the database
    -s <service>             Service name
    -f                       Force remove
    -h                       Print usage
====================================================
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now