广告
返回顶部
首页 > 资讯 > 数据库 >oracle数据库如何删除
  • 165
分享到

oracle数据库如何删除

2024-04-02 19:04:59 165人浏览 独家记忆
摘要

oracle数据库如何删除,很多新手对此不是很清楚,为了帮助大家解决这个难题,下面小编将为大家详细讲解,有这方面需求的人可以来学习下,希望你能有所收获。 首先停止用户端连接:sql > startu

oracle数据库如何删除,很多新手对此不是很清楚,为了帮助大家解决这个难题,下面小编将为大家详细讲解,有这方面需求的人可以来学习下,希望你能有所收获。

首先停止用户端连接:
sql > startup restrict mount;

删除数据库
SQL> drop database;


Database dropped.


Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


[oracle@test ~]$ cd $ORACLE_HOME/deinstall/
[oracle@test deinstall]$ ls
bootstrap.pl  deinstall  deinstall.pl  deinstall.xml  jlib  readme.txt  response  sshUserSetup.sh
[oracle@test deinstall]$ ll
total 92
-rwxr-xr-x. 1 oracle oinstall  9780 May 10  2011 bootstrap.pl
-rwxr-xr-x. 1 oracle oinstall  9658 Apr 13  2017 deinstall
-rwxr-xr-x. 1 oracle oinstall 18841 Jan 29  2013 deinstall.pl
-rw-r--r--. 1 oracle oinstall  3466 Aug 18  2010 deinstall.xml
drwxr-xr-x. 2 oracle oinstall  4096 Apr 13  2017 jlib
-rw-r--r--. 1 oracle oinstall   409 Aug 18  2010 readme.txt
drwxr-xr-x. 2 oracle oinstall  4096 Apr 13  2017 response
-rwxr-xr-x. 1 oracle oinstall 32343 Dec 16  2009 sshUserSetup.sh
[oracle@test deinstall]$ ./deinstall
Checking for required files and bootstrapping ...
Please wait ...
Location of logs /tmp/deinstall2017-11-24_11-35-44AM/logs/


############ ORACLE DEINSTALL & DECONFIG TOOL START ############




######################### CHECK OPERATION START #########################
## [START] Install check configuration ##




Checking for existence of the Oracle home location /u01/app/oracle/product/11.2.0/db_1
Oracle Home type selected for deinstall is: Oracle Single Instance Database
Oracle Base selected for deinstall is: /u01/app/oracle
Checking for existence of central inventory location /u01/app/oraInventory
Checking for sufficient temp space availability on node(s) : 'test'


## [END] Install check configuration ##




Network Configuration check config START


Network de-configuration trace file location: /tmp/deinstall2017-11-24_11-35-44AM/logs/netdc_check2017-11-24_11-35-57-AM.log


Specify all Single Instance listeners that are to be de-configured [LISTENER]:


Network Configuration check config END


Database Check Configuration START


Database de-configuration trace file location: /tmp/deinstall2017-11-24_11-35-44AM/logs/databasedc_check2017-11-24_11-36-02-AM.log


Use comma as separator when specifying list of values as input


Specify the list of database names that are configured in this Oracle home [foglight]: 


###### For Database 'foglight' ######


Specify the type of this database (1.Single Instance Database|2.Oracle Restart Enabled Database) [1]: 
Specify the diagnostic destination location of the database [/u01/app/oracle/diag/rdbms/foglight]: 
Specify the storage type used by the Database ASM|FS []: FS


Specify the list of directories if any database files exist on a shared file system. If 'foglight' subdirectory is found, then it will be deleted. Otherwise, the specified directory will be deleted. Alternatively, you can specify list of database files with full path [ ]: 


Specify the fast recovery area location, if it is configured on the file system. If 'foglight' subdirectory is found, then it will be deleted. []: 


Specify the database spfile location [ ]: 


Database Check Configuration END


Enterprise Manager Configuration Assistant START


EMCA de-configuration trace file location: /tmp/deinstall2017-11-24_11-35-44AM/logs/emcadc_check2017-11-24_11-36-54-AM.log 


Checking configuration for database foglight
Enterprise Manager Configuration Assistant END
Oracle Configuration Manager check START
OCM check log file location : /tmp/deinstall2017-11-24_11-35-44AM/logs//ocm_check1819.log
Oracle Configuration Manager check END


######################### CHECK OPERATION END #########################




