473,480 Members | 2,277 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Marking a table as a System Table

Okay, most peoples answer to this may be "Gaaah. Why would you do
this?", or the like, but here's the question anyway:

Are there any stability issues if I mark one of my user tables as a
system table (by switching xtype in sysobjects from 'S' to 'U')?

I'm not doing this as "a cleved bit of security" or some such - my
actual reason for doing this is so that some of my automatic generation
tools do not process this particular table, and I want a method that
will not mean updating each of the tools if I ever add another table
like this.

It APPEARS to work, based on a quick trial, but has anybody got any
direct experience of this? Any horror stories like "Well, it worked
fine for two weeks, then it shot my co-workers, set fire to the company
accounts, and urinated in a corner. Then things got worse"

Also, yes, yes, yes, I do not necessarily expect this to work in future
releases of SQL Server (currently on 2000), but I should avoid naming
conflicts by the fact that the owner isn't dbo.
Thanks in advance for any insights.

Jul 23 '05 #1
3 1963

"Damien" wrote:
Okay, most peoples answer to this may be "Gaaah. Why would you do
this?", or the like, but here's the question anyway:

Are there any stability issues if I mark one of my user tables as a
system table (by switching xtype in sysobjects from 'S' to 'U')?

I'm not doing this as "a cleved bit of security" or some such - my
actual reason for doing this is so that some of my automatic generation
tools do not process this particular table, and I want a method that
will not mean updating each of the tools if I ever add another table
like this.

It APPEARS to work, based on a quick trial, but has anybody got any
direct experience of this? Any horror stories like "Well, it worked
fine for two weeks, then it shot my co-workers, set fire to the company
accounts, and urinated in a corner. Then things got worse"

Also, yes, yes, yes, I do not necessarily expect this to work in future
releases of SQL Server (currently on 2000), but I should avoid naming
conflicts by the fact that the owner isn't dbo.
Thanks in advance for any insights.


Well I changed a system table once and all the workers recovered, the
building only smoldered, no one noticed the puddle, and then things seemed
to clear up on their own :)

Seriously, though, why not use extended properties for this purpose? For
your table that you don't want to process, use...

exec sp_addextendedproperty
'DoNotProcess',
'1',
'USER',
'dbo',
'TABLE',
'TableThatIsntProcessed',
NULL,
NULL

....Then before you process any table you can...

if not exists (
select null
from ::fn_listextendedproperty(
'DoNotProcess',
'USER', 'dbo',
'TABLE', 'TableThatIsntProcessed',
NULL, NULL
)
where value = '1'
)
begin
print 'process table'
end
This way any table can be selectively set up for processing or not without
touching the system tables and you have a better chance of not getting
broken with succesive releases of SQL Server.

Craig
Jul 23 '05 #2
Thanks, I'll look into that. I've not used extended properties before
(then again, we've only just upgraded from 7 (as in, last weekend), was
it available in 7?)

Jul 23 '05 #3
"Damien" wrote:

<snip>
was it available in 7?


<snip>

http://www.microsoft.com/sql/techinf...properties.asp

According to this link, no (the page above also contains links to articles
on using extended properties, although I didn't follow them to see if they
were still good). It's been a while since we upgraded from 7 to 2K, but
that also seems sync with my memory.

Craig
Jul 23 '05 #4

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

Similar topics

0
1240
by: Mad_Cat_SCP | last post by:
I did a very basic calendar in php, and know I want to mark some days. For example: -exam days, semesters, etc. What is the best way to do this? I want to click a link, button, checkbox,etc and...
3
1913
by: Spartanicus | last post by:
How to get help from this group, and how to construct a minimised test case: http://www.spartanicus.utvinternet.ie/help_us_help_you.htm -- Spartanicus
6
1675
by: James Pascoe | last post by:
Dear All, Apologies if this is OT. I have a C program which processes an arbitrary number of structs that are stored in a hash table. (The nature of the processing and the layout of the...
15
2104
by: Roedy Green | last post by:
I seem to recall reading about a feature so that you could apply different styles to different kinds of link. e.g. local and offsite or to automatically put a logo beside some domain links. I...
4
4486
by: sicapitan | last post by:
I have this code snippet: updateProps snippet: if (mycheckbox.checked == '1') ? $('mycheckbox').checked = true : $('mycheckbox').checked = false; content = $('mydiv').innerHTML;
9
23228
by: =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= | last post by:
How do I mark a method or class in my library as deprecated, so that when it is used by some other application, the compiler will issue a warning?
0
2679
by: Nokao | last post by:
I'm having a lot of severe errors in my db2diag.log, (DB2 v9.1.0.0). Googling I don't fin any information :( What can I do? I attach the first reports...: 2007-11-19-17.50.26.379948+060...
1
525
by: Hvid Hat | last post by:
Hello How should I go about marking certain words in a text? I've got a list of words: <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="Mark.xsl"?> <Words>...
16
4017
by: Pie Squared | last post by:
I'm not completely sure that this is the right place to ask, but I'm doing it in C, so I'm asking, but if I'm wrong, then please don't hesitate to correct me and tell me where to post this. What...
0
7048
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6911
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7050
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7091
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5344
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
2988
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1303
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
564
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.