Re: [RadiusNT] Alterning the lenght of the Data field in RadConfigs (SQL Server 6.5)

Josh Hillman ( (no email) )
Tue, 5 Sep 2000 13:13:53 -0400

From: "Chris Clements" <cclements@cp-tel.net>
> It has become necessary to lengthen the Data field located in Radconfigs
> table. SQL server 6.5 will not allow you to simply change the field
length
> from the table manager. I suspect that I will have to use the ALTER TABLE
> command. The only ALTER examples I can find are for adding or dropping a
> column. Does any know if the ALTER TABLE command can be used to simply
> alter the length of a column? If so, what is the correct syntax.

You can change things like this all day long very easily in SQL 7, but not
6.5. What you'll need to do, is create a new column in that table (DataNew
as an example) with the length that you need. I have mine set to 100. Then
using ISQL/w:
update radconfigs
set DataNew = Data

That will copy over the data from the Data column to the DataNew column.

Afterward, you can rename the Data column to DataOld and rename DataNew to
Data.
You may need to restart RadiusNT afterward, also.

Once you verify that things are working correctly, you may want to "clean
up" the RadConfigs table:
update radconfigs
set DataOld = ''

That won't serve any functional purpose, but cleans it up a bit for your own
sake and makes the table a little bit smaller (not enough to really make any
difference though). In SQL 6.5, you cannot remove the DataOld column--or
any other for that matter.

No matter how you look at it, SQL Server 7 is a VAST improvement over 6.5.
SQL Server 2000 is in Beta 2 at the moment.

Josh

For more information about this list (including removal) go to:
http://www.iea-software.com/support/maillists/liststart