473,487 Members | 2,667 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Creating trigger on stored procedure

7 New Member
i know, it sounds odd but i want to create a trigger on a sp is it possible, if not why?
Jul 30 '13 #1
5 2697
Rabbit
12,516 Recognized Expert Moderator MVP
What is the purpose of this? What are you trying to do? I can't really think of a scenario that would require this because stored procedures are explicitly called, therefore making triggers on them unnecessary.
Jul 30 '13 #2
Basanth
7 New Member
i am hoping track if anybody modifying the SPs other than me and i want to know is it possible in any way... may not be by triggers.
Jul 30 '13 #3
Rabbit
12,516 Recognized Expert Moderator MVP
It sounds more like you want logging and or version control. If it's logging you want, the database administrators will have access to the logs, and if not, they can turn logging on. As for version control, you just need to treat stored procedures like you would any other coding project.

If the reason for this is that your stored procedures are being changed by someone that shouldn't be changing them, then that's a security issue. The database administrators need to set up the permissions correctly so that only you are allowed to modify the stored procedure.
Jul 30 '13 #4
ck9663
2,878 Recognized Expert Specialist
You can try to create a database trigger.

Good Luck!!!


~~ CK
Jul 30 '13 #5
Basanth
7 New Member
Finally!!!
Expand|Select|Wrap|Line Numbers
  1. CREATE TRIGGER DDLTrigger_Sample
  2. ON DATABASE
  3. FOR ALTER_PROCEDURE, DROP_PROCEDURE
  4. AS
  5. BEGIN
  6. //Your logic
  7. END
Jul 31 '13 #6

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

Similar topics

2
5385
by: Satvic | last post by:
Hi all, Sorry for HTML, there is a lot of code & comments I tried to create a stored procedure from 3 queries .. to reduce # of times DB gets access from 1 asp page. The result procedure only...
1
4221
by: Alvin | last post by:
Hi All I need opinions on how to approach my task. I currently have 3 tables: the master table, the archive and a temp table. MASTER: has 3 fields ProductID and ProductNo and Released ARCHIVE:...
1
4162
by: Jim | last post by:
Im trying to create a stored procedure that selects everything from a function name that im passing in through a parameter.. create procedure SP_selectall (@functionname varchar(25)) as ...
4
1503
by: Shawn Fletcher | last post by:
Hi, I'm trying to work around a bug that our helpdesk software has. When a new issue is created, it cannot automatically default 2 fields to the value of No like we need it to. I have a...
3
4622
by: Bob Gabor | last post by:
Running 8.1 w/FP5 on Windows 2000. Everytime I try to create a stored procedure, I get the following error saying that my database is damaged: DB21034E The command was processed as an SQL...
1
1915
by: RSH | last post by:
Im trying to create a stored procedure of the following code. I want to set it so that I have to send the first 4 variables (@DB, @BackUpFile,@TestDB,@RestoreFile). I am having trouble when i try...
0
1425
by: api | last post by:
Hello, I never worked with SP/triggers in MySQL, I have this problem. On webpage I'd like to show online users, so idea is very simple: in one select (SP) make all necesary things. I begin with:...
1
6335
by: Ir0neagle | last post by:
I am generating upgrade/new install scripts for my project. I am able to do this in oracle and sql server but an running into problems in db2. What I am trying to do is to use some logic to only...
0
1807
by: mersis | last post by:
I have a very very annoying problem. I want to create a stored procedure, that creates a table and does various things with it. Before creating a stored procedure I check if the table is there. If it...
3
2847
by: viny2cool | last post by:
Here is my code : CREATE OR REPLACE PROCEDURE BranchAppProc (BranchIN IN Branch.Branchname.Branchname%TYPE, BranchPOPUIN IN Branch.Branchname.Branchpopulation%TYPE) IS BranId...
0
7106
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6967
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7181
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6846
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7349
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4565
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3076
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
600
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
267
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.