2440368 - When execute a 'alter database off' command, the 'Msg 5066, Level 16, State 1' occurs -- ASE | SAP Knowledge Base Article

SAP Knowledge Base Article - Preview

2440368 - When execute a 'alter database off' command, the 'Msg 5066, Level 16, State 1' occurs -- ASE

Symptom

Database was extended on device master by mistake. After extended on right device, some data remains on master device still.
So, the 'error 5066' occurs when try to put off it from master device.

      1> use CMS
      2> go
      1> sp_dropsegment system, CMS, master 
      2> go
      DBCC execution completed. If DBCC printed error messages, contact a user with System Administrator (SA) role. DBCC execution completed.
      If DBCC printed error messages, contact a user with System Administrator (SA) role. Segment reference to device dropped. (return status = 0)

      1> sp_dropsegment "default", CMS, master
      2> go
      DBCC execution completed. If DBCC printed error messages, contact a user with System Administrator (SA) role. DBCC execution completed.
      If DBCC printed error messages, contact a user with System Administrator (SA) role. Segment reference to device dropped.
      WARNING: There are no longer any segments referencing device 'master'.  This device will no longer be used for space allocation. (return status = 0)

Device master is now mark as --unused by any segment -- 

      1>sp_helpdb CMS
      2> go  
      .....................................................

      device_fragments                                   size                      usage                       created                                   free_kbytes  
      ----------------------------------    -----------------------  --------------------   --------------------------------   -----------------------------  
      CMS                                                 5120.0 MB                data only             Dec  1 2016 10:42AM                          64  
      CMS_Log                                          2048.0 MB                  log only             Dec  1 2016 10:42AM                   not applicable  
      CMS_Log                                          8192.0 MB                  log only             Dec  7 2016 11:20AM                   not applicable  
      master                                               934.0 MB                data only            Feb 22 2017 11:13AM                             0  
      master                                               576.0 MB               data only             Feb 23 2017 11:16AM                             0  
      CMS                                               10240.0 MB               data only             Feb 23 2017 11:39AM                       5642008    

      ---------------------------------------------------------------------------------  
      log only free kbytes = 10429736    

      device                             segment  

      ---------------------------- -----------------------------------------------------
      CMS                                default  
      CMS                                system  
      CMS_Log                         logsegment  
      master                            -- unused by any segments --

When try to put the segment master off for database CMS, an error occured : 

      1> alter database CMS off master='1510M'
      2> go
      ALTER DATABASE is starting in database 'CMS'. This command will process 755 allocation units.
      Msg 5066, Level 16, State 1: Server 'HOP', Line 1: Table 'ADS_EVENT_DETAIL' contains off-row columns that do not link back to their owning rows.
      Run dbcc shrinkdb_setup to set up back links for this database.


Read more...

Environment

SAP Adaptive Server Enterprise 15.7 , 16.0

Product

SAP Adaptive Server Enterprise 15.7 ; SAP Adaptive Server Enterprise 16.0 ; SAP BusinessObjects Business Intelligence platform 4.2

Keywords

unused by any segment, alter database off, dbcc shrinkdb_setup, Msg 5066, , KBA , BC-SYB-ASE , Sybase ASE Database Platform (non Business Suite) , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP ONE Support launchpad (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.