####################### CHECK OPERATION SUMMARY #######################
Oracle Home selected for deinstall is: /u01/app/oracle/product/11.2.0/db_1
Inventory Location where the Oracle home reGIStered is: /u01/app/oraInventory
Following Single Instance listener(s) will be de-configured: LISTENER
The following databases were selected for de-configuration : foglight
Database unique name : foglight
Storage used : FS
No Enterprise Manager configuration to be updated for any database(s)
No Enterprise Manager ASM targets to update
No Enterprise Manager listener targets to migrate
Checking the config status for CCR
Oracle Home exists with CCR directory, but CCR is not configured
CCR check is finished
Do you want to continue (y - yes, n - no)? [n]: y
A log of this session will be written to: '/tmp/deinstall2017-11-24_11-35-44AM/logs/deinstall_deconfig2017-11-24_11-35-56-AM.out'
Any error messages from this session will be written to: '/tmp/deinstall2017-11-24_11-35-44AM/logs/deinstall_deconfig2017-11-24_11-35-56-AM.err'


######################## CLEAN OPERATION START ########################


Enterprise Manager Configuration Assistant START


EMCA de-configuration trace file location: /tmp/deinstall2017-11-24_11-35-44AM/logs/emcadc_clean2017-11-24_11-36-54-AM.log 


Updating Enterprise Manager ASM targets (if any)
Updating Enterprise Manager listener targets (if any)
Enterprise Manager Configuration Assistant END
Database de-configuration trace file location: /tmp/deinstall2017-11-24_11-35-44AM/logs/databasedc_clean2017-11-24_11-37-00-AM.log
Database Clean Configuration START foglight
This operation may take few minutes.
Database Clean Configuration END foglight


Network Configuration clean config START


Network de-configuration trace file location: /tmp/deinstall2017-11-24_11-35-44AM/logs/netdc_clean2017-11-24_11-37-09-AM.log


De-configuring Single Instance listener(s): LISTENER


De-configuring listener: LISTENER
    Stopping listener: LISTENER
    Warning: Failed to stop listener. Listener may not be running.
    Deleting listener: LISTENER
    Listener deleted successfully.
Listener de-configured successfully.


De-configuring Local Net Service Names configuration file...
Local Net Service Names configuration file de-configured successfully.


De-configuring backup files...
Backup files de-configured successfully.


The network configuration has been cleaned up successfully.


Network Configuration clean config END


Oracle Configuration Manager clean START
OCM clean log file location : /tmp/deinstall2017-11-24_11-35-44AM/logs//ocm_clean1819.log
Oracle Configuration Manager clean END
Setting the force flag to false
Setting the force flag to cleanup the Oracle Base
Oracle Universal Installer clean START


Detach Oracle home '/u01/app/oracle/product/11.2.0/db_1' from the central inventory on the local node : Done


Delete directory '/u01/app/oracle/product/11.2.0/db_1' on the local node : Done


Delete directory '/u01/app/oraInventory' on the local node : Done


Delete directory '/u01/app/oracle' on the local node : Done


Oracle Universal Installer cleanup was successful.


Oracle Universal Installer clean END




## [START] Oracle install clean ##


Clean install operation removing temporary directory '/tmp/deinstall2017-11-24_11-35-44AM' on node 'test'


## [END] Oracle install clean ##




######################### CLEAN OPERATION END #########################




####################### CLEAN OPERATION SUMMARY #######################
Successfully de-configured the following database instances : foglight
Following Single Instance listener(s) were de-configured successfully: LISTENER
Cleaning the config for CCR
As CCR is not configured, so skipping the cleaning of CCR configuration
CCR clean is finished
Successfully detached Oracle home '/u01/app/oracle/product/11.2.0/db_1' from the central inventory on the local node.
Successfully deleted directory '/u01/app/oracle/product/11.2.0/db_1' on the local node.
Successfully deleted directory '/u01/app/oraInventory' on the local node.
Successfully deleted directory '/u01/app/oracle' on the local node.
Oracle Universal Installer cleanup was successful.




Run 'rm -rf /etc/oraInst.loc' as root on node(s) 'test' at the end of the session.


Run 'rm -rf /opt/ORCLfmap' as root on node(s) 'test' at the end of the session.
Run 'rm -rf /etc/oratab' as root on node(s) 'test' at the end of the session.
Oracle deinstall tool successfully cleaned up temporary directories.
#######################################################################




