segment remapping with load database when moving a database
TRANSCRIPT
-
8/16/2019 Segment Remapping With Load Database When Moving a Database
1/31
http://www.sybase.com/detail?id=1324
SEGMENT
REMAPPING WITH LOAD DATABASE
WHEN MOVING A
DATABASE To safely load an old database onto a new
database, create the target database eactly the
same as the so!rce.
Contents
To mo"e a database to new de"ices on yo!r system or to reb!ild a database on the old de"ices, yo!
ha"e to #rst create the new database, then load a d!mp of the old database onto it. $%& $er"er
preser"es the logical str!ct!re of the so!rce database when it is loaded onto the target database.
'rom $ystem 1( on, $%& $er"er also preser"es the segment mapping.
)n order to s!ccessf!lly load the d!mp, yo! ha"e to create the target database to be identical to the
so!rce, with de"ices of the same si*e and in the same order. )f yo! can+t or don+t create the
database !st li-e the so!rce, yo! may get !nepected res!lts when yo! the load the database.
This Techote disc!sses potential load database problems. )t contains the following sections:
• Terminology
• istory of ow load andles 'ragments
• 0nepected es!lts 'rom load database
• planation of es!lts
• $!mmary
http://printthis%28%279808%27%2C%20%27width%3D620px%2C%20height%3D380px%27%29/http://www.sybase.com/popup.do?id=1324&siteId=1&pageType=detail&popupType=emailThis&rel=nofollowhttp://openpopup%28%27http//twitter.com/home?status=%27%20+%20encodeURIComponent(location.href),600,600);http://fbs_click%28%29/http://www.sybase.com/detailList/rss.do?nodeId=9808
-
8/16/2019 Segment Remapping With Load Database When Moving a Database
2/31
• ow to "oid roblems 5hen 6o"ing or e7creating 8atabases
• eferences
Terminology
This Techote !ses the following terminology:
Source database the original database.
Target database the new database onto which a d!mp of the so!rce database is loaded.
Fragment a dis- piece containing part or all of a database. )t is represented by a row in the
sysusages table in the master database. The create database and alter database commands
create new rows in sysusages. 'or eample, this command:
1> create database source_db
2> on dev1 = 2
3> log on dev2 = 2
4> go
creates two fragments, therefore two rows in sysusages.
Segment a label !sed to indicate the type of data that can be p!t on a fragment. $egments (, 1,
and 2 are always the system, defa!lt, and log segments. $egments 3 and following are !ser7 de#ned
segments. $egments for a database are represented by rows in the syssegments table of the
database.
$egments are logical. They are a way of organi*ing data in a database. 9o! can place segments on
fragments, then associate obects with the segments. $egments do not ha"e a one7to7one
relationship with physical space. 9o! can place two or more segments on a fragment, or yo! can
etend a segment o"er se"eral fragments.
sys!sages table the sysusages table in the master database -eeps trac- of database fragments. )t
contains one row for each fragment of all yo!r databases. %!ery sysusages as follows:
1> use master
2> go
1> select dbid, segmap , lstart,
size, vstart
-
8/16/2019 Segment Remapping With Load Database When Moving a Database
3/31
2> from sysusages where dbid =
3> go
dbid segmap lstart
size vstart
---- ------ ----- - ---
-- --------
5 3 0
1024 33554432
5 4 1024
1024 50331648
5 8 2048
2048 67108864
5 16 4096
2048 83886080
(4 rows affected
The col!mns in this o!tp!t are:
dbid the database )8 n!mber.
segmap a bitmapped representation of the "al!es of all segments associated with a dis- fragment.
'ig!re 1 shows how the segmap "al!e in sysusages is determined:
Figure: How segmap values are determined
-
8/16/2019 Segment Remapping With Load Database When Moving a Database
4/31
)n 'ig!re 1, a fragment contains both the system and default segments. Therefore the bits in the #rst
and second positions of the bitmap are t!rned on, for a "al!e of 3.
lstart The logical page n!mber on which a database fragment begins. &ogical pages are !sed by the
database. The #rst fragment of a database has an lstart "al!e of (.
size The fragment si*e is in 2 pages. To get the n!mber of megabytes, di"ide the si*e by ;12.
vstart The "irt!al page n!mber on which a fragment begins. set in 2 pages.
Note
'or more information abo!t segments and placing databases on de"ices, see the SQL Server System
Administration Guide.
History of How load Handles Fragments
The way that $%& $er"er handled fragments changed with $ystem 1(, as described in the following
sections.
Pre-System ! load "#$ct%o$al%ty
efore release 1(.(, $%& $er"er preser"ed the logical page order b!t not the segment mapping of a
database d!ring a load. &oading a database d!mp onto a target database that yo! created
di>erently than the so!rce database@with di>erently si*ed fragments or fragments created in adi>erent order@co!ld res!lt in rror 2;;A Bfor eample, log7on7data or data7on7logC. 'ig!re 2 shows
how rror 2;;A might occ!r. )n this eample, the segments were placed on the target database in a
di>erent order than on the so!rce, res!lting in data pages on a log segment and log pages on a data
segment.
-
8/16/2019 Segment Remapping With Load Database When Moving a Database
5/31
Figure: Error 2558 in pre-System 1 load
Note
$ee the SQL Server Error Messages man!al for more information abo!t rror 2;;A.
System ! &'a$(e %$ load "#$ct%o$al%ty
)n $ystem 1(, $ybase changed load f!nctionality to a"oid the 2;;A error. ow when yo! load a
d!mp onto a target database, the target acD!ires the segment mapping of the so!rce any
segments that yo! may ha"e placed on the target database are o"erwritten.
Figure: System 1 load overwrites target segments
-
8/16/2019 Segment Remapping With Load Database When Moving a Database
6/31
!ne"pe#ted $esults From load database
5hile data miing no longer happens in the c!rrent release of $%& $er"er, yo! can still get
!nepected res!lts if yo! mo"e a database spanning se"eral de"ices onto a new set of de"ices
where the fragments were created di>erently than on the original database. The ways yo! can
create a database di>erently are:
• Ereating the database with fragments of di>erent si*es than the so!rce database
• Ereating the fragments in a di>erent order than the so!rce if the fragments are of "arying
si*es
0nepected res!lts incl!de:
• 8is- fragmentation more fragments than yo! started with
• 8ata and log fragments on one de"ice
• database that is impossible to re7create with create database
E)am*le
The following eample demonstrates how loading a d!mp onto a database created with di>erently
si*ed fragments or fragments in a di>erent order than the so!rce database can increase the n!mber
of fragments and place data and log on the same de"ice.
&reat%$( source_db
The so!rce database, source_db was created as follows:
1> create database source_db
2> on dev1 = 2
3> log on dev2 = 2
4> go
&ater, two more de"ices were added to the database:
1> alter database source_db
2> on dev3 = 4,
3> dev4 = 4
4> go
Then two !ser7de#ned segments, seg! and seg", were added to the new de"ices:
1> sp_addsegment seg1, source_db, dev3
-
8/16/2019 Segment Remapping With Load Database When Moving a Database
7/31
2> go
1> sp_addsegment seg2, source_db, dev4
2> go
'inally, the system and defa!lt segments were dropped from de"3 and de"4:
1> sp_dropsegment system, source_db, dev3
2> go
1> sp_dropsegment !default!, source_db, dev3
2> go
1> sp_dropsegment system, source_db, dev4
2> go
1> sp_dropsegment !default!, source_db, dev4
2> go
select from sysusages shows fo!r fragments for source_db:
1> select dbid, segmap , lstart,
size, vstart
2> from sysusages where dbid =
3> go
dbid segmap lstart
size vstart
---- ------ ----- - ---
-- --------
5 3 0
1024 33554432
5 4 1024
1024 50331648
5 8 2048
2048 67108864
5 16 4096
2048 83886080
-
8/16/2019 Segment Remapping With Load Database When Moving a Database
8/31
(4 rows affected
The segmap col!mn shows the two !ser7de#ned segments, seg! and seg", as "al!es A and 1F
respecti"ely.
The database fragments now loo- li-e this:
Figure: source_db fragments
&reat%$( target_db
target_db was created di>erently than source_db# The database was created in a single command
on all its de"ices at once instead of being altered onto them later. This placed the log segment last
and res!lted in a di>erent order of fragment si*es:
1> create database target_db
2> on dev = 2,
3> dev" = 4,
4> dev# = 4
> log on dev$ = 2
"> go
0ser7de#ned segments seg! and seg" were added to dev$ and dev%:
1> sp_addsegment seg1, target_db, dev"
-
8/16/2019 Segment Remapping With Load Database When Moving a Database
9/31
2> go
1> sp_addsegment seg2, target_db, dev#
2> go
The system and defa!lt segments were dropped from dev$ and dev%:
1> sp_dropsegment system, source_db, dev"
2> go
1> sp_dropsegment !default!, source_db, dev"
2> go
1> sp_dropsegment system, source_db, dev#
2> go
1> sp_dropsegment !default!, source_db, dev#
2> go
select from sysusages shows fo!r fragments for target_db:
1> select dbid, segmap , lstart,
size, vstart
2> from sysusages where dbid = "
3> go
dbid segmap lstart size
vstart
---- ------- -- ----- - -----
--------
6 3 0 1024
100663296
6 8 1024 2048
117440512
6 16 3072 2048
134217728
6 4 5120 1024
150994944
-
8/16/2019 Segment Remapping With Load Database When Moving a Database
10/31
(4 rows affected
'ig!re ; shows target_db+s fragments as they were created:
Figure: target_db wit% fragments in t%e order #reated
Load%$( D#m* +rom source_db o$to target_db
To contin!e the eample, source_db is d!mped to tape and the d!mp loaded onto target_db with the
load database command:
load database target_db from !%devices%source_dump! Two things happen:
• $%& $er"er o"erwrites the segments originally added to target_db with the segment map of
source_db.
• eca!se more than one segment is now assigned to the same fragment, $%& $er"er di"ides
the fragment into smaller fragments, each with its own segment.
'ig!re F shows ill!strates the changes to segment mapping:
-
8/16/2019 Segment Remapping With Load Database When Moving a Database
11/31
Figure: target_db a#&uires segment map from source_db
select from sysusages now shows si dis- fragments for target_db:
1> select dbid, segmap , lstart,
size, vstart
2> from sysusages where dbid = "
3> go
dbid segmap lstart size
vstart
---- ------ ----- - ----
------
6 3 0 1024
100663296
6 4 1024 1024
117440512
6 8 2048 1024
117441536
6 8 3072 1024
134217728
-
8/16/2019 Segment Remapping With Load Database When Moving a Database
12/31
6 16 4096 1024
134218752
6 16 5120 1024
150994944
&oading the d!mp of source_db onto target_db ca!sed the following !nepected res!lts:
• &og and data are on the same physical de"ice, altho!gh not mied on the same fragment.
• The n!mber of dis- fragments increased from fo!r to si.
E"planation of $esults
The res!lts in the eample are d!e to the way $%& $er"er handles loads and how it resol"es
di>erences in the way databases are created. 5hen yo! mo"e a database to a new set of de"ices or
re7create it on the same de"ices, the physical and logical storage is determined as follows:
• The target database determines the physical storage, that is, how m!ch space is allocated
on which database de"ices.• The so!rce database determines logical storage, that is, the logical page order and segmap
"al!es of the fragments. This occ!rs whether or not yo! ha"e de#ned segments on the new
fragments with s*,addse(me$t and s*,e)te$dse(me$t .
Resol%$( D%.ere$ces
5hen a database d!mp is loaded onto a database that was created di>erently, $%& $er"er resol"es
the di>erences as follows:
• The load process o"erwrites any segment mapping yo! may ha"e created on the target
database.
• )f data which was on di>erent fragments with di>erent segmaps on separate de"ices is now
placed on the same de"ice, $%& $er"er will create separate fragments on the de"ice for
each fragment. )n other words, it will add rows to sysusages with di>erent segmap "al!es.
• )f data which was the same segment on separate de"ices is placed on contig!o!s fragments
on the same de"ice, $%& $er"er will merge the fragments. )n other words, it will delete the
separate rows in sysusages and insert a single row with a larger si*e.
'ata(ases T%at Cannot )e $e-Created
)f yo! made a si*e error when initiali*ing a de"ice and later created a database on the de"ice, yo!co!ld ha"e a database that cannot be created with the create or alter database commands.
5hen yo! initiali*e a de"ice with the d%s/ %$%t command, yo! m!st specify a si*e in 2 pages. Gne
megabyte is ;12 2 pages. )f yo! enter a de"ice si*e that is not di"isible by ;12, yo! may create a
de"ice whose si*e is not in whole megabytes. $%& $er"er allocates space in !nits of 2;F pages, or
1/26, so yo!r de"ice may ha"e a si*e that incl!des 1/26.
-
8/16/2019 Segment Remapping With Load Database When Moving a Database
13/31
)f yo! create a database that is too large to #t on the de"ice, $%& $er"er !ses all the space
a"ailable, so yo! get a database whose si*e also incl!des 1/26.
)f yo! ha"e s!ch a database, yo! may not eperience any problems !ntil yo! try to mo"e or reb!ild
it. The create and alter database commands allow yo! to enter only whole megabytes to specify
database si*e. Therefore yo! cannot create a new database eactly the si*e of the old one. )f yo!
load the old database onto the new, $%& $er"er has to remap the fragments, creating 1/26
fragments.
$imilarly, if yo! create the target database on a de"ice whose si*e incl!des 1/26, and try to load a
d!mp of a database whose si*e is in whole megabytes, yo! get 1/26 fragments.
Summary
The !nintended res!lts of loading a so!rce database onto a target database that was created
di>erently incl!de:
• &og and data fragments on the same de"ice
• n !npredictable n!mber of fragments
• )f yo! ha"e 1/26 fragments, a database which yo! cannot re7create in eactly the same
way
How to *void +ro(lems ,%en oving or $e-#reating'ata(ases
The only way to a"oid !nepected res!lts when mo"ing a database is to create the new database
with fragments in the same si*e and order as the so!rce. The following methods allow yo! to do this.
Gat'er I$+ormat%o$ Abo#t 0o#r Database
To get a complete pict!re of how yo!r so!rce database was created@what de"ices it+s on, what
segments it has, and what si*e the fragments are@yo! can gather information from the following
system tables:
• sysdevices
• sysdatabases
• sysusages
• syssegments
'ollow these steps to get information abo!t yo!r database:
1. To see what segments are on the database, select from the syssegments table:
12 1> use source_db
32 2> go
-
8/16/2019 Segment Remapping With Load Database When Moving a Database
14/31
-
8/16/2019 Segment Remapping With Load Database When Moving a Database
15/31
2H. target$db 6
2A. tempdb 2
2I.
3(. (6 rows affected
31. 0se the database )8 to select from the sysusages table. The sysusages table shows yo! the
order the fragments were created, their si*es, and their segmap "al!es:
312 1> select dbid, segmap, lstart, size, vstart
332 2> from sysusages where dbid =
342 3> go
3;. dbid segmap lstart
size vstart
3F. ---- ------- -- ----- -
----- --------
3H. 5 3 0
1024 33554432
3A. 5 4 1024
1024 50331648
3I. 5 8 2048
2048 67108864
4(. 5 16 4096
2048 83886080
41.
42. (4 rows affected
-
8/16/2019 Segment Remapping With Load Database When Moving a Database
16/31
1. To see what de"ices the database is on, loo- at the sysdevices table. ach vstart "al!e from
sysusages will #t between the &ig& and lo' "irt!al page n!mbers of one of the de"ices.
12 1> select low, high, name from sysdevices
32 2> go4. low %ig%
!ame
;. -------- --------
----
F. 33554432 33556479
dev1
H. 50331648 50333695dev2
A. 67108864 67110911
dev3
I. 83886080 83888127
dev4
1(. 100663296 100665343
dev5
11. 117440512 117442559
dev6
12. 134217728 134219775
dev7
13. 150994944 150996991
dev8
'ig!re H shows the relationship between the system tables that gi"e yo! information abo!t yo!rdatabases.
-
8/16/2019 Segment Remapping With Load Database When Moving a Database
17/31
Figure: $elations%ip (etween system ta(les t%at s%ow spa#e usage
I$%t%al%;%$( De%ces &orrectly
5hen yo! initiali*e yo!r new de"ices, be s!re that the si*e yo! specify is di"isible by ;12.
1. )nitiali*e the dis-. 0se a command similar to this:
12 1> dis& init name = !dev!,
32 2> physname = !%wor&%sybase%devices%dev!,
42 3> vdevno = ",
52 4> size = 2'4$
This eample command creates a 46 de"ice.
-
8/16/2019 Segment Remapping With Load Database When Moving a Database
18/31
F. Ehec- the sysdevices table in the master database for the page ranges of the de"ice:
72 1> use master
82 2> go
92 1> select low, high, name from sysdevices
!2 2> where name = dev
2 3> go
12 low high
name
32 (((((((( ((((((((
((((
42 1''""32)" 1''""343dev
1;. 0se this eD!ation to see if the si*e of the de"ice is a whole megabyte:
1F. (high low & 1 ' 512
)f the de"ice si*e is not a whole megabyte, drop the de"ice with sp_dropdevice. $ee the
System Administration Guide for more information on initiali*ing de"ices.
&reat%$( t'e Database &orrectly
'ollow these steps to create the target database:
1. efer to the o!tp!t from the sysusages table for the so!rce database as yo! create the new
database.
2. )f yo! ha"e the script which created the so!rce database, r!n it now, then go to step 5.
3. Ereate yo!r database with the fragments in eactly the same order as the so!rce database.
The database in the long eample m!st be created in two steps if yo! !se the lo( o$
option. This is necessary beca!se log is on the second fragment, b!t the lo( o$ option
cannot be !sed as the second phrase of a create statement.
8epending on where yo!r log segment is, !se commands li-e the following:
1> create database target_db
2> on dev = 2
3> log on dev" = 2
http://www.sybase.com/detail?id=1324#13832http://www.sybase.com/detail?id=1324#13832
-
8/16/2019 Segment Remapping With Load Database When Moving a Database
19/31
4> for load
> go
1> alter database target_db
2> on dev# = 4,
3> dev$ = 4
4> for load
> go
9o! do not need to add segments. The target database will acD!ire the segment mapping of
the so!rce database.
4. Ehec- the messages from the create and alter commands.
-
8/16/2019 Segment Remapping With Load Database When Moving a Database
20/31
H. 6 3 0
1024 100663296
A. 6 4 1024
1024 117440512
I. 6 3 2048
2048 134217728
1(. 6 3 4096
2048 150994944
11.
12. (4 rows affected
erent than those of the so!rce database. This doesn+t matter.
1. &oad the database d!mp from the so!rce database with a command li-e the following.
12 load database target_db from !%devices%source_dump!
3. &oo- at sysusages again after the load:
42 1> select dbid, segmap, lstart, size, vstart
52 2> from sysusages where dbid = "
62 3> go
H. dbid segmap lstart
size vstart
A. ---- ------ -----
---- ------
I. 6 3 0
1024 100663296
-
8/16/2019 Segment Remapping With Load Database When Moving a Database
21/31
1(. 6 4 1024
1024 117440512
11. 6 8 2048
2048 134217728
12. 6 16 4096
2048 150994944
13.
14. (4 rows affected
dev# = 4,
62 > dev$ = 4
72 "> for load
82 #> go
8o not !se the lo( o$ option and do not add any segments. $egment mapping will come
from the so!rce database when it is loaded.
I. erform a select from sysusages now:
!2 1> select dbid, segmap, lstart, size, vstart
2 2> from sysusages where dbid = "
-
8/16/2019 Segment Remapping With Load Database When Moving a Database
22/31
12 3> go
13. dbid segmap lstart
size vstart
14. ---- ------ -----
---- ------
1;. 6 7 0
1024 100663296
1F. 6 7 1024
1024 117440512
1H. 6 7 2048
2048 134217728
1A. 6 7 4096
2048 150994944
1I.
2(. (4 rows affected
er from those of the so!rce database. This is not a problem.
The segmap "al!es defa!lt to H. These "al!es will change after the load.
1. &oad the database d!mp from the so!rce database.
12 load database target_db from !%devices%source_dump!
3. &oo- at sysusages again after the load:
421> select dbid, segmap, lstart, size, vstart
52 2> from sysusages where dbid = "
62 3> go
H. dbid segmap lstart
size vstart
-
8/16/2019 Segment Remapping With Load Database When Moving a Database
23/31
A. ---- ------ -----
---- ------
I. 6 3 0
1024 100663296
1(. 6 4 1024
1024 117440512
11. 6 8 2048
2048 134217728
12. 6 16 4096
2048 150994944
13.
14. (4 rows affected
-
8/16/2019 Segment Remapping With Load Database When Moving a Database
24/31
ine 1:
S"s$(%s d(es n(t eist in its ('n se%#ent in data*ase ) 'it,se%#ap ) 'it, $(%ia$ start pa%e n#*er (& 0. ( #a" n(t
se M7 A in t,is ase se M7 AABASE instead.
d* &indstranded*id:
;inds t,e n#*er (& n(n-s"s$(%s etents t,at reside (n a
$(%se%#ent and t(%%$es t,e stats *it B2d*id? and
$start=>$start &(r $(% &ra%#ent?
%(
/@ (n&ir# pdate seeded as intended @/
se$et @ &r(# s"ssa%es ',ere se%#ap = 4
%(
(##it
%(
$esolution
Ea#ine s"ssa%es and s"sdevies t( &ind ',i, &ra%#ents are
(n $(% devies ,(pe&$$" (*vi(s &r(# devie na#es (r +n('nt( ser.
-
8/16/2019 Segment Remapping With Load Database When Moving a Database
25/31
pdate s"ssa%es.se%#ap *a+ t( 4 &(r ea, $(% &ra%#ent.
n d* &indstranded>d*id? t( &ind ta*$es 'it, data 'ritten(n t,e $(% devie.
*p a$$ s, ta*$es (t (r se$et int( ne' ta*$es. I& *ped
rereate ta*$es nder di&&erent na#e and *p data in. eri&"ta*$e (nsisten" *" rnnin% d* ,e+ta*$e. I& it retrns
$ean dr(p (ri%ina$ ta*$e. ena#e ne' ta*$es t( (ri%ina$ ta*$e
na#es.
;indin% ',i, &ra%#ents 'ere assi%ned t( ser-de&inedse%#ents an *e di&&i$t n$ess $ear na#in% (nventi(ns ,ave
*een sed. Ea#inin% s"sse%#ents 'i$$ revea$ i& ser-de&ined
se%#ents ,ave *een sed in t,e data*ase. I& s( it #a" *ep(ssi*$e t( rereate t,e (rret se%#aps i& t,e ser re#e#*ers
'e$$ ',at &ra%#ents 'ere assi%ned t( parti$ar se%#ents I7se$et (*et
-
8/16/2019 Segment Remapping With Load Database When Moving a Database
26/31
data*ase d#p &r(# t,e previ(s da". Is t,ere a 'a" t( %ett,e devie in&( &r(# t,e d#pG Is t,ere a 'a" t( rest(re t,eir
s"ste#G
He" (rds: C(' t( Festi(n
He" (rds: d#p data*ase
He" (rds: re(ver"
He" (rds: re(ver
Tip or ,oraround
Sine t,e Dreate data*aseD sript (r #aster data*ase *a+ps
are n(t avai$a*$e "( '($d need t(:
1 Bi$d a ne' ASE server
2 dis+ init a$$ devies
3 reate data*ase eFa$ (r *i%%er t,an data*ase d#p &i$e.
4 $(ad t,e d#p.
5 A&ter $(aded $(% &ra%#ent #a" reside (n devies reserved
&(r data devies.
6 a+e a ,ard (p" (& s"ssa%es and rereate t,e data*asea(rdin% t(
t,e (rder in s"ssa%es. ;(r ea#p$e:
(tpt (& s"ssa%es:
5 3 0 2048000 50331648 1442958
5 3 2048000 1024000 6)108864 1020000
5 3 30)2000 1024000 150994944 1020000
5 4 4096000 1024000 152018944 94692)
5 3 5120000 2048000 16)))2160 2040000
-
8/16/2019 Segment Remapping With Load Database When Moving a Database
27/31
-
8/16/2019 Segment Remapping With Load Database When Moving a Database
28/31
Tip or ,oraround
ead t,e d( id 1324 &r(# t,e te,nia$ $i*rar" &(r detai$s.
$esolution
!reate data*ase (n data
-
8/16/2019 Segment Remapping With Load Database When Moving a Database
29/31
!EAE AABASE: a$$(atin% 1024 pa%es (n dis+ datadev1!EAE AABASE: a$$(atin% 1536 pa%es (n dis+ datadev1
!EAE AABASE: a$$(atin% 1536 pa%es (n dis+ $(%dev1
!EAE AABASE: a$$(atin% 512 pa%es (n dis+ datadev2!EAE AABASE: a$$(atin% 512 pa%es (n dis+ datadev2
1? se$et @ &r(# s"ssa%es ',ere d*id=52? %(
d*id se%#ap $start sie vstart pad nreservedp%s------ ----------- ----------- ----------- ----------- ------
-------------
5 ) 0 1024 33554432 6325 ) 1024 1536 33555456 1536
5 ) 2560 1536 50331648 15365 ) 4096 512 83886080 512
5 ) 4608 512 83886592 512
5 r('s a&&eted
1? $(ad data*ase test &r(# /t#p/data.d#p2? %(
Ba+p Server sessi(n id is: 56. se t,is va$e ',en eetin%
t,esp
-
8/16/2019 Segment Remapping With Load Database When Moving a Database
30/31
5 3 0 2560 33554432 21)65 4 2560 1536 50331648 1528
5 3 4096 1024 83886080 1024
3 r('s a&&eted
$esolution
nder ertain (nditi(ns as detai$ed *e$(' t,is is epeted*e,avi(r. ,ere are n( disadvanta%es t( t,is ,appenin% t,e
data pa%es are sti$$ ',ere t,e" 'ere *e&(re (n$" s"ssa%es ,as
&e'er r('s t,is an *e an advanta%e i& t,e data*ase is%r('in% as t,ere is $i#it (& 128 &ra%#ents per data*ase.
!(nditi(ns reFired &(r &ra%#ents t( (in.
1. Adaent &ra%#ents r('s in s"ssa%es #st *e (n t,e
sa#e devie and (nti%(s.2. 7ri(r t( t,e $(ad s"ssa%es.se%#ap (n t,e tar%et data*ase
d(es n(t #at, 'it, s"ssa%es.se%#ap &r(# t,e s(redata*ase. as s,('n in t,e ea#p$e in t,e tip seti(n.
Case .um(er:
10391255
/pen 'ate: 1998-05-01
05:22:29.0
0ersionE)F: 1102/0
+rodu#t: Adaptive Server
Enterprise
/S: IX
+latform: C7 r64
Case 'es#ription
!rrent data*ase is (n t'( 2B devies. !an t,e data*ase *e
#(ved t( a data*ase (n a 4B devie devie 'as sess&$$"
reated (n 64*it JSG
Tip or ,oraround
(t Avai$a*$e
$esolution
,e data*ase an *e d#ped and $(aded int( t,e 4B devie i&t,e se%#ents &r(# t,e (ri%ina$ data*ase *(t, ,ave t,e sa#e
se%#ap va$e and are (nti%(s.
/t%er Sour#es $elated to 3ssue
e,(te
-
8/16/2019 Segment Remapping With Load Database When Moving a Database
31/31
DSe%#ent e#appin% 'it, (ad ata*ase ',en M(vin% aata*aseD ( I 1324
Case .um(er:
10391815
/pen 'ate: 1998-05-0122:10:05.0
0ersionE)F: 1150/0
+rodu#t: Adaptive Server
Enterprise/S: S($aris
+latform: Sn S($aris S7A!
Case 'es#ription
7r(*$e#s $(adin% a S"ste# 10 data*ase &r(# a d#p. ,end(in% a reate data*ase 'it, t,e data and $(% (n seperate
devies t,e spae t,at t,e previ(s data*ase d#p t((+ is*rea+in% int( se%#ents. ata is *ein% pt (n a $(% se%#ent.
Tip or ,oraround
7$ease e&er t( e,n(te N 1324: Se%#ent e#appin% 'it,$(ad data*ase
$esolution
r(p t,e data*ase and rereate it a(rdin% t( t,e s"ssa%es
r('s &(r t,is data*ase in s"ste# 10.