October 18, 2006 at 7:13 am
Hi guys, I need to update a system table in sql server 2000. I know this isnt reccomended but I need to do it.
I've used sp_configure to allow updates, however when I try to update thet syscomments table I get the following message:
'syscomments' table
- Unable to modify table.
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]System table 'syscomments' was not created, because ad hoc updates to system catalogs are not enabled.
October 18, 2006 at 7:22 am
Hello Mark,
You will be loosing the support from Microsoft, if you try to change any of the system catalogs.
Thanks
Lucky
October 18, 2006 at 7:23 am
Ya and there are many other ways to update the text of the stored procs / views... without going to that extreme.
What do you need to do exactly?
October 18, 2006 at 8:12 am
I've been asked to change the datatype of the 'text' column in syscomments from nvarchar(4000) to ntext.
so far I havnt been successful in doing this. any suggestions would be greatly appreciated
October 18, 2006 at 8:16 am
So your boss wants you to redesign sql server. I think your time would be better spent doing something else... something doable and usefull.
Also this would definitly void any further support from Microsoft.
Why exactly does he want you to do this?
October 18, 2006 at 8:41 am
Its an order that come down from 'on high', theres a problem with certain records being too big, a change of datatype has been suggested.
our stored procedures are more than 8000 characters long, The maximum length for syscomments is 8000 characters if im not mistaken. And syscomments is where all our storedprocedures, triggers etc are stored. It has been suggested that changing the datatype from nvarchar to ntext would resolve the issue
October 18, 2006 at 8:47 am
I'm glad to informa you that Microsoft already thaught of that problem. If the text size goes beyong 4000 characters, a new row is inserted in SysComments to make sure everything is saved.
Now back to that problem. Is there a problem with any object you created that would make you think that it's too big for sql server to handle? Or is this just theorical problematics??
October 19, 2006 at 6:02 am
Rgr is absolutely right....if you had a stored proc that was 30K in length, it would just occupy 7 rows in the syscomments table(30K /4K = 7 rows)
your boss on high is second guessing a functionality that he doesn't fully understand. While the table might be limited to a 4K slice of data, but the APPLICATION that uses the data is not limited.
I would speculate that if you actually were able to change the datatype, you would no longer be able to use views, functions or procedures...why? because the extended functions in the dll's that allow SQL server to CREATE the compiled objects, and store the data in syscomments ASSUME the field is a specific data type...change the underlying data type and they will no longer be compiled correctly.
Lowell
October 19, 2006 at 6:39 am
I would go as far as saying that the queries reading from syscomments would make the app fail right there, but that's another story...
April 3, 2007 at 3:13 am
is there a way to rebuild/defrag the indexes of a system table? just done a showcontig on sysobjects and the indexes r a mess!!!!
_________________________________________________________________________________SQLGeordieWeb:- Jarrin ConsultancyBlog:- www.chrisjarrintaylor.co.ukTwitter:- @SQLGeordie
April 3, 2007 at 8:03 am
Wow, not sure why you guys want to mess with the system tables. The design dates back to 98 with SQL Server 7 in the beta 3 design and has worked great for 9 years without messing with the tables.
No matter who "on high" suggests it, you don't change the structure of the system tables. It's asinine. Tell them to come and explain it here and we'll have someone from Microsoft tell them better.
If your stored procedures don't fit in text, they're still there in compiled form. If you plan on using syscomments as your VCS, that's stupid as well. Go get Sourcesafe/Subversion/Vault, or some real system.
The system tables have their own indexes and don't need to be defragged. They don't get enough updates to need it. They're also not highly involved in your queries. You don't "scan" sysobjects, you seek to the object you need.
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply