Step 4: Re-create device allocations for master

If you recreated your master device according to the process described in step 2 above, your master database may now be too small. Perform these steps to allocate more space for your master database:

  1. From the hard copy version of sysusages, total the size values shown for dbid 1 (the dbid of the master database). Compare those to the size of the current master database. You can determine them by issueing:

    select sum(size)
    from sysusages
    where dbid = 1
    
  2. If your current master database is too small, use alter database to enlarge it so that it to the size you require. To convert logical pages to megabytes, use this query:

    select N / (power(2,20) / @@maxpagesize)
    

    Where N is the number of logical pages.

You should not need to alter the size of the master database if you rewrote the master database with the -m master option. Adaptive Server has recorded the allocation units used by all databases on the device, so you should already have as much space as you need to load your dump of master.

NoteIf you do not have a hard copy of sysusages, you can determine how much larger a database needs to be by attempting to load it. If it is too small, Adaptive Server displays an error message telling you how much larger to make it.

Previous versions of Adaptive Server required that you perform a complex series of steps to recreate allocations on the new master device the old version. This procedure is no longer necessary. Adaptive Server versions 15.0 and later perform most of the work for you.