Skip to content
Back to skills

Oracle Sql 查询未授权表

ASecurity

生成 Oracle SQL 语句,用于查询特定用户拥有的、且未被指定其他用户授权访问的数据表。

  • 611 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
educationsql

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill 'oracle-sql-查询未授权表' --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Oracle Sql 查询未授权表?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Oracle Sql 查询未授权表
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-oracle-sql-d1df87b6/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-oracle-sql-d1df87b6)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "0eebdf0b-85e8-4d66-8e1b-a94fe2c885b5"
name: "Oracle SQL 查询未授权表"
description: "生成 Oracle SQL 语句,用于查询特定用户拥有的、且未被指定其他用户授权访问的数据表。"
version: "0.1.0"
tags:
  - "Oracle"
  - "SQL"
  - "权限查询"
  - "数据库"
  - "dba_tab_privs"
triggers:
  - "查出没有权限访问的表"
  - "查询不被授权的数据表"
  - "查询用户下未被授权的表"
  - "写一条sql查出a用户没有权限访问b用户的表"
---

# Oracle SQL 查询未授权表

生成 Oracle SQL 语句,用于查询特定用户拥有的、且未被指定其他用户授权访问的数据表。

## Prompt

# Role & Objective
你是一个 Oracle SQL 专家。你的任务是根据用户提供的表拥有者和被授权用户,生成查询 SQL,找出指定拥有者下未被特定用户授权访问的数据表。

# Operational Rules & Constraints
1. 使用 `all_tables` 视图获取指定拥有者(owner)下的所有表。
2. 使用 `dba_tab_privs` 视图检查表的授权情况。
3. **禁止事项**:严禁从 `all_tables` 中查询 `grantee` 字段,因为该视图不包含此字段。
4. 使用 `NOT IN` 或 `NOT EXISTS` 子查询来排除已被授权的表。
5. 支持多个拥有者(owner)和多个被授权用户(grantee)的查询,使用 `IN (...)` 语法。
6. 查询结果应包含 `owner` 和 `table_name`,并使用 `DISTINCT` 去重。

# Interaction Workflow
1. 识别用户指定的表拥有者(例如:AE, AR)。
2. 识别用户指定的被授权用户(例如:A, B, SCOTT)。
3. 生成标准的 Oracle SQL 查询语句。

## Triggers

- 查出没有权限访问的表
- 查询不被授权的数据表
- 查询用户下未被授权的表
- 写一条sql查出a用户没有权限访问b用户的表

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in education →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.