blob: 99004c3df582f7935b1233e7adf4295bb0abfdcf [file] [log] [blame]
type=page
status=published
title=delete-resource-ref
next=delete-ssl.html
prev=delete-resource-adapter-config.html
~~~~~~
= delete-resource-ref
[[delete-resource-ref-1]][[GSRFM00107]][[delete-resource-ref]]
== delete-resource-ref
Removes a reference to a resource
[[sthref967]]
=== Synopsis
[source]
----
asadmin [asadmin-options] delete-resource-ref [--help]
[--target target] reference_name
----
[[sthref968]]
=== Description
The `delete-resource-ref` subcommand removes from a cluster or an
unclustered server instance a reference to a resource (for example, a
JDBC resource). This effectively results in the removal of the resource
from the JNDI tree of the targeted instance or cluster.
The target instance or instances making up the cluster need not be
running or available for this subcommand to succeed. If one or more
instances are not available, they will no longer load the resource in
the JNDI tree the next time they start.
Removal of the reference does not result in removal of the resource from
the domain. The resource is removed only by the `delete` subcommand for
that resource (for example, `delete-jdbc-resource`).
This subcommand is supported in remote mode only.
[[sthref969]]
=== Options
asadmin-options::
Options for the `asadmin` utility. For information about these
options, see the link:asadmin.html#asadmin-1m[`asadmin`(1M)] help page.
`--help`::
`-?`::
Displays the help text for the subcommand.
`--target`::
Specifies the target from which you are removing the resource
reference. Valid values are
`server`;;
Removes the resource reference from the default server instance
`server` and is the default value.
cluster_name;;
Removes the resource reference from every server instance in the
cluster.
instance_name;;
Removes the resource reference from the named unclustered server
instance.
[[sthref970]]
=== Operands
reference_name::
The name or JNDI name of the resource.
[[sthref971]]
=== Examples
[[GSRFM577]][[sthref972]]
==== Example 1   Removing a Reference to a Resource
This example removes a reference to the JMS destination resource
`jms/Topic` on the cluster `cluster1`.
[source]
----
asadmin> delete-resource-ref --target cluster1 jms/Topic
resource-ref jms/Topic deleted successfully.
Command delete-resource-ref executed successfully.
----
[[sthref973]]
=== Exit Status
0::
subcommand executed successfully
1::
error in executing the subcommand
[[sthref974]]
=== See Also
link:asadmin.html#asadmin-1m[`asadmin`(1M)]
link:create-resource-ref.html#create-resource-ref-1[`create-resource-ref`(1)],
link:list-resource-refs.html#list-resource-refs-1[`list-resource-refs`(1)]