Notification: How can i get notification(table name and row id) from Sql Server database when data insert,update into table.My Allication using java or javascript.Please advice.
Asked
Active
Viewed 140 times
2
-
1You need to look up triggers. – Gordon Linoff Mar 05 '18 at 03:00
-
My requirement is trigger can't insert into any other temp_table. – K.Sudhir Bab Mar 05 '18 at 03:07
-
in oracle "USER_CHANGE_NOTIFICATION_REGS". – K.Sudhir Bab Mar 05 '18 at 03:10
-
https://docs.oracle.com/cd/E11882_01/java.112/e16548/dbchgnf.htm#JJDBC28816 – Abdul Aziz Al Basyir Mar 05 '18 at 03:19
-
have a look at this https://stackoverflow.com/questions/2247679/sql-server-trigger-insert-values-from-new-row-into-another-table – Harry Mar 05 '18 at 03:20
-
and at that doc, i have know oracle using like trigger too.., what wrong? – Abdul Aziz Al Basyir Mar 05 '18 at 03:20
-
Possible duplicate of [SQL Server Query Notifications in JAVA](https://stackoverflow.com/questions/23659038/sql-server-query-notifications-in-java) – p-a-o-l-o Mar 05 '18 at 12:44
1 Answers
0
In MS SQL, You just using tringger (like MySQL),
CREATE TRIGGER TriggerName ON SourceOfYourTabe
FOR INSERT, UPDATE, DELETE
AS
// SOME QUERY TO PUSH YOUR NOTIF
GO
Refrence By:
https://docs.oracle.com/cd/E11882_01/java.112/e16548/dbchgnf.htm#JJDBC28816
https://learn.microsoft.com/en-us/sql/t-sql/statements/create-trigger-transact-sql

Abdul Aziz Al Basyir
- 1,104
- 13
- 28
-
Using Trigger how to get message notification in sql server dynamically.ex:postgres below: CREATE OR REPLACE FUNCTION pg.notify_change() RETURNS TRIGGER AS $$ BEGIN PERFORM pg_notify('tblexample','pg.tblexample'); RETURN NEW; END; $$ LANGUAGE plpgsql; CREATE TRIGGER table_change AFTER INSERT OR UPDATE OR DELETE ON pg.tblexample FOR EACH ROW EXECUTE PROCEDURE ph.notify_change(); – K.Sudhir Bab Mar 05 '18 at 03:40