############# ORACLE DEINSTALL & DECONFIG TOOL END #############


[oracle@test deinstall]$ exit
loGout
[root@test ~]# rm -rf /etc/oraInst.loc
[root@test ~]# rm -rf /opt/ORCLfmap
[root@test ~]# rm -rf /etc/oratab

oracle数据库删除完成。

原先的文件情况:

[root@test shwmsdb]# ls
control01.ctl  redo04b.log  redo09b.log             wmsadmin_dat01.dbf  wmwhse2_idx01.dbf           wmwhse5_dat01.dbf  wmwhse7_idx01.dbf  wmwhse9_tmp01.dbf
meta01.dbf     redo05a.log  redo10a.log             wmsadmin_idx01.dbf  wmwhse2_tmp01.dbf           wmwhse5_dat02.dbf  wmwhse7_tmp01.dbf  wmwpuser_dat01.dbf
oper01.dbf     redo05b.log  redo10b.log             wmsadmin_tmp01.dbf  wmwhse3_dat01.dbf           wmwhse5_idx01.dbf  wmwhse8_dat01.dbf  wmwpuser_idx01.dbf
redo01a.log    redo06a.log  sce_tools01.dbf         wmwhse1_dat01.dbf   wmwhse3_dat02.dbf           wmwhse5_tmp01.dbf  wmwhse8_dat02.dbf  wmwpuser_tmp01.dbf
redo01b.log    redo06b.log  sysaux.276.874082233    wmwhse1_dat02.dbf   wmwhse3_idx01.dbf           wmwhse6_dat01.dbf  wmwhse8_idx01.dbf
redo02a.log    redo07a.log  system.264.874082189    wmwhse1_idx01.dbf   wmwhse3_tmp01.dbf           wmwhse6_idx01.dbf  wmwhse8_idx02.dbf
redo02b.log    redo07b.log  temp.303.874085885      wmwhse1_tmp01.dbf   wmwhse4_dat01.dbf           wmwhse6_tmp01.dbf  wmwhse8_tmp01.dbf
redo03a.log    redo08a.log  undotbs1.263.874082191  wmwhse2_dat01.dbf   wmwhse4_data.328.938901673  wmwhse7_dat01.dbf  wmwhse9_dat01.dbf
redo03b.log    redo08b.log  undotbs2.273.874082225  wmwhse2_dat02.dbf   wmwhse4_idx01.dbf           wmwhse7_dat02.dbf  wmwhse9_dat02.dbf
redo04a.log    redo09a.log  users.289.874082237     wmwhse2_dat03.dbf   wmwhse4_tmp01.dbf           wmwhse7_dat03.dbf  wmwhse9_idx01.dbf

