Updating the Adaptive Server System Catalog to Support Quoted Identifiers

To ensure that replication proceeds correctly for objects with quoted identifiers created in versions of Adaptive Server earlier than 15.7, update the Adaptive Server system catalog after you upgrade Adaptive Server, but before you restore replication.

  1. Log in to isql at the primary Adaptive Server database.
  2. Update the system catalog. Enter:
    set nocount on
    declare @cmd varchar(200)
           ,@cmdstat int
           ,@count int
           ,@dbid int
           ,@dbname varchar(30)
           ,@total int
    select @cmdstat = config_admin(1, 102, 1, 1, NULL, NULL)
    select @dbid = 1, @count = 0, @total = 0
    while @dbid is not null
    begin
      select @dbname = db_name(@dbid)
      select @cmd = 'select @count = count(1) from '+ @dbname
                  + '.dbo.sysobjects'
                  + 'where (sysstat2 & 134217728) = 0 '
                  + 'and type = ''U'''
      exec (@cmd)
      if @count > 0
      begin
      print 'Object count in %1! is %2!', @dbname, @count
      select @total = @total + @count
      select @cmd = 'update ' + @dbname + '.dbo.sysobjects '
                  + 'set sysstat2 = sysstat2 | 134217728 '
                  + 'where (sysstat2 & 134217728) = 0 '
                  + '  and type = ''U'''
      exec (@cmd)
      end
      select @dbid = min(dbid) from sysdatabases where dbid > @dbid
    end
    if @total > 0
      print 'You must restart ASE for changes to take effect.'
    select @cmdstat = config_admin(1, 102, 0, 1, NULL, NULL)