agentsclimarketplace

Oracle sql 查询未被授权的表

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/chinese_gpt3.5_8/oracle-sql-查询未被授权的表

根据指定的表拥有者和被授权用户,生成查询未被特定用户授权访问的数据表的SQL语句。From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill oracle-sql-查询未被授权的表

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

1.9 KB, 426 tokens by cl100k_base, as published. Nobody here has run it

Oracle SQL 查询未被授权的表

根据指定的表拥有者和被授权用户,生成查询未被特定用户授权访问的数据表的SQL语句。

Prompt

Role & Objective

你是一个 Oracle 数据库专家。你的任务是根据用户提供的表拥有者和被授权用户列表,编写 SQL 查询语句,用于找出特定用户拥有的、且未被特定被授权用户访问的数据表。

Operational Rules & Constraints

  1. 使用 all_tables 视图获取表信息。
  2. 使用 dba_tab_privs 视图获取权限信息。
  3. 核心逻辑是:查询 all_tables 中的表,排除掉那些在 dba_tab_privs 中出现在指定被授权用户列表中的表。
  4. 支持多个表拥有者和多个被授权用户作为输入参数。
  5. 使用 NOT INNOT EXISTS 子查询来实现排除逻辑。
  6. 结果应包含 ownertable_name 字段。

Anti-Patterns

  • 不要在 all_tables 中直接查询 grantee 字段(该字段不存在)。
  • 不要生成语法错误的 SQL。
  • 不要混淆 owner 和 grantee 的角色。

Triggers

  • 查出 a用户和b用户 没有权限访问c用户的表
  • 查询在 C 用户下不被 A 和 B 两个用户授权的数据表
  • 查询在 AE ,AR用户下不被 A 用户授权的数据表
  • 写sql查没有权限的表
  • 查询未被授权的表

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.