Hi all,
I am inserting into a remote table and need to get the identity value that was last created i.e.
insert into [RemoteServer].[RemoteDatabase].dbo.[DB](num)
values(1)
declare @id int
set @id = @@identity
select @id
This is returning NULL for the identity value but works fine if I run it...
I just tried with one event (CREATE DATABASE). Same error.
The insert statement is a test. As I mentioned, the trigger code in my post is just a test trigger. I can't event do a simple insert to a remote table when the DDL trigger is fired.
I have tried with Distributed Transactions and...
Hi all,
I have just started to try and implement DDL auditing triggers in SQL Server 2005 and get a Distributed Transaction error when inserting into a remote audit table. Part of the error reads:
'Cannot acquire a database lock during a transaction change. An error occurred during the changing...
Denny,
I have created a stored proc on the remote server which inserts the text column into a temp table.
I then use UPDATETEXT which references the temp table as the source table.
It's probably not the most efficient method but it works.
Thanks for your suggestions.
Paul
Denny,
That is exactly what I have just tried to do, however, at some point I still need to refer to the database column using UPDATETEXT.
If I run it at source I have to reference a remote destination server. If I run it at the destination I have to reference a remote source server.
I find...
Hi all,
I am trying to use the UPDATETEXT functionality across a linked server and am not sure if it is possible e.g.
This is BOL syntax:
UPDATETEXT table_name.column_name @dest_textptr 0 NULL table_name.column_name @src_textptr
I need to reference a column on a remote server:
UPDATETEXT...
Hi all,
I hope someone can help me with this as I am completely stumped.
I have a DTS package that uses an activeX script to loop through a bunch of files in a folder. The data in the files is then inserted into a table.
When running the DTS package from Enterprise Manager is runs perfectly...
Hi all,
I have a TextBox and am trying to pass it's value to a SQL Server procedure specified in an asp:GridView. The GridView works fine if I put in a default value but doesn't seem to pick up the form value, in fact after running the profiler there is no call to the procedure at all.
The...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.