Solved

Use Trigger on table SYSOBJECTS...

Posted on 1998-10-30
3
502 Views
Last Modified: 2012-06-27
I need to create a trigger (or something else) that updates a table if a certain table is added to the database. I've created an insert-trigger on the SYSOBJECTS-table in the database. This would helpup the problem but it doesn't seem to trigger at all. Is there something that I've missed, or isn't it possible to set triggers on the sys-tables?
0
Comment
Question by:tsp
  • 2
3 Comments
 
LVL 7

Accepted Solution

by:
spiridonov earned 100 total points
ID: 1090898
It's a 'feature' of SQL Server. Trigger on sysobject doesn't work.
0
 

Author Comment

by:tsp
ID: 1090899
OK! But do u have a solution to my problem?

What can I do to update a table when an object is added to the database?
0
 
LVL 7

Expert Comment

by:spiridonov
ID: 1090900
You can't trigger this process automatically when new object added. You can only create a SQL Executive task, that will check for new objects at certain intervals.
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question