473,320 Members | 1,831 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

usage of AFTER LOGON DATABASE trigger

plse help me how to use

AFTER LOGON DATABASE trigger


for chnging NLs settings in the java application
Oct 21 '09 #1

✓ answered by debasisdas

try this sample code
Expand|Select|Wrap|Line Numbers
  1. create or replace trigger mytrig1
  2. after logon on scott.schema
  3. declare
  4. a char(3);
  5. begin
  6. select to_char(sysdate,'dy') into a from dual;
  7. if a in('sun','sat') then
  8. Raise_application_error(-20004,'Cannot LOGIN today');
  9. end if;
  10. end;
  11.  

1 3465
debasisdas
8,127 Expert 4TB
try this sample code
Expand|Select|Wrap|Line Numbers
  1. create or replace trigger mytrig1
  2. after logon on scott.schema
  3. declare
  4. a char(3);
  5. begin
  6. select to_char(sysdate,'dy') into a from dual;
  7. if a in('sun','sat') then
  8. Raise_application_error(-20004,'Cannot LOGIN today');
  9. end if;
  10. end;
  11.  
Oct 21 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Ian Taite | last post by:
Hello, I'm exploring why one of my C# .NET apps has "high" memory usage, and whether I can reduce the memory usage. I have an app that wakes up and processes text files into a database...
0
by: Roman Troshkov | last post by:
Hello, I Hope to see any opinions on this problem: After installing Net framework 2 on one of our Win2003 Web server I have experiencing trouble accessing MS SQL 2000 database. Configuration...
2
by: mghale | last post by:
Hello, I have to create a trigger to accomplish the following: Before the insert into table A occurs, the trigger must check to see if the combination of two columns (from the insert...
5
by: marcsirois | last post by:
I am maintaining an application where most of the business rules are in Triggers, Stored Procedures and User Defined Functions. When a bug arises, it can get very tedious to debug. Today for...
3
by: Wojto | last post by:
Hi there! I need to write a trigger that will check referential integrity of my data. I have few FOREIGN KEY constraints but, as You probably konow, the cannot be deferred (in the meaning of SQL...
1
by: Reshmi Jacob | last post by:
Hi I have created a trigger for identifying the users lgin history : create table logon_tbl (who varchar2(30), when date); create or replace trigger trg_logon_db after logon on...
1
by: Stout | last post by:
Is it possible to create a trigger in one database, that after an insert, will update a database on a different server? If so, how would I do this? Thanks. Bill
1
by: oracle newbie | last post by:
I found one coding on site and i have 2 doubt The DATABASE is refering to all the database ? Can I change the word to a Connection Name? create or replace trigger logon_audit_trigger AFTER...
5
by: mikys67 | last post by:
Hi. I have to trace some users application to find the source of problems. Oracle8i Enterprise Edition Release 8.1.7.0.0 connect system/manager@testdb create or replace trigger...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.