Hi,
i am a dba with a NYC government agency (legal limitations prevent me from disclosing which).
We are attempting to alter a large, synchronized database's table's column with dependent objects. When we tried the following alter command:
USE [dbadmin]
GO
alter table [dbo].[sampleTable] alter column [sampleColumn] varchar(250)
GO
we got the following:
Msg 5074, Level 16, State 1, Line 4
The object 'dependentObject' is dependent on column 'sampleColumn'.
Msg 4922, Level 16, State 9, Line 4
ALTER TABLE ALTER COLUMN sampleColumn failed because one or more objects access this column.
Completion time: 2021-05-13T13:51:56.2234608-04:00
When we tried the command with:
alter table [dbo].[sampleTable] alter column [sampleColumn] varchar(250)
WITH (ONLINE=ON)
we got:
Msg 319, Level 15, State 1, Line 5
Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon.
Completion time: 2021-05-13T14:20:03.4872035-04:00
Can anyone help/advise as to what my next steps might be?