[oracle@test arcHivelog]$ ls
arc_1_100_961335150.arc  arc_1_119_961335150.arc    arc_1_27_961335150.arc  arc_1_46_961335150.arc  arc_1_65_961335150.arc  arc_1_84_961335150.arc
arc_1_101_961335150.arc  arc_1_120_961335150.arc    arc_1_28_961335150.arc  arc_1_47_961335150.arc  arc_1_66_961335150.arc  arc_1_85_961335150.arc
arc_1_102_961335150.arc  arc_1_121_961335150.arc    arc_1_2_961335150.arc   arc_1_48_961335150.arc  arc_1_67_961335150.arc  arc_1_86_961335150.arc
arc_1_103_961335150.arc  arc_1_12_961335150.arc     arc_1_29_961335150.arc  arc_1_4_961335150.arc   arc_1_68_961335150.arc  arc_1_87_961335150.arc
arc_1_104_961335150.arc  arc_1_13_961335150.arc     arc_1_30_961335150.arc  arc_1_49_961335150.arc  arc_1_6_961335150.arc   arc_1_88_961335150.arc
arc_1_105_961335150.arc  arc_1_14_961335150.arc     arc_1_31_961335150.arc  arc_1_50_961335150.arc  arc_1_69_961335150.arc  arc_1_8_961335150.arc
arc_1_106_961335150.arc  arc_1_15_961335150.arc     arc_1_32_961335150.arc  arc_1_51_961335150.arc  arc_1_70_961335150.arc  arc_1_89_961335150.arc
arc_1_107_961335150.arc  arc_1_16_961335150.arc     arc_1_33_961335150.arc  arc_1_52_961335150.arc  arc_1_71_961335150.arc  arc_1_90_961335150.arc
arc_1_108_961335150.arc  arc_1_17_961335150.arc     arc_1_34_961335150.arc  arc_1_53_961335150.arc  arc_1_72_961335150.arc  arc_1_91_961335150.arc
arc_1_10_961335150.arc   arc_1_18_961335150.arc     arc_1_35_961335150.arc  arc_1_54_961335150.arc  arc_1_73_961335150.arc  arc_1_92_961335150.arc
arc_1_109_961335150.arc  arc_1_1_961335150.arc      arc_1_36_961335150.arc  arc_1_55_961335150.arc  arc_1_74_961335150.arc  arc_1_93_961335150.arc
arc_1_110_961335150.arc  arc_1_19_961335150.arc     arc_1_37_961335150.arc  arc_1_56_961335150.arc  arc_1_75_961335150.arc  arc_1_94_961335150.arc
arc_1_111_961335150.arc  arc_1_20_961335150.arc     arc_1_38_961335150.arc  arc_1_57_961335150.arc  arc_1_76_961335150.arc  arc_1_95_961335150.arc
arc_1_112_961335150.arc  arc_1_21_961335150.arc     arc_1_3_961335150.arc   arc_1_58_961335150.arc  arc_1_77_961335150.arc  arc_1_96_961335150.arc
arc_1_113_961335150.arc  arc_1_22_961335150.arc     arc_1_39_961335150.arc  arc_1_5_961335150.arc   arc_1_78_961335150.arc  arc_1_97_961335150.arc
arc_1_114_961335150.arc  arc_1_23440_874531363.arc  arc_1_40_961335150.arc  arc_1_59_961335150.arc  arc_1_7_961335150.arc   arc_1_98_961335150.arc
arc_1_115_961335150.arc  arc_1_23441_874531363.arc  arc_1_41_961335150.arc  arc_1_60_961335150.arc  arc_1_79_961335150.arc  arc_1_9_961335150.arc
arc_1_116_961335150.arc  arc_1_23_961335150.arc     arc_1_42_961335150.arc  arc_1_61_961335150.arc  arc_1_80_961335150.arc  arc_1_99_961335150.arc
arc_1_117_961335150.arc  arc_1_24_961335150.arc     arc_1_43_961335150.arc  arc_1_62_961335150.arc  arc_1_81_961335150.arc  arc_2_1_961335150.arc
arc_1_118_961335150.arc  arc_1_25_961335150.arc     arc_1_44_961335150.arc  arc_1_63_961335150.arc  arc_1_82_961335150.arc  arc_2_21318_874531363.arc
arc_1_11_961335150.arc   arc_1_26_961335150.arc     arc_1_45_961335150.arc  arc_1_64_961335150.arc  arc_1_83_961335150.arc  arc_2_21319_874531363.arc

这个操作可以删除:

控制文件

redo log

用户数据文件(各类表空间)

temp表空间

但是不会删除归档文件,归档文件需要手工删除。

看完上述内容是否对您有帮助呢?如果还想对相关知识有进一步的了解或阅读更多相关文章,请关注编程网数据库频道,感谢您对编程网的支持。

您可能感兴趣的文档:

--结束END--

本文标题: oracle数据库如何删除

