Trigger in SQL Server
hi,
Scenario : Insert into a table triggers a stored procedure on my DB (SQL 2000).
Question: Will the calling thread which initiated the insert wait for the stored procedure to end or will it make this as a back end process and return doing the insert.
Krish
Will the calling thread which initiated the
insert wait for the stored procedure to end or will
it make this as a back end process and return doing
the insert.That depends. SQL Server returns results asynchronously, i.e. it returns update counts and ResultSets as soon as the query that generated them is executed. For example if you had a query/stored procedure that consisted of three SELECTs of which the first and third were really fast but the second was much slower, you would get the first ResultSet immediately, but when you called getMoreResults() it would have to wait until the second SELECT started returning at least the first few rows.
A trigger is usually executed before the INSERT/UPDATE/whatever so if you want the update count you will have to wait until the trigger finishes; there's no way around it. If you don't want the update count, then most SQL Server drivers have a "lastUpdateCount" parameter, which you can set to false to get update counts returned from inside triggers instead of the last update count, which is usually generated by your operation. But you will have to make sure your trigger does return an update count before it starts doing anything which may take long to finish.
Also, some drivers may take other approaches to ignoring update counts from triggers (which usually don't interest anyone), soch as not considering update counts returned from inside stored procedures (triggers are basically stored procedures). If the driver you are using does this, then you're out of luck.
As you can see, it's really difficult to say what will happen. The conclusion is pretty simple: don't do any heavy work in a trigger; find a way around it.
Alin,
The jTDS Project.
Similar Messages
-
Create Fiat File Using Trigger in SQL Server
Dear All,
How to Create a Flat File using Trigger in SQL Server?Take a look at osql/sqlcmd, bcp, COM calls, xp_cmdshell, etc. Here are a few links with code examples:
https://www.simple-talk.com/sql/t-sql-programming/reading-and-writing-files-in-sql-server-using-t-sql/
http://www.nigelrivett.net/SQLTsql/WriteTextFile.html
http://stackoverflow.com/questions/8132663/creating-a-text-file-on-local-machine-using-sql-server-2008
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
How to use update trigger in sql server 2008 with specific column
Hello friends currently my trigger updates on table update, and I need to change this to only fire when specific column changes.
/****** Object: Table [dbo].[User_Detail] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[User_Detail](
[sno] [int] IDENTITY(1,1) NOT NULL,
[userid] [nvarchar](50) NULL,
[name] [nvarchar](max) NULL,
[jointype] [nvarchar](50) NULL,
[joinside] [nvarchar](50) NULL,
[lleg] [nvarchar](50) NULL,
[rleg] [nvarchar](50) NULL,
[ljoining] [int] NULL,
[rjoining] [int] NULL,
[pair] [int] NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[User_Detail] table data ******/
SET IDENTITY_INSERT [dbo].[User_Detail] ON
INSERT [dbo].[User_Detail] values (1, N'LDS', N'LDS Rajput', N'free', N'Left', N'jyoti123', N'SUNIL', 6, 4, 4)
INSERT [dbo].[User_Detail] VALUES (2, N'jyoti123', N'jyoti rajput', N'free', N'Left', N'mhesh123', N'priya123', 3, 2, 2)
SET IDENTITY_INSERT [dbo].[User_Detail] OFF
/****** Object: Table [dbo].[User_Detail] trigger ******/
CREATE TRIGGER triggAfterUpdate ON User_Detail
FOR UPDATE
AS
declare @userid nvarchar(50);
declare @pair varchar(100);
select @userid=i.userid from inserted i;
select @pair=i.pair from inserted i;
SET NOCOUNT ON
if update(pair)
begin
insert into Complete_Pairs(userid,pair)
values(@userid,1);
end
GO
/****** Object: Table [dbo].[Complete_Pairs] Script Date: 05/22/2014 21:20:35 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Complete_Pairs](
[Sno] [int] IDENTITY(1,1) NOT NULL,
[userid] [nvarchar](50) NULL,
[pair] [int] NULL
) ON [PRIMARY]
GO
my query is TRIGGER triggAfterUpdate is fired only when pair column in User_Details table is update only and when we update other column like ljoin or rjoin then my trigger is not fired
please any one can suggest us how it can done or provide solution
Jitendra Kumar Sr. Software Developer at Ruvixo Technologies 7895253402>select @userid=i.userid
frominserted i;
select
@pair=i.pair
frominserted i;
The code above assumes a single row UPDATE.
You have to setup the trigger for set processing like when 100 rows are updated in a single statement.
UPDATE trigger example: http://www.sqlusa.com/bestpractices2005/timestamptrigger/
Kalman Toth Database & OLAP Architect
SQL Server 2014 Design & Programming
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012 -
How to create conditional update trigger in sql server
How to create conditional update trigger in sql server
You cant create a conditional update trigger. Once you create an update trigger it will get called for every update action. However you could write logic inside it to make it do your activity based on your condition using IF condition statement
Say for example if you've table with 6 columns and you want some logic to be implemented on update trigger only if col3 and col5 are participating in update operation you can write trigger like this
CREATE TRIGGER Trg_TableName_Upd
ON TableName
FOR UPDATE
AS
BEGIN
IF UPDATE(Col3) OR UPDATE (Col5)
BEGIN
....your actual logic here
END
END
UPDATE() function will check if column was involved in update operation and returns a boolean result
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
Using Before report Trigger with Sql Server
i have used packages in oracle using before report triggers in bi publisher 11g is it possible to do in the same way with sql server ?? don't know much about sql server . any link or documents
Hi T.holt,
Personally, I don’t believe SQL 2008 R2 with ADMT 3.2 is supported. From the guidelines of install the Active Directory Migration Tool (ADMT), ADMT v3.2 requires a preconfigured instance of SQL Server for its underlying data store. We
should use SQL Server Express and install ADMT v3.2 on a member server. ADMT installation enforces the following service pack requirements:
• SQL Server 2005 Express must be installed with Service Pack 3 (SP3) or later.
• SQL Server 2008 Express must be installed with Service Pack 1 (SP1) or later.
If you use full versions of SQL Server 2005 or SQL Server 2008. In this case, you need to install and run the ADMT console on a remote computer, and you can run multiple ADMT consoles on different remote computers. If
you use a full version of SQL Server, ADMT installation does not enforce any service pack requirements.
For more information about installing ADMT in the target domain, you can review the following article.http://technet.microsoft.com/en-us/library/cc974370(v=ws.10).aspx
Regards,
Sofiya Li
Sofiya Li
TechNet Community Support -
Crear archivo de texto desde trigger en SQL SERVER 2005
Necesito crear un archivo .txt con cierto texto cada vez que se ejecuta el trigger. Quisiera saber como hacerlo.
GraciasY estando en el contexto de un gestor de bases de datos ¿porque quieres retroceder 30 años y utilizar ficheros planos para almacenar información?
Es mucho más sencillo (y eficaz, y versátil, y...) definir una tabla y almacenar en ella los mensajes que tienes pensado enviar al fichero de texto.
Why do you want to use ancient flat files when you have at your hands the power of sorting/searching/storing of a database management system?.
It is a lot easier and surely more productive to create a table and store there the messages you want to accumulate in txt files. -
Trigger problem on Sql Server with linked server to Oracle
Hi All,
I have a simple insert trigger on Sql Server 2005, it uses linked server to Oracle.
like that ;
USE [YTM08]
GO
SET QUOTED_IDENTIFIER ON
GO
ANSI_NULLS ON
go
ANSI_WARNINGS ON
CEATE TRIGGER [dbo].[YTM_TBLSTSABIT_I]
ON [dbo].[TBLSTSABIT] FOR INSERT
AS
BEGIN
INSERT INTO YTM_ORACLE..SECTOR.STOCKS
stock_name,
stock_code,
insert_date
SELECT
SBT.STOCKNAME,
SBT.STOCKCODE,
GETDATE()
FROM INSERTED SBT
END
The YTM_ORACLE is a linked server and it's provider is OraOLEDB.Oracle.
Trigger does not works for that linked server but other triggers for local
sql server works fine...
I get this error from sql server
'Heterogeneous queries require the ANSI_NULLS and
ANSI_WARNINGS options to be set for the connection. This ensures consistent query semantics. Enable these options and then reissue your query.'
Does someone know how to solve this issue the right way?
Thanks in advance.
Thanks !
AdamHi Lars,
Thanks for the data. I've already read this note and configure all this parameters. But when I'm executing the Create Source System in the BI system the process dies.
If I look into the logs I see this:
M call semaphore clean-up function ...
M ***LOG Q0E=> DpSigGenHandler, Exception (c06d007e) [dpnttool.c 432]
That's the reason why I start guessing about other possible problem.
Regards -
Can I call a Java program from a SQL Server Trigger?
Hello,
I want to encrypt some data in a database column in SQL Server. Today I am using java code to encrypt the value and store it in the database using JDBC.
Now I want to use a VB client to store the encrypted value in the SQL Server DB. Since the encryption is handled by a java class, can I write a trigger in SQL Server that while inserting the raw data, calls the java class for encrypting the value and then inserts the encrypted value into the column?
In general, is it possible to call a java class from a SQL Server trigger?
Thanks
BipinHere are 3 examples of code for insert, update and delete:
CREATE TRIGGER [PLI_INSERT_TRIGGER] ON [dbo].[PLI]
FOR INSERT
AS
Declare @cmd sysname, @code sysname, @list sysname
Select @code = PLI_K_COD, @list = PLI_K_LISTINO from inserted
Set @cmd = 'java mirrorDb.Copy PLI INSERT ' + @code + ' ' + @list
EXEC master..xp_cmdshell @cmd
CREATE TRIGGER [PLI_UPDATE_TRIGGER] ON [dbo].[PLI]
FOR UPDATE
AS
Declare @cmd sysname, @code sysname, @list sysname
Select @code = PLI_K_COD, @list = PLI_K_LISTINO from inserted
Set @cmd = 'java mirrorDb.Copy PLI UPDATE ' + @code + ' ' + @list
EXEC master..xp_cmdshell @cmd
CREATE TRIGGER [PLI_DELETE_TRIGGER] ON [dbo].[PLI]
FOR DELETE
AS
Declare @cmd sysname, @code sysname, @list sysname
Select @code = PLI_K_COD, @list = PLI_K_LISTINO from deleted
Set @cmd = 'java mirrorDb.Copy PLI DELETE ' + @code + ' ' + @list
EXEC master..xp_cmdshell @cmd
you must go "sql server entreprise manager" right click on the table you want to add triggers and select: all activities, manage triggers.
You have 3 examples: for an insert, for an update and for a delete
ON [dbo].[PLI] specify the table on which you want to setup trigger.
FOR DELETE, INSERT, UPDATE specify the event.
The Declare statement create the variables in which I want to put some values to pass to the java program, for example which table, which event, which key fields.
the "Select @code = PLI_K_COD, @list = PLI_K_LISTINO from inserted" set the variables with the value of the columns of the table I am interested to read from my java program, for example the variable @code receive the value of the column pli_k_kod (is the key) of the table PLI.
The "Set @cmd = 'java mirrorDb.Copy PLI DELETE ' + @code + ' ' + @list " prepared the variable @cmd with the java command followed by the package.classname and parameters.
The EXEC launch the command to the operating system.
Daniele -
SQL Server 2000 and 2008 Standard Edition
Hi,
I was wondering if anyone knows if there are any auditing limitations in the standard editions of SQL server 2000 and 2008 R2.
I'm interested to know if there are audit functions for user auditing like creation, deletion and logons
Can't seem to find any information about this.In addition to Shanky notes, please have a look at these article:
DML Trigger Status Alerts
Implementing generic audit trail trigger in sql server
Saeid Hasani [sqldevelop] -
Insert to XE from sql server 2005 ...
Hi,
is it possible to create a trigger on Sql Server 2005 to insert a row to Oracle XE ?
I want to create a update/insert trigger on sql server 2005 which will insert the data into a Oracle XE table.
I have a Linked Servers in Sql Server to Oracle XE and this link works with simple sql statement from sql server like :
INSERT INTO [NEW_OR]..[Adam_user].[DUMMY] (AA) VALUES('Dummy String Data')
But the same statement does not work when in trigger. the following error occurs in Sql Server 2005...
Msg 8501, Level 16, State 3, Procedure deneme, Line 5
MSDTC on server 'Adam_user' is unavailable.
Any suggestions?
Thanks in advance.....
AdamHere is the answer...
May be useful for someone who needs the same solution ...
The Distributed Transaction Coordinator service must be start on windows to accomplish the transaction ...
For this:
(on windows)
START > SETTINGS > CONTROL PANEL > ADMINISTRATIVE TOOLS > SERVICES. Find the service called 'Distributed Transaction Coordinator' and RIGHT CLICK (on it and select) > Start. -
Trigger to populate table in sql server database
Maybe this isn't the right board to post this in, but here goes:
We have an Oracle 9i database, with a table that get's populated with a new record every minute or so.
We need to take some values from the newly inserted record and populate a table in a sql server database instantly. The people requesting this have not said as much, but I am thinking deletes and updates would need to be the same.
How would it be best to do this? My first thought was a trigger on the oracle table that populates the sql server table via heterogeneous db link.
Any other ideas?
thanks in advance..
update- repost in heterogeneous forum
Edited by: user571263 on Mar 15, 2011 11:25 AMMaybe this isn't the right board to post this inI think you are right:
Heterogeneous Connectivity
Werner -
Sql server 2012 Logon trigger not working for certain logins
Hello. I created a login trigger to insert data for each login in a table, and it works for all logins except one that is format domain\login
and the login ends with the dollar sign(actual name is domain\CTXDEVDCSI1$).
I had been using varchar, but after reading other forum posts, I changed the varchar's to nvarchar's, but it still fails for that id.
The errors written to the sql server error log were the usual "login failed due to trigger execution".
I had granted insert on the rvvlogindata table in dsa to public, and only one id wasn't able to login after that.
Any suggestions would be much appreciated!
Here's the modified table ddl:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvvlogindata](
[sessionId] [int] NULL,
[LoginTime] [datetime] NULL,
[HostName] [nvarchar](50) NULL,
[ProgramName] [nvarchar](300) NULL,
[LoginName] [nvarchar](50) NULL,
[ClientHost] [nvarchar](50) NULL
) ON [PRIMARY]
GO
Here's the logon trigger code:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create trigger [LOGIN_IP_RESTRICTION] on all server for logon
as
Begin
Declare @LogonTriggerData xml,
@EventTime datetime,
@LoginName nvarchar(50),
@ClientHost nvarchar(50),
@HostName nvarchar(50),
@AppName nvarchar(300)
Set @LogonTriggerData = eventdata()
set @EventTime = @LogonTriggerData.value('(/EVENT_INSTANCE/PostTime)[1]', 'datetime')
set @LoginName = @LogonTriggerData.value('(/EVENT_INSTANCE/LoginName)[1]', 'varchar(50)')
set @ClientHost = @LogonTriggerData.value('(/EVENT_INSTANCE/ClientHost)[1]', 'varchar(50)')
set @HostName = HOST_NAME()
set @AppName = APP_NAME()
insert into dsa.dbo.rvvlogindata
sessionId,
LoginTime,
HostName,
ProgramName,
LoginName,
ClientHost
select @@spid,
@EventTime,
convert(nvarchar(50),@HostName),
convert(nvarchar(300),@AppName),
convert(nvarchar(50),@LoginName),
convert(nvarchar(50),@ClientHost)
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
ENABLE TRIGGER [LOGIN_IP_RESTRICTION] ON ALL SERVER
GOErland, I wanted to add more info to my reply earlier today.
sp_who2 showed no blocking, activity monitor from my local PC SSMS showed no major waits or high i/o or cpu activity.
I was wondering if you have any suggestions on how to find out what was the cause of the 5+ minute wait for SSMS on the remote desktop to respond and fully come up.
I definitely can't put this in production with this hanging delay possibly occurring there.
I was connecting as read_user when it hung.
sp_who2 output at the time was:
1 BACKGROUND sa . . NULL LOG WRITER 54631 0 04/10
06:59:43
1 0
2 BACKGROUND sa . . NULL RECOVERY WRITER 8673 0 04/10 06:59:43
2 0
3 BACKGROUND sa . . NULL LAZY WRITER 300691 0 04/10
06:59:43
3 0
4 BACKGROUND sa . . NULL RESOURCE MONITOR 1207010 0 04/10 06:59:43
4 0
5 BACKGROUND sa . . NULL XE TIMER 38828 0 04/10
06:59:43
5 0
6 BACKGROUND sa . . NULL XE DISPATCHER 1404 0 04/10
06:59:43
6 0
7 BACKGROUND sa . . master SIGNAL HANDLER 0 0 04/10 06:59:43
7 0
8 BACKGROUND sa . . NULL LOCK MONITOR 179978 0 04/10
06:59:43
8 0
9 sleeping sa . . master TASK MANAGER 0 11 04/21
08:37:04
9 0
10 sleeping sa . . master TASK MANAGER 0 0 04/10
06:59:44
10 0
11 BACKGROUND sa . . master TRACE QUEUE TASK 546 0 04/10 06:59:44
11 0
12 BACKGROUND sa . . NULL SYSTEM_HEALTH_MO 4930 0 04/10 06:59:44
12 0
13 BACKGROUND sa . . NULL RECEIVE 422 0 04/10
06:59:45
13 0
14 BACKGROUND sa . . master CHECKPOINT 79137 31811 04/10
06:59:46
14 0
15 BACKGROUND sa . . master TASK MANAGER 1606 0 04/10
06:59:46
15 0
16 BACKGROUND sa . . NULL UNKNOWN TOKEN 0 0 04/10 06:59:46
16 0
17 sleeping sa . . master TASK MANAGER 0 74 04/21
08:37:04
17 0
18 sleeping sa . . master TASK MANAGER 0 0 04/21
08:18:49
18 0
19 sleeping sa . . master TASK MANAGER 0 0 04/21
08:30:29
19 0
20 sleeping sa . . master TASK MANAGER 0 1 04/21
08:37:14
20 0
21 sleeping sa . . master TASK MANAGER 0 7 04/21
08:30:59
21 0
22 sleeping sa . . master TASK MANAGER 16 4 04/21
08:37:44
22 0
23 sleeping sa . . master TASK MANAGER 0 15 04/21
08:39:24
23 0
25 BACKGROUND sa . . master BRKR EVENT HNDLR 0 95 04/10 06:59:48
25 0
30 BACKGROUND sa . . master BRKR TASK 0 0 04/10
06:59:48
30 0
31 BACKGROUND sa . . master BRKR TASK 16926 0 04/10
06:59:48
31 0
32 BACKGROUND sa . . master BRKR TASK 0 0 04/10
06:59:48
32 0
34 BACKGROUND sa . . master BRKR TASK 10701 0 04/10
06:59:48
34 0
51 sleeping edit_user INFADEVFS2 . dsa AWAITING COMMAND 0 0 04/21
03:16:56
51 0
52 sleeping reports_adm REPORTSDEVSI2 . JBOSS_Cluster_CRServer2011 AWAITING COMMAND 0 0 04/21
08:52:12 jTDS
52 0
53 sleeping NT AUTHORITY\SYSTEM SQLDEV2012 . msdb AWAITING COMMAND 0 0 04/10
06:59:58 SQLAgent - Email Logger 53 0
54 sleeping AMERICAS\CTXDEVDCSI1$ CTXDEVDCSI1 . CitrixXDFarm1 AWAITING COMMAND 0 0 04/21
08:58:51 Citrix:Broker#1 54 0
55 sleeping edit_user ASDEV1 . dsa AWAITING
COMMAND 0 0 04/21 08:55:27 jTDS
55 0
56 sleeping reports_adm REPORTSDEVSI2 . JBOSS_Cluster_CRServer2011 AWAITING COMMAND 0 0 04/21
08:52:12 jTDS
56 0
57 sleeping reports_adm REPORTSDEVSI2 . JBOSS_Cluster_CRServer2011 AWAITING COMMAND 0 0 04/21
08:52:12 jTDS
57 0
58 sleeping reports_adm REPORTSDEVSI2 . JBOSS_Cluster_CRServer2011 AWAITING COMMAND 0 0 04/21
08:52:12 jTDS
58 0
59 sleeping NT AUTHORITY\SYSTEM SQLDEV2012 . msdb AWAITING COMMAND 124 242 04/10
06:59:59 SQLAgent - Generic Refresher 59 0
60 sleeping NT AUTHORITY\SYSTEM SQLDEV2012 . msdb AWAITING COMMAND 2790 1160 04/21
08:55:00 SQLAgent - Job invocation engine 60 0
61 sleeping reports_adm REPORTSDEVSI2 . JBOSS_Cluster_CRServer2011 AWAITING COMMAND 0 0 04/21
08:52:12 jTDS
61 0
62 sleeping reports_adm REPORTSDEVSI2 . JBOSS_Cluster_CRServer2011 AWAITING COMMAND 0 0 04/21
08:52:12 jTDS
62 0
63 sleeping reports_adm REPORTSDEVSI2 . JBOSS_Cluster_CRServer2011 AWAITING COMMAND 0 0 04/21
08:52:12 jTDS
63 0
64 sleeping reports_adm REPORTSDEVSI2 . JBOSS_Cluster_CRServer2011 AWAITING COMMAND 0 0 04/21
08:52:12 jTDS
64 0
65 sleeping reports_adm REPORTSDEVSI2 . JBOSS_Cluster_CRServer2011 AWAITING COMMAND 0 0 04/21
08:52:12 jTDS
65 0
66 sleeping edit_user INFADEVFS2 . dsa AWAITING COMMAND 0 0 04/21
03:16:56
66 0
67 sleeping reports_adm REPORTSDEVSI2 . JBOSS_Cluster_CRServer2011 AWAITING COMMAND 0 0 04/21
08:52:12 jTDS
67 0
68 sleeping edit_user DCMA10685 . dsa AWAITING COMMAND 0 0 04/21
08:56:47 jTDS
68 0
69 sleeping AMERICAS\CTXDEVDCSI1$ CTXDEVDCSI1 . CitrixXDFarm1 AWAITING COMMAND 0 0 04/21
08:58:49 Citrix:Configuration 69 0
70 sleeping rvanveen DCMA8460 . master AWAITING COMMAND 1794 7120 04/21
08:51:37 Microsoft SQL Server Management Studio 70 0
71 sleeping xsp_user XSPDEVSI2 . xspv5 AWAITING COMMAND 0 0 04/21
08:58:52 .Net SqlClient Data Provider 71 0
72 sleeping AMERICAS\CTXDEVDCSI1$ CTXDEVDCSI1 . CitrixXDFarm1 AWAITING COMMAND 0 0 04/21
08:56:01 Citrix:Monitor 72 0
73 sleeping AMERICAS\CTXDEVDCSI1$ CTXDEVDCSI1 . CitrixXDFarm1 AWAITING COMMAND 0 0 04/21
08:58:30 Citrix:Monitor 73 0
74 sleeping rvanveen DCMA8460 . master AWAITING COMMAND 16 2 04/21
08:53:37 Microsoft SQL Server Management Studio - Query 74 0
75 sleeping rvanveen DCMA8460 . loginaudit AWAITING COMMAND 0 22 04/21
08:50:29 Microsoft SQL Server Management Studio - Query 75 0
76 sleeping edit_user INFADEVFS2 . dsa AWAITING COMMAND 0 0 04/21
07:05:07
76 0
77 sleeping adm_jbossportal ASDEV1 . jbossportal AWAITING
COMMAND 0 0 04/21 08:40:27 jTDS
77 0
78 sleeping rvanveen DCMA8460 . master AWAITING COMMAND 110 542 04/21
08:46:17 Microsoft SQL Server Management Studio - Query 78 0
79 sleeping edit_user INFADEVFS2 . dsa AWAITING COMMAND 0 0 04/21
07:05:56
79 0
80 sleeping AMERICAS\CTXDEVDCSI1$ CTXDEVDCSI1 . CitrixXDFarm1 AWAITING COMMAND 0 0 04/21
08:58:54 Citrix:MachineCreation 80 0
81 sleeping edit_user INFADEVFS2 . dsa AWAITING COMMAND 0 0 04/21
08:08:29
81 0
82 sleeping edit_user INFADEVFS2 . dsa AWAITING COMMAND 0 0 04/21
07:02:13
82 0
83 sleeping edit_user INFADEVFS2 . dsa AWAITING COMMAND 0 0 04/21
07:02:15
83 0
84 sleeping AMERICAS\CTXDEVDCSI1$ CTXDEVDCSI1 . CitrixXDFarm1 AWAITING COMMAND 0 0 04/21
08:58:44 Citrix:Monitor 84 0
85 sleeping edit_user INFADEVFS2 . dsa AWAITING COMMAND 0 0 04/21
07:11:05
85 0
86 sleeping AMERICAS\CTXDEVDCSI1$ CTXDEVDCSI1 . CitrixXDFarm1 AWAITING COMMAND 0 0 04/21
08:58:53 Citrix:AdIdentity 86 0
87 sleeping DAIWA_USA\admsql SQLDEV2012 . master AWAITING COMMAND 15 2 04/21
08:56:20 Microsoft SQL Server Management Studio - Query 87 0
88 sleeping AMERICAS\CTXDEVDCSI1$ CTXDEVDCSI1 . CitrixXDFarm1 AWAITING COMMAND 0 0 04/21
08:58:36 Citrix:SiteServices 88 0
89 sleeping AMERICAS\CTXDEVDCSI1$ CTXDEVDCSI1 . CitrixXDFarm1 AWAITING COMMAND 0 0 04/21
08:58:42 Citrix:Host 89 0
90 sleeping AMERICAS\CTXDEVDCSI1$ CTXDEVDCSI1 . CitrixXDFarm1 AWAITING COMMAND 0 0 04/21
08:58:47 Citrix:ConfigurationLogging 90 0
91 RUNNABLE rvanveen DCMA8460 . master SELECT INTO
15 51 04/21 08:58:46 Microsoft SQL Server Management Studio - Query 91 0
92 sleeping rvanveen DCMA8460 . master AWAITING COMMAND 63 30 04/21
08:52:34 Microsoft SQL Server Management Studio - Query 92 0
94 sleeping AMERICAS\CTXDEVDCSI1$ CTXDEVDCSI1 . CitrixXDFarm1 AWAITING COMMAND 0 0 04/21
08:58:53 Citrix:DelegatedAdmin 94 0
95 sleeping DAIWA_USA\admsql SQLDEV2012 . loginaudit AWAITING COMMAND 173 27 04/21
08:56:10 Microsoft SQL Server Management Studio 95 0
96 sleeping xsp_user XSPDEVSI2 . xspv5 AWAITING COMMAND 0 0 04/21
08:58:33 .Net SqlClient Data Provider 96 0
97 sleeping edit_user INFADEVFS2 . dsa AWAITING COMMAND 0 0 04/21
08:10:07
97 0
98 sleeping edit_user INFADEVFS2 . dsa AWAITING COMMAND 31 38 04/21
08:00:31
98 0
99 sleeping edit_user INFADEVFS2 . dsa AWAITING COMMAND 0 0 04/21
08:10:12
99 0
100 sleeping edit_user INFADEVFS2 . dsa AWAITING COMMAND 0 282 04/21
08:10:14
100 0
101 sleeping DAIWA_USA\admsql SQLDEV2012 . master AWAITING COMMAND 0 8 04/21
08:56:50 Microsoft SQL Server Management Studio 101 0
102 sleeping DAIWA_USA\admsql SQLDEV2012 . master AWAITING COMMAND 31 0 04/21
08:54:57 Microsoft SQL Server Management Studio 102 0
103 sleeping read_user SQLDEV2012 . master AWAITING COMMAND 0 8 04/21
08:57:09 Microsoft SQL Server Management Studio 103 0
104 sleeping read_user SQLDEV2012 . dsa AWAITING COMMAND 0 0 04/21
08:57:09 Microsoft SQL Server Management Studio 104 0
105 sleeping rvanveen DCMA8460 . tempdb AWAITING COMMAND 8875 336 04/21
08:58:54 Microsoft SQL Server Management Studio 105 0
106 sleeping read_user SQLDEV2012 . master AWAITING COMMAND 16 0 04/21
08:57:39 Microsoft SQL Server Management Studio 106 0
107 sleeping AMERICAS\CTXDEVDCSI1$ CTXDEVDCSI1 . CitrixXDFarm1 AWAITING COMMAND 0 0 04/21
08:58:47 Citrix:EnvTest 107 0
108 sleeping edit_user INFADEVFS2 . dsa AWAITING COMMAND 2200 8514 04/21
08:00:31
108 0
109 sleeping edit_user INFADEVFS2 . dsa AWAITING COMMAND 0 0 04/21
07:05:56
109 0
110 sleeping rvanveen DCMA8460 . master AWAITING COMMAND 0 0 04/21
08:58:48 Microsoft SQL Server Management Studio 110 0
113 sleeping Citrix_adm CTXDEVSI1 . XenApp6 AWAITING COMMAND 284 777 04/21
08:51:33 Citrix IMA 113 0
119 sleeping AMERICAS\CTXDEVDCSI1$ CTXDEVDCSI1 . CitrixXDFarm1 AWAITING COMMAND 0 0 04/21
08:58:42 Citrix:ConfigurationLoggingData 119 0
120 sleeping AMERICAS\CTXDEVDCSI1$ CTXDEVDCSI1 . CitrixXDFarm1 AWAITING COMMAND 0 0 04/21
08:58:26 Citrix:Storefront 120 0
125 sleeping edit_user INFADEVFS2 . dsa AWAITING COMMAND 0 0 04/16
13:55:16
125 0
126 sleeping edit_user INFADEVFS2 . dsa AWAITING COMMAND 16 0 04/16
11:25:30
126 0
131 sleeping echouliak DCMA10685 . master AWAITING COMMAND 139 8 04/14
15:26:55 Microsoft SQL Server Management Studio 131 0
135 sleeping echouliak DCMA10685 . dsa AWAITING COMMAND 0 0 04/14
15:24:52 Microsoft SQL Server Management Studio - Query 135 0
136 sleeping echouliak DCMA10685 . dsa AWAITING COMMAND 0 0 04/14
15:00:17 Microsoft SQL Server Management Studio - Query 136 0
140 sleeping edit_user INFADEVFS2 . dsa AWAITING COMMAND 0 0 04/21
07:05:56
140 0
145 sleeping edit_user INFADEVFS2 . dsa AWAITING COMMAND 0 0 04/21
07:05:56
145 0 -
How to synchronize Sql Server when Oracle table has trigger
Hi
I have a trigger which will update/insert the data into a Oracle table.
I have an interface which normally moves the data from Oracle table to SQL Server table.
Is there any way which will update/insert the data into SQL Server table whenever any trigger fires on Oracle table.
Thanks,
GaneshODI's CDC capabilities can be used to propogate changes from Oracle to SQL Server. If your trigger inserts/updates on an oracle table, then ODI's CDC should pick that up. If you have a scenario which does a WaitForLogData on your Oracle table, it can kick off the interface to transfer the journal data whenever that happens.
-
Is sql server using trigger to capture change data in SQL server CDC?
hi all,
what is the Architecture of SQL server change data capture(CDC)? is sql server using trigger to capture change data in SQL server CDC? for example Change Data Capture (CDC) in SQL Server 2008 using we can capture change Data records INSERTs, UPDATEs, and
DELETEs applied to SQL Server tables.so my question is SQL server using triggers to capture change data like INSERT TRIGGER, UPDATE TRIGGER and DELETED TRIGGER using each tables after enabled CDC...?
Thanks
Tharindu Dhaneenja
Tharindu Dhaneenja http://dhaneenja.blogspot.comIt is not using triggers. The source is the transaction log.
Related link:
Basics of Change Data Capture
...The source of change data for change data capture is the SQL Server transaction log. As inserts, updates, and deletes are applied to tracked source tables, entries that describe those
changes are added to the log. The log serves as input to the change data capture capture process. This reads the log and adds information about changes to the tracked table’s associated change table. Functions are provided to enumerate
the changes that appear in the change tables over a specified range, returning the information in the form of a filtered result set. The filtered result set is typically used by an application process to update a representation of the source in some external
environment. ...
Kalman Toth, SQL Server & Business Intelligence Training; SQL Server 2008 Training -
Hi,
I wonder if there is anyone who know if there is any method as listen on a table in a ms sql-server. I want my program to run if a new row appear in the database.
/RikardWhy would you need to do that? Put all theprocessing
into the trigger, that's where it belongs.Possibly a bad assumption on my part, but since this
is op posted in a java forum and said:
"I want my program to run if a new row appear in the
database"
I assumed he has a program and that it is probably
made with Java.
I think nasch_ meant basically that perhaps the business logic that this 'app' does, really belongs in the database trigger.
Maybe you are looking for
-
Issue with heat maps refresh process in EID 3.1?
Issue with Heat Maps in EID 3.1? Heats maps don't refresh unless you go back to home page and then again go back to the Endeca app. In Oracle Sample app if we open the Map tab we will see that Milwaukee is really hot in the heat map. now if we filter
-
I plugged in three external hard drives (at different times) and the above error was reported and now external drives will not work on other computers. What happened and how can I save data on external drives?
-
Does Firefox 5 have any problems with Kaspersky ant-virus
Since I downloaded Firefox 5 I have a problem with a process avp.exe in Kaspersky anti-virus 2011. This process uses 70-80% of my CPU slowing my system almost completely. This only started after I downloaded F5. Is this just a coincidence?
-
Support of RedHat EL 5 for TREX 7.0
Hi, Does anybody know when the RedHat EL 5 is expected to be supported for TREX 7.0? Thanks, Zareh Vazquez
-
Hello Guys, me again I'm seeing an issue when the client tries to install the NAC agent on his PC. The client reports that an update is available for which I click OK, then it appears to download the new agent (really fast btw) and then it starts ins