Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
eddie
Starting Member
45 Posts |
Posted - 2002-02-06 : 15:41:04
|
Ok, this was stupid, I know but I was working to convert a database to sql server 7. The db we were converting had column names with mixed case. This was giving us problems with our app so we wanted to change them all to lower case. Not wanting to manually go through all 400+tables in our working db, and change all the columns we wrote the following script:Update syscolumns set name=lower(name)This worked fine and everything in our app runs smoothly but when I run dbcc check db, I get all sorts of errors with the syscolumns table.Is there any permenant damage? Should we continue to use this db?Thanks,Eddie |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-02-06 : 15:51:21
|
A-HA! NOW YOU KNOW BETTER! NEVER NEVER NEVER F--- WITH THE SYSTEM TABLES!!!!OK, I know, that didn't help, but I doubt I'll get an opportunity like that again!Honestly, I don't know how much damage you've really done. You might need to drop ALL of the indexes and recreate them. I hope you've got a backup of the database, because in all likelihood that's the only way you can hope to correct this.For future reference, after you get your database back in action, DO THIS FIRST THING:USE masterEXEC sp_configure 'allow updates', '0'RECONFIGURE WITH OVERRIDEYou might need to restart SQL Server afterwards. This will prevent any UPDATEs to the system tables. Don't take this the wrong way, but it's obvious that it's too easy for someone to make a mistake and possibly FUBAR the server this way. You're better off preventing it from happening again. |
|
|
eddie
Starting Member
45 Posts |
Posted - 2002-02-06 : 15:57:17
|
So robvolk, is there a way I can reverse that so that I can update the system tables in the future...just joking...Thanks for the info!I will never touch the system tables again...lesson learned!Thanks,Eddie |
|
|
|
|
|
|
|