--1查找系统用户基本信息 

SELECT user_id,

       user_name,

       description,

       employeE_id,

       person_party_id

  FROM fnd_user;

--3查找所有的interface表 

SELECT *

  FROM dba_objects db

 WHERE db.object_type = 'TABLE'
AND db.object_name LIKE '%INTERFACE%'; --4查找对应模块的interface表 SELECT * FROM dba_objects db WHERE db.object_type = 'TABLE' AND db.object_name LIKE '%INTERFACE%' AND owner LIKE 'PO'; --5查找用户当前的状态 SELECT substr(v$session.username, 1, 8) username, v$session.osuser osuser, -- DECODE(V$SESSION.SERVER,'DEDICATED','D','SHARED','S','O') SERVER, v$sqlarea.disk_reads disk_reads, v$sqlarea.buffer_gets buffer_gets, substr(v$session.lockwait, 1, 10) lockwait, v$session.process pid,
v$session_wait.event event, v$sqlarea.sql_text SQL FROM v$session_wait, v$sqlarea, v$session WHERE v$session.sql_address = v$sqlarea.address AND v$session.sql_hash_value = v$sqlarea.hash_value AND v$session.sid = v$session_wait.sid(+) AND v$session.status = 'ACTIVE' AND v$session_wait.event != 'client message' ORDER BY v$session.lockwait ASC, v$session.username; --6查找用户的职责 SELECT c.user_name AS login_name, d.full_name AS employee_name, f.name AS department_name, a.user_id AS user_id, a.responsibility_id AS responsibility_id, b.responsibility_name AS responsibility_name FROM fnd_user_resp_groups a, fnd_responsibility_vl b, fnd_user c, hr_employees d, per_assignments_f e, hr_all_organization_units_tl f WHERE a.user_id = c.user_id AND c.employee_id = d.employee_id AND c.employee_id = e.person_id AND e.organization_id = f.organization_id AND a.responsibility_id = b.responsibility_id AND SYSDATE > e.effective_start_date AND SYSDATE < e.effective_end_date ORDER BY c.description,
c.user_name,
a.responsibility_id --7查找组织信息 SELECT organization_id id,
organization_code 代码,
organization_name 名称, operating_unit 营运ouid FROM org_organization_definitions ood; --11查询所有应用模块的ID,对应的职责ID,模块的简称代码 SELECT resp.application_id, resp.responsibility_id, resp.responsibility_key, appl.application_short_name FROM fnd_responsibility resp, fnd_application appl WHERE resp.application_id = appl.application_id; --12查询当前系统登录的用户数 SELECT COUNT(DISTINCT d.user_name) FROM apps.fnd_logins a, v$session b, v$process c, apps.fnd_user d WHERE b.paddr = c.addr AND a.pid = c.pid AND a.spid = b.process AND d.user_id = a.user_id AND (d.user_name = 'USER_NAME' OR 1 = 1); --13查询系统当前物料单位列表 SELECT muom.unit_of_measure, muom.uom_code, muom.description, muom.uom_class, muom.source_lang FROM mtl_units_of_measure muom; --14OU 库存组织与子库存 SELECT hou.organization_id ou_org_id, hou.name ou_name, ood.organization_id org_org_id, ood.organization_code org_org_code, msi.secondary_inventory_name, msi.description FROM hr_organization_information hoi, hr_organization_units hou, org_organization_definitions ood,
mtl_secondary_inventories msi WHERE hoi.org_information1 = 'OPERATING_UNIT' AND hoi.organization_id = hou.organization_id AND ood.operating_unit = hoi.organization_id AND ood.organization_id = msi.organization_id; --15查询库存物料现有量 SELECT ms.* FROM mtl_supply ms, po_headers_all ph WHERE ms.po_header_id = ph.po_header_id
AND ph.segment1 = '2009001' --PO号 ORDER BY ms.po_header_id, ms.po_release_id, ms.po_line_id, ms.po_line_location_id, ms.po_distribution_id; --16 查找死锁进程 SELECT vs.username, lo.object_id, sob.name, lo.session_id, vs.serial#, lo.oracle_username, lo.os_user_name, lo.process FROM v$locked_object lo, v$session vs, sys.obj$ sob WHERE lo.session_id = vs.sid
AND sob.obj# = lo.object_id; --17 中断死锁进程 ALTER system kill session 'sid,serial#'; --18 查找死锁进程2 SELECT c.owner, c.object_name, c.object_type, fu.user_name locking_fnd_user_name, fl.start_time locking_fnd_user_login_time, vs.module, vs.machine, vs.osuser, vlocked.oracle_username, vs.sid, vp.pid, vp.spid AS os_process, vs.serial#, vs.status,
vs.saddr, vs.audsid, vs.process FROM fnd_logins fl, fnd_user fu, v$locked_object vlocked, v$process vp, v$session vs, dba_objects c WHERE vs.sid = vlocked.session_id AND vlocked.object_id = c.object_id AND vs.paddr = vp.addr AND vp.spid = fl.process_spid(+) AND vp.pid = fl.pid(+) AND fl.user_id = fu.user_id(+) --AND c.object_name LIKE '%' || UPPER('&tab_name_leaveblank4all') || '%' AND nvl(vs.status, 'XX') != 'KILLED'; --查询EBS用户密码sql语句 参考萌虫小换换
SELECT usr.user_name, get_pwd.decrypt ((SELECT (SELECT get_pwd.decrypt (fnd_web_sec.get_guest_username_pwd, usertable.encrypted_foundation_password ) FROM dual) AS apps_password FROM fnd_user usertable WHERE usertable.user_name = (SELECT substr (fnd_web_sec.get_guest_username_pwd, 1, instr (fnd_web_sec.get_guest_username_pwd, '/' ) - 1 ) FROM dual)) ) password,
usr.encrypted_user_password
FROM fnd_user usr
WHERE usr.user_name = 'SYSADMIN';

