473,320 Members | 1,817 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.

Trigger: To fill another Database with using Stored Procedures of the other Database

Hello everyone,

I face currently a problem where I could need some input for searching
the source of the Problem

System: SQL Server 9.0

I fill from Database A with triggers Database B, everything works
fine.
On Database B there is a Stored Procedures that checks the records and
add additional information accordingly, this Stored Procedures is
normally called by the application on "update and insert" in the
according table.

When I try to call this Stored Procedures from the Database A, the
trigger does not work anymore, even if I do a try catch over the whole
trigger, he never reach the Catch and the insert I try to do there to
get the error message.

On both Databases the user, that is taken to execute the trigger is
existent and DB-Owner of both Databases.

If I go and execute the Stored Procedures manually after an insert or
update to Database B everything works fine.

I also already tried to check on Database B if there is an insert or
update from Database A and if, to execute the Stored Procedures, with
the same result, nothing and all happens anymore, neither update on
Database A and also not on Database B.
And also I cant catch the error as the Try/Catch is not working.

Hope I could explain it understandable and maybe someone remembers
already having the same problem.

Thanks & Best regards
Pascal

Apr 24 '07 #1
2 4731
(pa**************@gmail.com) writes:
I face currently a problem where I could need some input for searching
the source of the Problem

System: SQL Server 9.0

I fill from Database A with triggers Database B, everything works
fine.
On Database B there is a Stored Procedures that checks the records and
add additional information accordingly, this Stored Procedures is
normally called by the application on "update and insert" in the
according table.

When I try to call this Stored Procedures from the Database A, the
trigger does not work anymore, even if I do a try catch over the whole
trigger, he never reach the Catch and the insert I try to do there to
get the error message.
So there is a an error message? What about posting it?

Overall, if it's possible, I would appreciate if you could post the
code of the stored procedure and the trigger, because I have some
problems following your narrative what is happening.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Apr 24 '07 #2
Hello,

Thanks for your answer and I just noticed that I double posted this
message.

First I was not able to catch the errormessage, I started the triggers
over the application and in the expected return value was nothing,
after change the Trigger and lunch with the console, i had the
following error:
Msg 3616, Level 16, State 1
Transaction doomed in trigger. Batch has been aborted.

I already found the problem and was able to solve it, sorry for the
late reply.

And thanks for the input, next time I'll extract necessary parts of
the triggers.

Apr 27 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Alejandro | last post by:
Hi! I have no experience at all using triggers, and I don't even know very well SQL server. I hope someone can help me with the folling: I need to know if it is possible to implement a trigger that...
4
by: TJ Olaes | last post by:
Hello all, this is my second post to this newsgroup. It's a question about stored procedures and permissions and how these behave between databases. Here's the scenario. I have a database that...
18
by: mountain man | last post by:
Greetings to all database professionals and laymen, Let us make a bold assumption that we have developed a software tool for the SQL Server environment which simply acts as an interface between...
8
by: Jason | last post by:
I have a table that matches up Securities and Exchanges. Individual securities can belong on multiple exchanges. One of the columns, named PrimaryExchangeFlag, indicates if a particular exchange is...
18
by: Bill Smith | last post by:
The initial row is inserted with the colPartNum column containing a valid LIKE pattern, such as (without the single quotes) 'AB%DE'. I want to update the column value with the results of a query...
2
by: Prem via DBMonster.com | last post by:
hi, i am working on a migration project from Oracle to db2 8.1. i was able to migrate the stored procedures and functions in oracle to db2 with the help of the migration tool kit. now finally...
0
by: JohnO | last post by:
Thanks to Serge and MarkB for recent tips and suggestions. Ive rolled together a few stored procedures to assist with creating audit triggers automagically. Hope someone finds this as useful as...
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...
4
by: Joerg Gempe | last post by:
Hello, I've a problem where some data gets updated but I don't know which process (SP) is responsible for it (it's an old installation which I've taken over). Is it somehow possible to know...
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
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...
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.