Unix Technical Forum

Delete a databse without using Oracle Console to do so

This is a discussion on Delete a databse without using Oracle Console to do so within the Oracle Database forums, part of the Database Server Software category; --> I need to delete a number of old DBs for which I do not have the passwords (these are ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-24-2008, 03:16 PM
egandt@gmail.com
 
Posts: n/a
Default Delete a databse without using Oracle Console to do so

I need to delete a number of old DBs for which I do not have the
passwords (these are failed restore attempts of a customers DB). Since
I can not access them I want to remove the from Oracle 10G completely,
however I am finding it very difficult to find information on how to
delete an Oracle database outside of using the Oracle Console, deleting
the physical files associated with a DB is easy, but I still find that
Oracle thinks they exist and thus I can not reuse the SSID, I did at
one point find some information on how to destroy a DB, but I can not
find this anywhere now. Does anyone know how I can complete this task?


Thanks,
ERIC GANDT

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-24-2008, 03:16 PM
DA Morgan
 
Posts: n/a
Default Re: Delete a databse without using Oracle Console to do so

egandt@gmail.com wrote:
> I need to delete a number of old DBs for which I do not have the
> passwords (these are failed restore attempts of a customers DB). Since
> I can not access them I want to remove the from Oracle 10G completely,
> however I am finding it very difficult to find information on how to
> delete an Oracle database outside of using the Oracle Console, deleting
> the physical files associated with a DB is easy, but I still find that
> Oracle thinks they exist and thus I can not reuse the SSID, I did at
> one point find some information on how to destroy a DB, but I can not
> find this anywhere now. Does anyone know how I can complete this task?
>
>
> Thanks,
> ERIC GANDT


Do you know what a database is in Oracle? I don't think so based on
what you wrote above. I think you have come to Oracle from SQL Server
or another product and have learned nothing about Oracle.

If you truly want to delete a database ... rm -r applied at the
correct location will do quite nicely. Of course at the wrong
location you'll be reinstalling the operating system.

What do you think a database is? Lets clear that up first.
--
Daniel A. Morgan
http://www.psoug.org
damorgan@x.washington.edu
(replace x with u to respond)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-24-2008, 03:16 PM
BD
 
Posts: n/a
Default Re: Delete a databse without using Oracle Console to do so

What's wrong with resetting the passwords from within oracle, using a
system level account?
Do you have an OS account identified externally that you could use?

If not - I'm not so sure about 10g, but in previous versions, I'd do
the following:

1) key in this query in SQL+:
select 'del ' || name from sys.v_$datafile; ** if you're in windows
select 'rm ' || name from sys.v_$datafile; ** if you're in UNIX
- this will generate the commands to delete all data files in use by
the db.
2) print out the parameter file (pfile) for the db (should be in
$ORACLE_HOME/dbs) ; this will indicate where your control files are
3) Shut down the db
4) Delete the data files with the generated delete commands
5) Delete the control files
6) Delete the init and config files from the dbs directory
7) Remove entries for the db from your oratab file (if you can't reuse
the SID, my guess is this is what's holding you up).

I think that should pretty much do it....

Cheers,

BD.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-24-2008, 03:16 PM
BD
 
Posts: n/a
Default Re: Delete a databse without using Oracle Console to do so

Duh. Just rereading my post - I guess if you can't log in, you can't
very well run a SQL statement, can you?

And I thought I was doing so well...

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-24-2008, 03:21 PM
Frank van Bortel
 
Posts: n/a
Default Re: Delete a databse without using Oracle Console to do so

BD wrote:
> Duh. Just rereading my post - I guess if you can't log in, you can't
> very well run a SQL statement, can you?
>
> And I thought I was doing so well...
>


connect / as sysdba
usually does the trick.
--
Regards,
Frank van Bortel
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-24-2008, 03:21 PM
BD
 
Posts: n/a
Default Re: Delete a databse without using Oracle Console to do so

I'd thought that was only true if you'd created the corresponding
account within Oracle, with the 'identified externally' parameter...

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-24-2008, 03:21 PM
Dave
 
Posts: n/a
Default Re: Delete a databse without using Oracle Console to do so


"BD" <bobby_dread@hotmail.com> wrote in message
news:1122830801.965516.48240@g47g2000cwa.googlegro ups.com...
> I'd thought that was only true if you'd created the corresponding
> account within Oracle, with the 'identified externally' parameter...
>


nope, this is os authentication via the os group you are in (different from
identified externally)

just export ORACLE_SID=xxx

sqlplus "/ as sysdba"


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-24-2008, 03:24 PM
Frank van Bortel
 
Posts: n/a
Default Re: Delete a databse without using Oracle Console to do so

Dave wrote:
> "BD" <bobby_dread@hotmail.com> wrote in message
> news:1122830801.965516.48240@g47g2000cwa.googlegro ups.com...
>
>>I'd thought that was only true if you'd created the corresponding
>>account within Oracle, with the 'identified externally' parameter...
>>

>
>
> nope, this is os authentication via the os group you are in (different from
> identified externally)
>
> just export ORACLE_SID=xxx
>
> sqlplus "/ as sysdba"
>
>

correct

--
Regards,
Frank van Bortel
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-24-2008, 03:24 PM
Joel Garry
 
Posts: n/a
Default Re: Delete a databse without using Oracle Console to do so

http://download-west.oracle.com/docs...6.htm#BHACBJFD

http://download-west.oracle.com/docs....htm#sthref868

http://download-west.oracle.com/docs...l.htm#sthref78

metalink had docs for earlier versions on windows, none of which were
completely correct AFAICD. Usually they said something like "find all
references to oracle in the registry and delete them," and not tell you
how to delete the ones that wouldn't delete. Also, some files wouldn't
delete because they were open by services such as MS DTS or something.

jg
--
@home.com is bogus.
http://www.signonsandiego.com/uniont...b31lerach.html

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:53 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com