Home » RDBMS Server » Server Administration » need to reopen & drop the database (windows xp,oracle 11g)
need to reopen & drop the database [message #504426] Mon, 25 April 2011 04:56 Go to next message
swapnabpnn
Messages: 96
Registered: December 2010
Member
Hi All,
I created new database.Now I want to drop database.So
I had login as sys user and executed shutdown immediate command.
The database was closed.Then I tried to execute startup restrict mount command so that I can run drop database command.
Then it is giving error as
ORA-12154: TNS:could not resolve the connect identifier specified


I tried to restart the service,also checked lsnrctl command,and tnsnames.ora file.Everything is fine,but still gives the same error as above.

How can I resolve the problem??
Re: need to reopen & drop the database [message #504436 is a reply to message #504426] Mon, 25 April 2011 05:52 Go to previous messageGo to next message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
1/ YOu don't need and shouldn't use sqlnet connection to startup/shutdown and even less drop a database. Why would want to do it remotely?
2/ Just remove all database files and drop the service use oradim.

Regards
Michel
Re: need to reopen & drop the database [message #504444 is a reply to message #504436] Mon, 25 April 2011 06:26 Go to previous messageGo to next message
swapnabpnn
Messages: 96
Registered: December 2010
Member
Could you please tell me the syntax to drop database files and how to use oradim?Also I am not able to connect to database.SO where should I run the above commands?
Re: need to reopen & drop the database [message #504451 is a reply to message #504444] Mon, 25 April 2011 07:21 Go to previous messageGo to next message
John Watson
Messages: 8931
Registered: January 2010
Location: Global Village
Senior Member
The online help is pretty good for both the Windows command to delete files and also the oradim utility to delete a service:
c:\users\john\home>del /?
Deletes one or more files.

DEL [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names
ERASE [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names

  names         Specifies a list of one or more files or directories.
                Wildcards may be used to delete multiple files. If a
                directory is specified, all files within the directory
                will be deleted.

  /P            Prompts for confirmation before deleting each file.
  /F            Force deleting of read-only files.
  /S            Delete specified files from all subdirectories.
  /Q            Quiet mode, do not ask if ok to delete on global wildcard
  /A            Selects files to delete based on attributes
  attributes    R  Read-only files            S  System files
                H  Hidden files               A  Files ready for archiving
                I  Not content indexed Files  L  Reparse Points
                -  Prefix meaning not

If Command Extensions are enabled DEL and ERASE change as follows:

The display semantics of the /S switch are reversed in that it shows
you only the files that are deleted, not the ones it could not find.

c:\users\john\home>oradim -?
DIM-00002: The specified command was invalid.
Enter one of the following command:
Create an instance by specifying the following options:
     -NEW -SID sid | -SRVC srvc | -ASMSID sid | -ASMSRVC srvc [-SYSPWD pass]
 [-STARTMODE auto|manual] [-SRVCSTART system|demand] [-PFILE file | -SPFILE]
 [-SHUTMODE normal|immediate|abort] [-TIMEOUT secs] [-RUNAS osusr/ospass]
Edit an instance by specifying the following options:
     -EDIT -SID sid | -ASMSID sid [-SYSPWD pass]
 [-STARTMODE auto|manual] [-SRVCSTART system|demand] [-PFILE file | -SPFILE]
 [-SHUTMODE normal|immediate|abort] [-SHUTTYPE srvc|inst] [-RUNAS osusr/ospass]
Delete instances by specifying the following options:
     -DELETE -SID sid | -ASMSID sid | -SRVC srvc | -ASMSRVC srvc
Startup services and instance by specifying the following options:
     -STARTUP -SID sid | -ASMSID sid [-SYSPWD pass]
 [-STARTTYPE srvc|inst|srvc,inst] [-PFILE filename | -SPFILE]
Shutdown service and instance by specifying the following options:
     -SHUTDOWN -SID sid | -ASMSID sid [-SYSPWD pass]
 [-SHUTTYPE srvc|inst|srvc,inst] [-SHUTMODE normal|immediate|abort]
 Query for help by specifying the following parameters: -? | -h | -help

c:\users\john\home>
Re: need to reopen & drop the database [message #505764 is a reply to message #504451] Wed, 04 May 2011 14:32 Go to previous message
malalation
Messages: 12
Registered: April 2011
Junior Member
I think the easiest way is to use dbca!
I didn't try to delete a database before, but it should work!
Previous Topic: database in mount mode
Next Topic: Oracle 11.2.0.2 on AIX
Goto Forum:
  


Current Time: Wed May 08 22:09:13 CDT 2024