本文链接: https://www.lsjlt.com/news/58791.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • oracle数据库如何删除
    oracle数据库如何删除,很多新手对此不是很清楚,为了帮助大家解决这个难题,下面小编将为大家详细讲解,有这方面需求的人可以来学习下,希望你能有所收获。 首先停止用户端连接:SQL > startu...
    99+
    2022-10-18
  • Oracle数据库如何删除归档
    这篇文章主要介绍了Oracle数据库如何删除归档,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。      删除...
    99+
    2022-10-18
  • 如何删除oracle数据库软件
    这篇文章主要为大家展示了“如何删除oracle数据库软件”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“如何删除oracle数据库软件”这篇文章吧。 1.关闭数...
    99+
    2022-10-18
  • Oracle数据库之创建和删除数据库
    创建数据库1 使用Database Configuration  Assistant工具创建Oracle数据库 步骤一 操作窗口有4种选择  A 创建数据库 B 配置数据库选件...
    99+
    2022-10-18
  • 数据库如何删除数据
    drop (删除表):删除内容和定义,释放空间。简单来说就是把整个表去掉.以后要新增数据是不可能的,除非新增一个表。 drop语句将删除表的结构被依赖的约束(constrain),触发器(trigger)索引(index);依赖于...
    99+
    2023-09-01
    数据库 sql mysql
  • oracle数据库不小心删除了数据
    select * from SYS_DICT as of timestamp to_timestamp("2019-11-05 10:00:00","yyyy-mm-dd hh24:mi:ss"); 时间点在删除数据之前,又尽量精...
    99+
    2016-02-06
    oracle数据库不小心删除了数据
  • 关于从Oracle数据库中删除数据
    1,删除表 drop 1.1 执行drop table table_name  语句 被 drop后的表被放在用户回收站(user_recyclebin)里,而没有被直...
    99+
    2022-10-18
  • Oracle 11中怎么删除数据库
    这篇文章将为大家详细讲解有关Oracle 11中怎么删除数据库,文章内容质量较高,因此小编分享给大家做个参考,希望大家阅读完这篇文章后对相关知识有一定的了解。1- 导入数据库的SID,如果没有定义的话exp...
    99+
    2022-10-18
  • 如何恢复Oracle数据库误删除数据的语句
    这篇文章主要介绍如何恢复Oracle数据库误删除数据的语句,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!第一种数据恢复方法是利用oracle提供的闪回方法进行数据恢复,适用于dele...
    99+
    2022-10-18
  • oracle中如何删除重数据
    今天就跟大家聊聊有关oracle中如何删除重数据,可能很多人都不太了解,为了让大家更加了解,小编给大家总结了以下内容,希望大家根据这篇文章可以有所收获。 前期准备创建测试表cre...
    99+
    2022-10-18
  • 数据库如何删除表
    这篇文章主要介绍数据库如何删除表,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!在数据库中,可以使用“DROP TABLE”语句来删除一个或多个数据表,具体语法“DROP TABLE ...
    99+
    2022-10-18
  • mysql如何删除数据库
    本文小编为大家详细介绍“mysql如何删除数据库”,内容详细,步骤清晰,细节处理妥当,希望这篇“mysql如何删除数据库”文章能帮助大家解决疑惑,下面跟着小编的思路慢慢深入,一起来学习新知识吧。 ...
    99+
    2022-10-19
  • mongodb如何删除数据库
    在mongodb中可以使用db.dropDatabase()方法删除数据库,语法格式为:“db.dropDatabase()”,该语法意思是删除当前数据库,默认为test。具体内容如下:MongoDB 删除数据库的语法格式db.dropDa...
    99+
    2022-10-03
  • Oracle怎么删除数据,Oracle数据删除的三种方式
    目录oracle怎么删除数据drop命令truncate命令delete命令关于truncate的小小总结最后Oracle怎么删除数据 删除表(记录和结构)的语句delete——trun...
    99+
    2023-02-15
    Oracle删除数据 Oracle数据删除 Oracle怎么删除数据
  • oracle数据库删除用户(schema)操作
    先关闭应用1)查看用户的默认表空间及临时表空间set lines 300col username for a30select username ,default_tablespace,TEMPOR...
    99+
    2022-10-18
  • oracle中怎么手动删除数据库
    本篇文章为大家展示了oracle中怎么手动删除数据库,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。    特权用户可以使用dro...
    99+
    2022-10-18
  • oracle中如何删除表中数据
    这篇文章给大家分享的是有关oracle中如何删除表中数据的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。在oracle中删除表中数据可以使用truncate table 表名、delete from 表名...
    99+
    2023-06-27
  • oracle中如何删除亿级数据
    目录oracle删除亿级数据1、drop table ,然后再create table,插入数据2、使用delete批量删除3、使用truncate table ,然后再插入数据oracle数据库亿级数据量清理...
    99+
    2023-02-15
    oracle删除数据 oracle删除亿级数据 oracle数据删除
  • oracle删除的数据如何恢复
    如果使用DELETE语句删除了数据,Oracle数据库是没有内置的恢复机制来撤销删除操作的。因此,一旦数据被删除,恢复数据的唯一方法...
    99+
    2023-08-31
    oracle
  • php mysql如何删除数据库
    这篇文章主要介绍“php mysql如何删除数据库”,在日常操作中,相信很多人在php mysql如何删除数据库问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”php mysql如何删除数据库”的疑惑有所帮助!...
    99+
    2023-06-20
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作