How to find session information in sql plus
Can someone please tell me how to find session information in sql plus? I specifically want to know my privileges for the current session. Thanks in advance.
SELECT * FROM session_privs;
SELECT * FROM session_roles;
Similar Messages
-
How to find table information for a datasource?
Hi,
Can you please tell me how to find table information for a datasource. I am not getting much help from help.sap.
I am trying to find table information for below datasources. We are creating DSO's for the below mentioned datasources, for some we have standard DSO's(0WBS_O06), for others I am trying to create
0CO_OM_NWA_1,
0CO_OM_NWA_2,
0CO_OM_WBS_1,
0CO_OM_WBS_6
Please help me.
Regards,
Bob.Hi BOB,
Another option to find the table information...
inorder to get the tables names involved in that particular data source follow the below steps.
1) ST05 --> activate the Trace
2) RSA3 --> enter your data source (for ex: 0CO_OM_NWA_1)
3) Execute
4) Now goto ST05 -> deactivate the trace
5) click on Display trace(F7) button
6) Execute
7) It will display the complete SQL trace
8) Now from the Menu "Trace list" --> select "Combined Table Access"
it will display the complete tables list involved in that data source...
From Table name section you can get the list of tables involved in that data source.
I had traced and took the information of tables involved in that data source 0CO_OM_NWA_1
0CO_OM_NWA_1
AFKO Order header data PP orders
AFVC Operation within an order
AUFK Order master data
COSP CO Object: Cost Totals for External Postings
COSPP Transfer of the Order in the COSP Table to the Project
COSS CO Object: Cost Totals for Internal Postings
COSSP Transfer of the Order COSS Table to the Project
COVREF Coverage Reference Table: All Processing Blocks
COVRES Table of Coverage Results
You can follow the same steps and find the tables for the rest.
Regards
KP -
How to Generate Trace Files in SQL*Plus
Hi Friends ,
How to Generate Trace Files in SQL*Plus ?
i have no idea
thanks
rajWhat trace files would you like to generate?
Are we talking SQL trace files?
ALTER SESSION SET sql_trace = TRUE;This will be generated in the user_dump_dest on the server.
show parameter dump -
How to find leap year in sql query
How to find leap year in sql query
Select
CASE
WHEN result = 0 THEN 'Leap_Year'
WHEN result <> 0 THEN 'Not_A_Leap_Year'
END
From (Select mod((EXTRACT(YEAR FROM DATE '2013-08-24')), 4) result FROM DUAL); -
How to retreive this file in SQL*Plus
If I upload files which name is KOREAN, name of files is invisible.
I dont't know cause of this problem.
How is keeping korean name of file from breaking?
Also, answer how to retreive this file in SQL*Plus
Thanks
silverbellTo access ifs data from SQL, you need to (officially) setup a 'user view'. Refer to the Java API documentation on how to do this. Once you have created the user view, then you may access this view using any SQL tool.
-
IiPod serial number stored in iTunes, can anyone advise how I find this information for my insurance company?
Juliebathgate wrote:
IiPod serial number stored in iTunes, can anyone advise how I find this information for my insurance company?
Hi,
If you have made a backup at any time of your iPod in iTunes, it should be in Preferences, under Devices tab.
In iTunes
Open iTunes Preferences.
From the Preferences window click on the Devices.
Once you are there you should see a list under "Device Backups:".
Hover your mouse pointer to the device and in a little while it should display the serial number of the device (with an iPhone it will also display a phone number used with it and the IMEI code and with an iPad it will display the IMEI in addition to the serial number).
A pircture of where it can be found: http://km.support.apple.com/library/APPLE/APPLECARE_ALLGEOS/HT4946/en_US/HT4946- devices-iphone-001-en.png -
i downloaded lion but lost the setup assistant. please help me recover the setup assistant. i do not know where/how to find/enter information in the terminal as was suggested.
Launch the Terminal application; e.g., by entering the first few letters of its name in a Spotlight search. Copy or drag -- do not type -- the line below into the Terminal window, then press return:
sudo rm /var/db/.AppleSetupDone
You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up. Confirm.
Reboot. The Setup Assistant will launch. -
How to find the Information about DB-Server in OEM?
Hi all,
I would like to know, how to find the information about the Server-Machine on that the Database installed (Server ID, Network ID, IP-Address, ...) in Oracle Enterprise Manager.
Regards
Leonid PavlovHI Dan,
I dnt know what is SEM ? I Know that SEM uses BI data. if im wrong pls correct me, and my question is, is there any function modules like SD, MM like wise in R/3 is there any modules same in SEM . If they are where the information is stored that these modules are implemented.. at database level..
Thanks,
Mahesh -
How to Strip Extraneous Output from SQL*Plus Session
We are running Oracle Database 11g on Solaris 10, and I am trying to use SQL*Plus to create a temporary .sql file that I can execute in a later step of a Korn shell script. Here is the code:
$ORACLE_HOME/bin/sqlplus / as sysdba <<EOF
--whenever oserror exit failure;
--whenever sqlerror exit sql.sqlcode;
set serveroutput on
set termout off
set trimspool on
set verify off
set heading off
set feedback off
set echo off
spool /usr/oracle/temp/apply_site_security_for_oracle_database_11g.ksh.tmp
declare
Value_DSC varchar2(2000);
CommandLine_DSC varchar2(4000);
begin
select v\$parameter.value into Value_DSC from v\$parameter where lower(name)='diagnostic_dest';
CommandLine_DSC := 'host chmod 751 ' || Value_DSC;
dbms_output.put_line('--Ready to execute: ' || CommandLine_DSC);
dbms_output.put_line(CommandLine_DSC);
CommandLine_DSC := 'host ls -ld ' || Value_DSC;
dbms_output.put_line('--Ready to execute: ' || CommandLine_DSC);
dbms_output.put_line(CommandLine_DSC);
end;
spool off;
exit;
EOF
I've tried to turn off everything I don't need, but I am missing something. When I run the script, I get the following in the temporary file:
SQL>
SQL> declare
2 Value_DSC varchar2(2000);
3 CommandLine_DSC varchar2(4000);
4
5 begin
6 select v$parameter.value into Value_DSC from v$parameter where lower(name)='diagnostic_dest';
7
8 CommandLine_DSC := 'host chmod 751 ' || Value_DSC;
9 dbms_output.put_line('--Ready to execute: ' || CommandLine_DSC);
10 dbms_output.put_line(CommandLine_DSC);
11
12 CommandLine_DSC := 'host ls -ld ' || Value_DSC;
13 dbms_output.put_line('--Ready to execute: ' || CommandLine_DSC);
14 dbms_output.put_line(CommandLine_DSC);
15 end;
16 /
--Ready to execute: host chmod 751 /s01/app/oracle
host chmod 751 /s01/app/oracle
--Ready to execute: host ls -ld /s01/app/oracle
host ls -ld /s01/app/oracle
SQL>
SQL> spool off;
I am hoping to whittle this down to just the following lines so I can execute them as a script.
--Ready to execute: host chmod 751 /s01/app/oracle
host chmod 751 /s01/app/oracle
--Ready to execute: host ls -ld /s01/app/oracle
host ls -ld /s01/app/oracle
Any ideas?
Edited by: shew01 on Jan 19, 2010 10:51 AMI just found it. Just add "-S" to the sqlplus command. Argh... I hunted for that a while back. Why didn't I remember it??????????
This works:
$ORACLE_HOME/bin/sqlplus -S / as sysdba <<EOF
whenever oserror exit failure;
whenever sqlerror exit sql.sqlcode;
set serveroutput on
set linesize 2000
set pagesize 0
set termout off
set trimspool on
set feedback off
spool /usr/oracle/temp/apply_site_security_for_oracle_database_11g.ksh.tmp
declare
Value_DSC varchar2(2000);
CommandLine_DSC varchar2(4000);
begin
select v\$parameter.value into Value_DSC from v\$parameter where lower(name)='diagnostic_dest';
CommandLine_DSC := 'host chmod 751 ' || Value_DSC;
dbms_output.put_line('--Ready to execute: ' || CommandLine_DSC);
dbms_output.put_line(CommandLine_DSC);
CommandLine_DSC := 'host ls -ld ' || Value_DSC;
dbms_output.put_line('--Ready to execute: ' || CommandLine_DSC);
dbms_output.put_line(CommandLine_DSC);
end;
spool off;
exit;
EOF
Edited by: shew01 on Jan 19, 2010 11:02 AM -
How to get Arabic dates in SQL*Plus?
I want to do a very simple thing.
I want to type in Arabic and Display dates in Arabic.
Instead i get ????? ??????? ????? ??????? ? ? ???????, ????? for this?
Why is this?
I then changed my Windows XP "Regional and Language Options" all to Arabic. Now, I get AR (Arabic) in my language selection bar at the bottom of the Desktop. When I choose AR I can type Arabic in Notepad. ُ
Even HERE I can type in Arabic: فغحث غخعق ةثسسشلث اثقث
But in Sql*PLus I get ????? ??????? ????? ??????? ? ? ???????, ?????
If I choose AR in SQL Plus and type in Arabic I get garbage characters?
How to get Arabic in Sql*Plus?
SQL> SHOW USER
USER is "ARABDTEST"
SQL> SELECT * FROM v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
PL/SQL Release 11.1.0.6.0 - Production
CORE 11.1.0.6.0 Production
TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
NLSRTL Version 11.1.0.6.0 - Production
SQL> SELECT * FROM nls_session_parameters;
PARAMETER VALUE
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
17 rows selected.
SQL> ALTER SESSION set NLS_DATE_LANGUAGE = 'ARABIC';
Session altered.
SQL> SELECT TO_CHAR(SYSDATE, 'RRRR/MM/DD YEAR MONTH DAY MON DY AM PM DL') FROM dual;
TO_CHAR(SYSDATE,'RRRR/MM/DDYEARMONTHDAYMONDYAMPMDL')
2013/04/08 TWENTY THIRTEEN ????? ??????? ????? ??????? ? ? ???????, ????? 08, 2013
SQL> ALTER SESSION set NLS_DATE_LANGUAGE = 'AMERICAN';
Session altered.
SQL> SELECT TO_CHAR(SYSDATE, 'RRRR/MM/DD YEAR MONTH DAY MON DY AM PM DL') FROM dual;
TO_CHAR(SYSDATE,'RRRR/MM/DDYEARMONTHDAYMONDYAMPMDL')
2013/04/08 TWENTY THIRTEEN APRIL MONDAY APR MON PM PM Monday, April 08, 2013
SQL> SELECT * FROM nls_database_parameters;
PARAMETER VALUE
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CHARACTERSET WE8MSWIN1252
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_RDBMS_VERSION 11.1.0.6.0
20 rows selected.I am not sure SQL*Plus in character mode can display Arabic characters on Windows. OTN NLS_LANG FAQ http://www.oracle.com/technetwork/products/globalization/nls-lang-099431.html#_Toc105389288 says:
>
if you are testing with "special" characters please DO use the GUI and not the "DOS box" sqlplus.exe !
>
SQL*Plus GUI is not available with 11G: you should use SQL Developer. -
How to find session of process executed
Hello
I want to find out particular session from where process is running. My procedure is running from java application. I want to find out which session has generated/called process. i.e If user U1 and U2 has running process from screen, then in process logs i m not able to idenitfy which session has geneated what logs.
My requirement is i want to find out logs with user or session information. This is required to find out concurrency issues of process.
I have tried with v$session, however from that table i m not able to find out particular session. Please help.
Thanks in advanceIn a 3 tier architecture the database tier sees the application tier as the client - not the presentation layer user. The data tier has no idea what is beyond the application tier.
If you want the data tier to know who/what the presentation tier client is, the application tier has to pass that data to the data tier.
One method in Oracle is for the application tier to use the [SET_CLIENT_INFO|http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_appinf.htm#CHEJCFGG] call of the DBMS_APPLICATION_INFO PL/SQL package.
Another method is to use a CONTEXT to set name-space variables in that Oracle session equal to end-user details. -
How to bind DATE variables in SQL*Plus
I have a stored procedure in a package that has a DATE OUT parameter
myPackage.myProcedure( outDate OUT DATE )
I am trying to test this from SQL*Plus
How do I specify a Bind variable for the outDate? The VARIABLE command does not allow DATE types?
If this was a CHAR type I could have done
VARIABLE myChar CHAR
BEGIN
myPackage.myProcedure( :myChar )
END;
PRINT myChar
How do I do this with DATE data types instead? I am using Oracle 8.1.7.you should use VARCHR2 type with the minimum length that can store a value defined by your NLS_DATE_FORMAT
string. The returned date will be converted to a VARCAHR2 type and the size and format will depend on
your NLS_DATE_FORMAT setting.
=============================================================================
SQL> variable dt VARCHAR2(20)
SQL> create or replace procedure ret_date(dt OUT DATE) is
2 begin
3 dt := SYSDATE ;
4 end ;
5 /
Procedure created.
SQL> exec ret_date(:dt) ;
PL/SQL procedure successfully completed.
SQL> print dt
DT
13-OCT-02
SQL> select sysdate from dual ;
SYSDATE
13-OCT-02
SQL> alter session set nls_date_format = 'DD-MON-YYYY HH24:MI:SS' ;
Session altered.
SQL> exec ret_date(:dt) ;
PL/SQL procedure successfully completed.
SQL> print dt
DT
13-OCT-2002 10:43:23
SQL>
================================================================ -
How to compile a procedure from Sql*Plus?
Dear friends,
I couldnt find the way how to compile my invalid procedure through sql*Plus.
I know this is very awkward,but I m in need of that command only.
Thanks
Ritesh SharmaPls check it --
SQL>
SQL>
SQL> @C:\RND\Oracle\Function\a.sql;
11 /
Function created.
SQL>
SQL>
SQL> start C:\RND\Oracle\Function\a.sql;
11 /
Function created.
SQL> Regards.
Satyaki De. -
How to find sid,serial# for sql in v$sqlarea
Hi,
10gR2
in order to dig down the session which is running particular sql
say querying v$sqlarea and getting sql_id
now how to map it to v$sessionthanks for the reponse
Join v$sqlarea's address with v$session's sql_address.
does this always mapped, even if sql has completed execution
say i have made a session of user scott
and ran this statement
===================================
SQL> create table my_obj as select * from obj;
Table created.
now i jhave another session of sys to find session details
============================================
SQL> select SQL_ID,EXECUTIONS,DISK_READS,BUFFER_GETS,ADDRESS,CPU_TIME,PROGRAM_ID,SQL_TEXT
FROM GV$SQLAREA WHERE SQL_TEXT LIKE ' 2 %MY_OBJ%';
SQL_ID EXECUTIONS DISK_READS BUFFER_GETS ADDRESS CPU_TIME
PROGRAM_ID
SQL_TEXT
4hshv4csmh7d8 1 0 14 000000007ECDF248 2899
0
select SQL_ID,EXECUTIONS,DISK_READS,BUFFER_GETS,ADDRESS,CPU_TIME,PROGRAM_ID,SQL_
TEXT FROM GV$SQLAREA WHERE SQL_TEXT LIKE '%MY_OBJ%'
SQL> select sql_address ,sid,serial#,username from v$session where sql_address='000000007ECDF248';
no rows selected
SQL> select sql_id ,prev_sql_id ,sql_address ,sid,serial#,username from v$session where sql_id='4hshv4csmh7d8';
no rows selected
SQL> select sql_id ,prev_sql_id ,sql_address ,sid,serial#,username from v$session where prev_sql_id='4hshv4csmh7d8';
no rows selected
please suggest
another other view
or there may be two cases of this
case1 sql is running
case 2 sql is completed -
How to find required information in order to log on Business View Manager?
After Business Object Client installation successfully, I try to log on Business View Manager, but failed. One pop-up windows(Log on BusinessObjects Enterprise) come and let me put the information as below;
System:
User name:
Password:
Authentication:
Could anyone let me know how to find the above required information? Thanks!You need to find this information from a person who installed server part of this deployment.
System: Name of the CMS server
User name: Administrator or other user name that exist in the Enterprise
Password: obviously...
Authentication: type of the authentication setup on the server side for the user you will be using.
Maybe you are looking for
-
Using a US iPhone 3Gs in Europe for 4 months...
My daughter will be on a study abroad program in Italy for 4 months and likely will be frequently traveling to other European countries on the weekends, etc. What is the best way for her to be able to use her iPhone without incurring the potentially
-
Help with install photoshop cs4 extended in win7 64bit !
im using windows 7 ultimate 64bit, i tried to install photoshop cs4 extended but when it's done with error. So any idea about this issue ?
-
https://projeqt.com/toreajo/usa-vs-portugal-live-stream-ing-online/usa-vs-portugal-live-stream-ing-online https://projeqt.com/toreajo/usa-vs-portugal-live-stream-online/usa-vs-portugal-live-stream-online https://projeqt.com/toreajo/portugal-vs-usa-li
-
Whats up with the video card issues with Photoshop CC? I am going back to CS6.
Stop messinn up my workflow Adobe! Your upgrades are supposed to work.
-
Mscorsvw error message when trying to run Exchange 2013 CU 8
I'm getting this error when trying to run CU 8 on our Exchange 2013 server. How to make it not happen?? Is there any way to find out how/where this process is running so it can be closed?? Thank you, Tom