473,382 Members | 1,743 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,382 software developers and data experts.

Fire an SQL Server Trigger on a Bulk Upload

Hello,

Does anyone know how to get a trigger to fire while you are uploading multiple records into a SQL Server 2005 Express DB using the DTS Wizard?

On insert of a person's record I want the trigger to find their id# from another table and update their information accordingly.

I have the trigger built, but it will not fire when I use the DTS Wizard.

Please help. Thanks.
Sep 18 '08 #1
7 6362
ck9663
2,878 Expert 2GB
Read more here. The doc did not mention anything about SQL 2005 Express, though. But it might worth a try.

-- CK
Sep 18 '08 #2
What about when you execute the DTS Wizard? I am trying to insert new rows and update the information in other tables using the triggers. The triggers will not fire. Any ideas. I'm searching the Web up and down.

Thanks for your help.
Sep 19 '08 #3
Delerna
1,134 Expert 1GB
Why would't you extend the insert query so that it obtains the ID at the same time as inserting the record? You wouldn't need a trigger then.
Sep 19 '08 #4
Why would't you extend the insert query so that it obtains the ID at the same time as inserting the record? You wouldn't need a trigger then.
I am not using a query. I am using the dts wizard that came with SQL Server 2005 Express.

You wouldn't know how to get the trigger to fire in that instance would you?

I may have to look at the bulk insert function.
Sep 19 '08 #5
ck9663
2,878 Expert 2GB
I think DTS is using bcp, not BULK INSERT. Which means, by default, triggers are disabled.

-- CK
Sep 19 '08 #6
Delerna
1,134 Expert 1GB
I am not using a query. I am using the dts wizard that came with SQL Server 2005 Express.
Thanks for your help.

Sorry bad wording on my part. Yes, you are using DTS but DTS is using query in the data pump to select the records from the destination and/or insert them into a table in your database.

What I meant by extending the query (bad wording... should have said extend the DTS) was to
Add an 'on success' workflow pipe onto the destination server and attatch it to an SQL task so that the SQL Task executes when the data pump transfer is successful.

In the SQL task you place the code that your trigger would execute

That was hard to explain, I hope I am making sense?

Also, just noticed you are using SQL Express. Not had any experience with express. Does it have that sort of control over DTS ?
Sep 21 '08 #7
I did get the triggers to fire on the Bulk Insert. Thanks for all of the help guys.
Sep 29 '08 #8

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

Similar topics

4
by: bmccollum | last post by:
I have written a trigger that's supposed to go out and delete corresponding records from multiple tables once I delete a specific record from a table called tblAdmissions. This does not work and...
1
by: Azkaban | last post by:
Hi, are there someone who know what kind of control or component Share Point Portal Server use to make bulk upload documents? Thanks. -- --------------------------------- Filippo Macchi...
4
by: d0wsdkn02 | last post by:
I have an ASP.NET application that performs ADO.NET commands that cause triggers to be run in SQL Server 2000. My question is how would I best access the user ID from my custom .NET Principal in...
5
by: John Smith | last post by:
I have tables that I want to fire either an update or insert trigger on. I could write a script containing a long list of inserts but I'm looking for something simpler. Would isql work? Any...
1
by: ABC | last post by:
Our environment has two servers, one is web and another is SQL Server. I can write upload file to IIS. But, I cannot call SQL Server's BULK Insert statement. Is there any idea to handle this...
2
by: dba_222 | last post by:
Dear Experts, I'm an Oracle guy, who is being given more SQL Server assignments lately. I've been looking for things on the web about this, but I can't anything so far. In Oracle, I you...
3
by: Davor | last post by:
I'm trying to import data from flat file in table and have few problems. 1. Field Delimiter is ',' (comma). If ',' occurs in quoted string it is still treated as field delimiter. This is BUG or...
9
by: steven | last post by:
Does anyone know how to do the following. I'm trying to mimic replication with triggers. I have 2 databases, each have these 2 tables. 1. USERS ID int NAME varchar(20)
7
by: Tempalli | last post by:
Kindly help me how to upload a bulk of data in ms access. In table1 i am having only ReferenceNo's. In table2 iam having ReferenceNo's,Name,Place,Area. I have to upload the Bulk data of the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.