Hi,
using sql server 2000 enterprise manager i altered some column's
length. however, the information was not updated in syscolumns (neither
sp_help shows the right information... it shows the old information
before my update). anybody seen this problem before? following comments
didn't help either:
DBCC CHECKTABLE
DBCC CLEANTABLE
DBCC CHECKCATALOG
Why does it happen? any idea on how to solve it? thanks!ALTER TABLE table_name ALTER COLUMN column_name VARCHAR(60)
--
HTH. Ryan
<yoni@.nobhillsoft.com> wrote in message
news:1146147097.080242.106330@.i40g2000cwc.googlegroups.com...
> Hi,
> using sql server 2000 enterprise manager i altered some column's
> length. however, the information was not updated in syscolumns (neither
> sp_help shows the right information... it shows the old information
> before my update). anybody seen this problem before? following comments
> didn't help either:
> DBCC CHECKTABLE
> DBCC CLEANTABLE
> DBCC CHECKCATALOG
> Why does it happen? any idea on how to solve it? thanks!
>|||Ryan,
what do you mean by that? running ALTER statements? the problem is,
someone already ALTERed the table,a nd the chagnes dont reflect in the
sys tables. beyond this specific table, i have to wonter how many more
times did SQL Server screw up, because we are querying the tables daily
for changes. is there any commant or anything to rebuild all these
tables, or in any way fix the corruption? thanks|||Rather than using EM you can acheive the same result in Query Analyser using
the ALTER STATEMENT i supplied.
I've not experienced the problems you are seeing with EM. What version of
SQL / Service Pack are you running.
SELECT @.@.VERSION
HTH. Ryan
<yoni@.nobhillsoft.com> wrote in message
news:1146148823.202698.316100@.u72g2000cwu.googlegroups.com...
> Ryan,
> what do you mean by that? running ALTER statements? the problem is,
> someone already ALTERed the table,a nd the chagnes dont reflect in the
> sys tables. beyond this specific table, i have to wonter how many more
> times did SQL Server screw up, because we are querying the tables daily
> for changes. is there any commant or anything to rebuild all these
> tables, or in any way fix the corruption? thanks
>|||Sql Server 2000 SP 4. EM version 8.0 (if it matters at all)
my question is not on what i can do, but on how can i fix somehting
that's already done - some bug in SQL that causes the catalog (system
tables) to be out of sync. remember the DBCC commands i mentioned above
that did not work. BTW, running sp_MShelpcolumns DOES return the
correct information (MS obviously keep the best for themselfes)
so, i need to find some way to bring my system tables up-to-date
thanks|||Can you provide a repro? Also, sp_MShelpcolumns gets its information from the system tables, so you
might want to take a look at the source code to see what it does differently from what you do.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<yoni@.nobhillsoft.com> wrote in message news:1146151671.533212.62710@.i39g2000cwa.googlegroups.com...
> Sql Server 2000 SP 4. EM version 8.0 (if it matters at all)
> my question is not on what i can do, but on how can i fix somehting
> that's already done - some bug in SQL that causes the catalog (system
> tables) to be out of sync. remember the DBCC commands i mentioned above
> that did not work. BTW, running sp_MShelpcolumns DOES return the
> correct information (MS obviously keep the best for themselfes)
> so, i need to find some way to bring my system tables up-to-date
> thanks
>|||Sure, here is a reprop:
sp_help vendor_mig_out
produces:
vendor_num\nvarchar\no\12...
data_dest_code\int\no\4
duns#\nvarchar\no\22
name\nvarchar\no\70
address\nnvarchar\no\70
and on... now look at
sp_MShelpcolumns N'dbo.vendor_mig_out', null, 'id', 1
i get:
vendor_num\nvarchar\6
data_dest_code\int\4
duns#\nvarchar\11
name\nvarchar\35
address\nvarchar\35
and on... i trimmed the output here because its so large, but
specifically look at the field lengths... that's what i changed in EM
GUI and that's how i suddenly saw that it didn't change in system
tables...
thanks!|||That doesn't help us reproduce the situation, it only tell us what it look like at your system right
now.Anyhow, perhaps you have to tables named vendor_mig_out? One owned by dbo and another owned by
the user you are currently using? Try:
EXEC sp_help 'dbo.vendor_mig_out'
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<yoni@.nobhillsoft.com> wrote in message
news:1146161498.084957.230330@.v46g2000cwv.googlegroups.com...
> Sure, here is a reprop:
> sp_help vendor_mig_out
> produces:
> vendor_num\nvarchar\no\12...
> data_dest_code\int\no\4
> duns#\nvarchar\no\22
> name\nvarchar\no\70
> address\nnvarchar\no\70
> and on... now look at
> sp_MShelpcolumns N'dbo.vendor_mig_out', null, 'id', 1
> i get:
> vendor_num\nvarchar\6
> data_dest_code\int\4
> duns#\nvarchar\11
> name\nvarchar\35
> address\nvarchar\35
> and on... i trimmed the output here because its so large, but
> specifically look at the field lengths... that's what i changed in EM
> GUI and that's how i suddenly saw that it didn't change in system
> tables...
> thanks!
>|||Hi Tibor,
well, no, that's not it. i only got one table. i admit its a very
strange behavior. i can't reproduce it even...it just happened with
this table, and i dont know with how many other tables, which is what
really worries me. and like i said the DBCC dont help. any other idea?|||If sp_help return something different from sp_MShelpcolumns and if sp_MShelpcolumns contains the
correct information, I would be a bit worried. Consider opening a case with MS, and be prepared that
without repro, they might need access to the database, in some way.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<yoni@.nobhillsoft.com> wrote in message
news:1146228517.310431.306940@.g10g2000cwb.googlegroups.com...
> Hi Tibor,
> well, no, that's not it. i only got one table. i admit its a very
> strange behavior. i can't reproduce it even...it just happened with
> this table, and i dont know with how many other tables, which is what
> really worries me. and like i said the DBCC dont help. any other idea?
>