SQL & PL/SQL :: QUERY - Host Name And Max Logon Day?
Oct 27, 2010
I want to host name and max logon day from the below query But host name not belongs to start with 'IRS%' and 'EMEAUKIMIV00023828'.
My question is How to handle the backslash in oracle 8i and also check the below query is ok or not,
select host, max(logon_day) from (
select host,logon_day from system.stats$user_log
where host not like 'IRS%'
AND not in ('EMEAUKIMIV00023828'))
group by host;
View 10 Replies
ADVERTISEMENT
Feb 23, 2010
I have a table that has three columns.
UserId - DateStamp - Action
An action contains user activities such as "logon". A user may logon multiple times in a day.I'm trying to create a query that displays the number of unique logons for each user per day.
By doing the following:
select userid, to_char(creationtimestamp,'YYYY-MM-DD'), count(*)
from useraction
where action = 'logon'
group by to_char(creationtimestamp,'YYYY-MM-DD'), userid
order by to_char(creationtimestamp,'YYYY-MM-DD') desc;
I can get the following results
userid - date - count
1 - 2/21/2010 - 8
1 - 2/22/2010 - 3
2 - 2/22/2010 - 2
1 - 2/23/2010 - 1
4 - 2/23/2010 - 6
6 - 2/23/2010 - 1
What I'm trying to get is
2/21/2010 - 1
2/22/2010 - 2
2/22/2010 - 3
View 2 Replies
View Related
May 9, 2011
There is a xxxxx.sql file in the OS level which contains create or replace trigger script. I modified that file with the code below:
if(upper(USER)= 'U_USER') then
execute immediate 'alter session set current_schema=USER';
end if;
after that, I went to sqlplus
and logged in to U_USER like this
SQL>conn U_USER/U_USER;
connected.
SQL>@xxxxx
some numbers are getting generated if i press enter.
Then i press ctrl +c and get to sql prompt.
I issue
SQL>select SYS_CONTEXT('USERENV','CURRENT_SCHEMA') FROM DUAL;
I am getting the output as U_USER but I must get the output as USER and not as U_USER. Basically the trigger is not getting updated.
View 1 Replies
View Related
Jun 20, 2012
I'm looking to create an after logon trigger... my question is - can this trigger be created by any user (i.e. other than sys) and - if so - what's required to ensure it fires for EVERY other user that log's on to the database?
View 2 Replies
View Related
Mar 21, 2011
i installed Oracle 11.2.0 64bit & Oracle SQL developer 2.1.1.64 on Windows-7 64bit
i try to connect to database like this:
username: scott
password: tiger
role : sysdba
hostname: localhost
port : 1521
sid : ORCL
and i got this error: `ora-01017 invalid username/password; logon denied`
View 3 Replies
View Related
Feb 3, 2012
I am developing menu.. in that menu having 5 different forms.. these forms are 3 one schema ( i.e X ) and remaining 2 forms are one schema ( i.e Y )..
i am calling x schema
form level trigger on_logoon :
onlogon('a','a@X');
a for Username and x database name and another form in form level trigger on_logon : coding
logout;
logon('b','b@Y');
b for Username and y database name
but the form is not executing and not saving the record's.
View 1 Replies
View Related
Aug 4, 2011
How to grep client's IP address when LOGON to database? I write a trigger , but when compile , it show Error , Here is code :
CREATE OR REPLACE TRIGGER On_Logon
AFTER LOGON ON The_user.Schema
DECLARE
v_addr VARCHAR2(11);
BEGIN
IF (ora_sysevent = 'LOGON') THEN
v_addr := ora_client_ip_address;
raise_application_error( '-20001', 'user IP: '||v_addr);
END IF;
END;
[code]....
View 13 Replies
View Related
Apr 28, 2011
i would like to trace some connexions on database, once compile the code , i have the issus following:
10/2 PL/SQL: SQL Statement ignored
11/20 PL/SQL: ORA-00942: table or view does not exist
this is the
DROP TABLE connect_user;
CREATE TABLE connect_user
(
nom_ora varchar2(15),
naom_os varchar2(15),
programme varchar2(20),
poste varchar2(20),
[code]...
View 3 Replies
View Related
Jul 30, 2010
getting logon timestamp for our auditing process. In some website, it says to get the logon timestamp I have to select it from timestamp column of dba_audit_session but when I do this, some results has a logoff earlier than logon. Is timestamp column really the logon timestamp?
SELECT
returncode,
(logoff_time-timestamp) timeonline,
TO_CHAR(timestamp, 'DD-MON-YYYY HH24:MI:SS') LOGON_TIME,
TO_CHAR(logoff_time, 'DD-MON-YYYY HH24:MI:SS') LOGOFF_TIME,
action_name
FROM dba_audit_session;
[code]....
View 2 Replies
View Related
Mar 3, 2005
I am working on oracle 9.0.1 version on XP.
Here I am unable to log as sysdba
I am doing like this
d:sqlplus /nolog
sql>conn /as sysdba
not working,giving an error then i tried
sql>conn sys as sysdba
again same error :_ insufficent Priv..
where as sql> conn system/manager working
View 21 Replies
View Related
Mar 11, 2004
I have a externally identified oracle id. In the logon screen I want to enter / and logon externally.
I have tried using ? with LOGON built in package but it doesn't work.
/@<servername> does not work ?
how to logon to oracle forms with a externally identified password?
View 1 Replies
View Related
Aug 5, 2010
why my logon trigger always creates 2 records with different timestamp. Also is this the proper way of excepting records to insert?
Script.
CREATE OR REPLACE TRIGGER TR_LOGON_AUDIT
AFTER LOGON ON DATABASE
BEGIN
If user<> 'DBSNMP' then -- don't want to insert this
if user <> 'SYS' then -- don't want to insert this
[code]....
Result when select.
OS_USERNAME LOGON_TIMESTAMP
----------- ----------------
GAN 2010-08-05 14:27:52
GAN 2010-08-05 14:27:55
View 12 Replies
View Related
Mar 17, 2011
Which Privileges required to create a trigger like after logon on database. I have grant Create any trigger privilege to user but still not able to create and give me an error insufficient Privilege.
View 5 Replies
View Related
Oct 19, 2010
i am getting ORA-01017 error frequently .
we have an application that is running from remote host to connect database using JDBC driver 10.2.0.2
but i am getting ORA-01017 error intermittently. we fetching stored username/pwd after every 5 min but for certain interval it's giving error and we get connection sucessful after some time with same username pwd.
the application monitor more number of databases but facing problem with only 1 instance.
View 1 Replies
View Related
Jun 26, 2012
Case 1,
-I have a Oracle Client 11.2.0.1 (*Administrator*) installed on a client machine on Redhat 6.
-I have a database 11.2.0.1 testdb installed on another machine.
I configured tnsnames.ora for the client machine to connect my database testdb.If I use sqlplus to connect to the testdb from client machine, it's successful.However, If I use one of the jdbc connection string from the client machine, it reports "ORA-01017: invalid username/password; logon denied"
Case 2,
-I have a Oracle Client 11.2.0.1 (*Runtime*) installed on a client machine on Redhat 6.
-I have a database 11.2.0.1 testdb installed on another machine.
I configured tnsnames.ora for the client machine to connect my database testdb.
-If I use sqlplus to connect to the testdb from client machine, it's successful.
-If I use one of the jdbc connection string from the client machine, it 's successful too.
For case 1 and case 2, the only difference is the Oracle client (one is Runtime, the other is administrator)The database I have is set to
SQL> show parameters case
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
sec_case_sensitive_logon boolean FALSE
why the administrator client report ORA-01017?
View 15 Replies
View Related
Jun 18, 2013
my listener getting started and database also up
but gives error
Connecting as SAPSR3/<pwd>@ECC on connection 0 (nls_hdl 0)
Logon as OPS$-user to get SAPSR3's password
If can share screen shots are some link so i can go aehad
what is the default password for SYSTEM
View 1 Replies
View Related
Jul 2, 2011
I am not able to login in the database with sys user. when i am trying with sqlplus "/as sysdba" it is showing
ERROR: ORA-01031: insufficient privileges.
& when i am trying with sqlplus sys as sysdba it is showing
ERROR:ORA-01017: invalid username/password; logon denied.
I login with system user and changed the password of sys nd then tried login with sys but same result.
remote_login_passwordfile is set to NONE nd i am login through that user only by which i was always able to login.
View 23 Replies
View Related
Nov 16, 2011
I am working in the company which is using PL/SQL to create web interface. Of course we are using mod_plsql. I was using OWA_UTIL get_cgi_env ('REMOTE_ADDR') in the packages and it was always properly returning the IP address of the client. But Now I want to use it in after logon on schema trigger and it is never initialized.
Maybe some other way to obtain the IP of the client machine just before calling the package which is showing the interface?
Here is the simplified code of the trigger:
CREATE OR REPLACE TRIGGER dev_debug_trg AFTER LOGON ON SCHEMA
DECLARE
l_ip VARCHAR2(200);
BEGIN
[Code].....
View 3 Replies
View Related
Apr 24, 2012
is it possible to login as SYSDBA in oracle forms from normal logon procedure?
logon(sys_acc, sys_pwd||'@'||:GLOBAL.db_conn);
The reason behind this is to make a form which will alter user's password. But all the users are in SYS account and it is necessary to login as SYSDBA in forms to execute alter statement.
View 4 Replies
View Related
Sep 24, 2013
I have a log-in problem. I created the new database and when I try to log-in with system user, its giving ORA-01017: invalid username/password; log-in denied, and when I try to log-in with "/ as sysdba" its successfully logged in.
When I try to change SYSTEM user password, I successful change and connecting and after few seconds when I try to connect its again giving same error "ORA-01017: invalid username/password; log-in denied
And I disable the case sensitive password also:
sec_case_sensitive_logon boolean FALSE
OS: windows
Oracle Versions: 11.2.0.1.0
View 6 Replies
View Related
Aug 13, 2012
I want to get the details of the SYS/SYSTEM users logon and Logoff's time.
Steps 1:
=======
SQL> SHOW PARAMETER AUDIT
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
audit_file_dest string C:ORACLEPRODUCT10.2.0ADMIN
DB10GADUMP
audit_sys_operations boolean FALSE
audit_trail string NONE
SQL>
Step 2:
=======
Set the Necessary parameters:
-----------------------------
alter system set audit_trail=db scope=spfile;
Step 3:
=======
Shutdown the DB
Step 4:
=======
Restart the DB
Step 5:
=======
For auditing the Session. Fire the below command.
AUDIT CREATE SESSION;
Step 6:
=======
select DISTINCT USERNAME,os_username,timestamp,logoff_time
from DBA_audit_session;
When I fire the above query, I couldn't get the SYS user's LOGOFF time. But for rest of the users, I am getting.
View 12 Replies
View Related
Mar 22, 2010
One of our requirements is to secure the listener and other Oracle services by running them as a local OS account rather than as LocalSystem on the server.
I created a local OS account (assume it's named oracleuser), assigned it to the User and ORA_DBA groups on the server, and then I went to the Local Policies and added oracleuser to "Deny log on locally" and "Log on as a service".
I opened up the Services utility and stopped the four Oracle services we have running (OracleMTSRecoveryService, xxx_home1iSQL*Plus, xxx_home1TNSListener, and OracleServiceMYDB). I changed the "Log on as" for each service to oracleuser with its password (copied and pasted so I know there are no typo's), and restarted the services.
All the services except the listener started up. Attempting to start the listener caused the following error:
"The xxx_home1TNSListener service on Local Computer started and then stopped. Some services stop automatically if they have no work to do, for example, the Performance Logs and Alerts service."
I tried rebooting the server and had the same result.For now just the listener service has been switched back to logging in as LocalSystem while the other services continue to use the local OS account and the database seems stable, but I do need to figure this out.
View 2 Replies
View Related
Jan 26, 2012
ORA-00600: internal error code, arguments: [kcbchg1_11], [], [], [], [], [], [], []
ORA-01017: invalid username/password; logon denied
Current SQL statement for this session:
insert into sys.aud$( sessionid,entryid,statement,timestamp#, userid,userhost,terminal,action#,returncode, obj$creator,obj$name,auth$privileges,auth$grantee, new$owner,
new$name,ses$actions,ses$tid,logoff$pread, logoff$lwrite,logoff$dead,comment$text,spare1,spare2, priv$used,clientid, sessioncpu) values(:1,:2,:3,SYSDATE,:4,:5,:6,:7,:8
,:9, :10,:11,:12,:13,:14,:15,:16,:17, :18,:19,:20,:21,:22,:23,:24, :25)
View 6 Replies
View Related
Oct 15, 2012
"ORA-01017: invalid username/password; logon denied" when attempting to log on to db, in three different applications. Error is observed in Toad, Crystal Reports, and MS ODBC Administrator connect test. However, same db credentials work in SQLPLUS.
Customer is attempting to log into reporting database hosted by my company, and using Cisco VPN client.I am unable to reproduce this at this time, on my machine, using same credentials and VPN profile.
Here is what we know/tried:
1. PING HOSTNAME is successful on CUSTOMER’S machine
2. TNSPING HOSTNAME is successful on CUSTOMER’S machine
3. SQLPLUS is successful with USER2/(pw)@HOSTNAME.int on CUSTOMER’S machine
4. We corrected timeout error on CUSTOMER’S side, by adding TCP.CONNECT_TIMEOUT=1000 in SQLNET.ORA (Also observed extremely slow performance on CUSTOMER SIDE)
5. We corrected dns suffix problem on CUSTOMER’S side, observed in NSLOOKUP by adding: IP ADDRESS AND HOSTNAME to Windows HOSTS file and commenting out default suffix COMPANY.com from SQLNET.ORA file
6. VPN configuration and VPN credentials are good.
We tested CUSTOMER’S VPN profle, CUSTOMER’S VPN credentials, and user USER2/(pw)@HOSTNAME on my machine (WIN7). I am able to maintain persistant connection to HOSTNAME for hours
7. TNSNames entries are good. Able to connect to db in Toad, and Crystal, on CUSTOMER’S machine using different Oracle user, USER3 (only has grant connect). Unable to logon to db, with Oracle user USER1, or USER2. (USER2 was created to try to resolve login problem w USER1, but issue still exists.)
8. CUSTOMER has Windows VISTA, does not have admin privileges, has Oracle 10 installed for client. Using same Cisco VPN client I have installed.
9. Database on our servers is 11g
View 11 Replies
View Related
Sep 20, 2013
I'm setting up APEX REST security by following the instructions from [URL]...Everything works great according to document.
I can acquire a token, then passing it in the header to get needed data from REST service. Consumer acquires an token by going on web browser to [URL]...
It will be redirected to[URL]... asking for username and password on browser. Once entering them correctly, it will be directed to Redirect URI defined in the OAuth2 client with the token in the URL.
My question is that is it possible to do token acquiring by coding (like in Salesforce) without going to web browser? We've tried doing that, it will stop due to redirect to sign-on.
View 3 Replies
View Related
Oct 29, 2010
We are going to test migration of g10 to g11. To reduce maintenance of configuration we want to install new Oracle on the same server and start on the same port with the same SID. To achieve that we are going to configure new Oracle on different IP and hostname (managed by DNS, whatever). So listener will be configured like for different servers with identical SIDs.
View 5 Replies
View Related
Mar 10, 2013
I will be duplicating my production database back to a few weeks ago on my test server, to retrieve certain data. I am running 11g standard edition, not using a recovery catalog.
Below are the basic steps I plan to take in a nutshell.
1. Copy the backup files to the test system
2. In the rman run block (on the test server)
A. Set newname for each of the datafiles and tempfiles (don't have many files)
B. Duplicate command to point in time, specifying backup location and no filename check.
3. Export the data
View 6 Replies
View Related
Jun 3, 2011
I am using windows 7 as my platform...I am not able to set host credential in my system. I want to know how to set host credential in windows 7.
View -1 Replies
View Related
Dec 22, 2011
i have some confusion with bind and host variable.
View 4 Replies
View Related
Jul 11, 2012
Here i have three tier application. I want to know it host name from sid or sqlid . I want to know which query run on which host. Because i have one user from application to database. So i want to know which query consume more time on which host ?
View 19 Replies
View Related