Quantcast
Channel: SCN : All Content - SAP Adaptive Server Enterprise (SAP ASE) for Custom Applications
Viewing all articles
Browse latest Browse all 757

Sybase ASE load database command and placement of segments within devices

$
0
0

Hi,

Within my Sybase server, I have a database that has 12 physical devices, and each device that starts with qip_infra or qip_system has a segment which houses a range partition.

In short, database looks like this:

Device                         Segment

---------------                   ------------------   

qip_infra_partition1          infraaudit2015seg

qip_infra_partition2          infraaudit2016seg

qip_infra_partition3          infraaudit2017seg

qip_infra_partition4          infraaudit2018seg

qip_infra_partition5          infraaudit2019seg

 

qip_system_partition1     systemaudit2015seg

qip_system_partition2     systemaudit2016seg

qip_system_partition3     systemaudit2017seg

qip_system_partition4     systemaudit2018seg

qip_system_partition5     systemaudit2019seg

 

qip_dat                          default

qip_dat                          system

qip_log                           logsegment

 

I decide to move all of the segments (which contain data) that are labeled infraaudit2016-2019 into the qip_infra_partition1 device.  Also, I move all of the segments (which contain data) that are labeled systemaudit2016-2019 into the qip_system_partition1 device.  This way, all segments that start with infraaudit now belong to one physcial device, the qip_infra_partition1 device.  All segments that start with systemaudit now belong to one physical device, the qip_system_partition1 device.  When doing sp_helpdb on my database, it now looks like this:

Device                         Segment

---------------                   ------------------   

qip_infra_partition1          infraaudit2015seg

qip_infra_partition1          infraaudit2016seg

qip_infra_partition1          infraaudit2017seg

qip_infra_partition1          infraaudit2018seg

qip_infra_partition1          infraaudit2019seg

qip_infra_partition2          -- unused by any segments --

qip_infra_partition3          -- unused by any segments --

qip_infra_partition4          -- unused by any segments --

qip_infra_partition5          -- unused by any segments --

 

qip_system_partition1     systemaudit2015seg

qip_system_partition1     systemaudit2016seg

qip_system_partition1     systemaudit2017seg

qip_system_partition1     systemaudit2018seg

qip_system_partition1     systemaudit2019seg

qip_system_partition2     -- unused by any segments --

qip_system_partition3     -- unused by any segments --

qip_system_partition4     -- unused by any segments --

qip_system_partition5     -- unused by any segments --

 

qip_dat                          default

qip_dat                          system

qip_log                           logsegment

 

So far so good.  Now, I do a Sybase dump of this database, and then load it into another Sybase Server with the same database name, but this database does not have all 12 physical devices defined, but rather only 4 physical devices.  The qip_dat, qip_log, qip_infra_partition1 and qip_system_partition1 physical devices defined.  Database that I am going to load my dump file into looks like this (notice only 4 devices):

Device                         Segment

---------------                   ------------------   

qip_infra_partition1          infraaudit2015seg

qip_infra_partition1          infraaudit2016seg

qip_infra_partition1          infraaudit2017seg

qip_infra_partition1          infraaudit2018seg

qip_infra_partition1          infraaudit2019seg

 

qip_system_partition1     systemaudit2015seg

qip_system_partition1     systemaudit2016seg

qip_system_partition1     systemaudit2017seg

qip_system_partition1     systemaudit2018seg

qip_system_partition1     systemaudit2019seg

 

qip_dat                          default

qip_dat                          system

qip_log                           logsegment

 

After I load my Sybase dump file into this database successfully, and I issue a sp_helpdb command, I see the following:

Device                         Segment

---------------                   ------------------   

qip_infra_partition1 -- unused by any segments --

qip_infra_partition1          infraaudit2015seg

qip_infra_partition1          infraaudit2016seg

qip_infra_partition1          infraaudit2017seg

qip_infra_partition1          infraaudit2018seg

qip_infra_partition1          infraaudit2019seg

 

qip_system_partition1     -- unused by any segments --

qip_system_partition1     infraaudit2015seg

qip_system_partition1     infraaudit2016seg

qip_system_partition1     infraaudit2017seg

qip_system_partition1     infraaudit2018seg

qip_system_partition1     infraaudit2019seg

qip_system_partition1     systemaudit2015seg

qip_system_partition1     systemaudit2016seg

qip_system_partition1     systemaudit2017seg

qip_system_partition1     systemaudit2018seg

qip_system_partition1     systemaudit2019seg

 

qip_dat                          default

qip_dat                          system

qip_log                           logsegment

 

Notice that the segments that belonged to qip_infra_partition1 device are now added to the qip_system_partition1 device.  In addition, both devices qip_infra_partition1 and qip_system_partition1 have a segment listed as "-- unused by any segments -- ".  Can anyone explain to me how this would happen?  Would the Sybase dump file contain information about the devices (qip_infra_partition2-5 and qip_system_partition2-5) and some old segment mapping?  Such that during the Sybase load, since these devices do not exist in my new database, that it tries to figure out what to do with the devices and segments that don't exist?  Any help would be greatly appreciated!!

Lisa Sayre


Viewing all articles
Browse latest Browse all 757

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>