EBS系统管理常用SQL语句整理汇总(参考网上资料&其他人博客)的更多相关文章

  1. mysql copy表或表数据常用的语句整理汇总

    mysql copy表或表数据常用的语句整理汇总. 假如我们有以下这样一个表: id username password ----------------------------------- 1 a ...

  2. 常用sql语句整理:mysql

    ## 常用sql语句整理:mysql1. 增- 增加一张表```CREATE TABLE `table_name`(  ...  )ENGINE=InnoDB DEFAULT CHARSET=utf8 ...

  3. MSSQL注入常用SQL语句整理

    很多情况下使用工具对mssql注入并不完善,所以我们就需要手工注入,一下是本人收集的一些mssql的sql语句. 手工MSSQL注入常用SQL语句 and exists (select * from ...

  4. 常用sql语句整理[SQL Server]

    1. 存储过程 CREATE PROCEDURE [dbo].[bbs_move_createtopic] @fid smallint, @iconid smallint, @curtid INT O ...

  5. 常用sql语句整理[MySql]

    查看执行计划 explain update test100 set contractSn=99 where contractSn=45; insert ... on duplicate key使用 i ...

  6. 常用sql语句整理

    1.开/关 外键约束 -- 关 SET FOREIGN_KEY_CHECKS = 0; -- 开 SET FOREIGN_KEY_CHECKS = 1; 2.查看表的容量大小 use informat ...

  7. Oracle数据库常用的Sql语句整理

    Oracle数据库常用的Sql语句整理 查看当前用户的缺省表空间 : select username,default_tablespace from user_users; 2.查看用户下所有的表 : ...

  8. oracle常用SQL语句(汇总版)

    Oracle数据库常用sql语句 ORACLE 常用的SQL语法和数据对象一.数据控制语句 (DML) 部分 1.INSERT (往数据表里插入记录的语句) INSERT INTO 表名(字段名1, ...

  9. Mysql 常用 SQL 语句集锦

    Mysql 常用 SQL 语句集锦 基础篇 //查询时间,友好提示 $sql = "select date_format(create_time, '%Y-%m-%d') as day fr ...

随机推荐

  1. css中单位px,em,rem和vh/vw的理解

    >px像素(Pixel).相对长度单位.像素px是相对于显示器屏幕分辨率而言的. em是相对长度单位.相对于当前对象内文本的字体尺寸.如当前对行内文本的字体尺寸未被人为设置,则相对于浏览器的默认 ...

  2. 2018.4.16Spring.Net入门学习内容

    三大方面: IoC:Inversion of Control 控制翻转:就是创建对象的权利由开发人员自己控制New,转到了由容器来控制. DI:Dependency InjectionIt is a ...

  3. 多项式的基本运算(FFT和NTT)总结

    设参与运算的多项式最高次数是n,那么多项式的加法,减法显然可以在O(n)时间内计算. 所以我们关心的是两个多项式的乘积.朴素的方法需要O(n^2)时间,并不够优秀. 考虑优化. 多项式乘积 方案一:分 ...

  4. ●BZOJ 2618 [Cqoi2006]凸多边形

    题链: http://www.lydsy.com/JudgeOnline/problem.php?id=2618 题解: 计算几何,半平面交. 给出一些凸包,求面积交. 把所有边都取出来,直接办平面交 ...

  5. ●BZOJ 3672 [Noi2014]购票

    题链: http://www.lydsy.com/JudgeOnline/problem.php?id=3672 题解: 斜率优化DP,点分治(树上CDQ分治...) 这里有一个没有距离限制的简单版: ...

  6. hdu 5266 pog loves szh III(lca + 线段树)

    I - pog loves szh III Time Limit:6000MS     Memory Limit:131072KB     64bit IO Format:%I64d & %I ...

  7. poj 1845 (逆元 + 约数和)

    题意: 求A^B的所有约数(即因子)之和,并对其取模 9901再输出. 思路: A可以表示为A=(p1^k1)*(p2^k2)*(p3^k3)*....*(pn^kn)   其中pi均为素数 那么A的 ...

  8. monitoring with Prometheus

    Prometheus是一款开源的监控工具,支持k8s metrics的数据格式,同时也支持通过k8s api进行服务发现从而实现对自定义的metrics进行监控.下面通过一个示例来介绍如何将Prome ...

  9. angular 路由的引用

    使用angular路由 遇到的坑. 使用cmd 安装好node.js 安装成功 输入node  -v 能查看版本说明安装成功 搭建angular项目输入命令 npm install  -g  angu ...

  10. Button 使用Command 按钮置灰未更新

    当Button绑定了Command,按钮在窗口弹出.或者其它事件时,会自动置灰. 有时,异步执行时间较长时,界面一些绑定了命令的Button,State不会变化,会一直置灰. 直到再次转移Focus. ...