需要查询以获取已使用和未使用的表的列表 [英] Need a query to get a list of used and unused tables

查看:117
本文介绍了需要查询以获取已使用和未使用的表的列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个文本文件中给我的模式列表中的表,我的老板问他,我们需要备份所有这些表。现在他要求我写一个查询来返回 REQUIRE BACK UP 的其余表。

I gave a list of tables from our schema in a text file to my boss asking him that we need NOT back up all these tables. Now he is asking me to write a query to return the rest of the tables which REQUIRE BACK UP.

他给了我在我的查询中必须使用USER_TABS和DIFF的提示。

He gave me the hint that I will have to use USER_TABS and DIFF in my query.

请帮助?

我正在使用ORACLE数据库。

I am using ORACLE database.

推荐答案

条件定义了一个未使用的表,什么标准定义了一个需要备份的表? 备份是什么意思?

What criteria defines a table that is "unused" and what criteria defines a table that "needs backup"? And what do you mean by "backup"?

如果你在谈论备份,你通常会谈论物理备份,在这种情况下,你备份整个数据库(完全备份或增量备份,具体取决于您的备份策略的结构)。您不能也不能从物理备份中包括或排除表。您可以将表移动到只读表空间,这使Oracle知道它们不需要再次备份。但这听起来不像是你以后。

If you're talking about backups, you'd normally be talking about physical backups in which case you back up the entire database (either a full backup or an incremental backup depending on how you've structured your backup strategy). You would not and could not include or exclude tables from a physical backup. You could potentially move the tables to a read-only tablespace which lets Oracle know that they don't need to be backed up again. But it doesn't sound like that's what you're after.

这篇关于需要查询以获取已使用和未使用的表的列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