Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

restoring a backuped user database

3 posts in Backup and Recovery Last posting was on 2001-03-26 18:27:14.0Z
Vittorio Brugiatelli Posted on 2001-03-26 09:33:24.0Z
Message-ID: <3ABF0CE4.3085ECF6@wuerth-phoenix.com>
Date: Mon, 26 Mar 2001 11:33:24 +0200
From: Vittorio Brugiatelli <vittorio.brugiatelli@wuerth-phoenix.com>
X-Mailer: Mozilla 4.6 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Thomas Lorenzi <Thomas.Lorenzi@wuerth.it>
Subject: restoring a backuped user database
Content-Type: multipart/mixed; boundary="------------19804D6ED001AEAD8A4BDFAC"
Newsgroups: sybase.public.sqlserver.backup+recovery
Lines: 54
NNTP-Posting-Host: 62.110.70.132
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.backup+recovery:365
Article PK: 1060882

Hi everyone!

We use ASE 11.9.2 on linux Redhat 6.1.
I've the follow question:
I have an original database on my original database server that has two
physical devices (ex. "A" and "B") used for data and one physical device
(ex. "L") used for log.
In addition to the standard segments (default, system and logsegment) I
use another one (myseg). Only on table is assigned to this segment.
I will do this test:
- dump this database
- create a new database server
- load the dumped file into this new database server
Before doing the load I have to create the 3 devices (I've created them
with another name), create my userdatabase and to allocate the devices
to this my new database. After that I can do the load. All this seems to
work fine.
Now my question is, how does the load process know which device should
be assigned to each segment? Ok, I think for the standard segments there
is no problem because when I use the create (alter) database command I
specify which device should be used for data and which device should be
used for log, but how does it know that it must assign the device x to
my additional segment (myseg)? The load process can not use the device
name to do this because the names and locations are different. The id's
of the devices could also not be used because they are different. What
does it use? Why does the load process used the device x instead of
device y?

Best Regards in advance
Vittorio Brugiatelli


Download VCard vittorio.brugiatelli.vcf


Anthony Mandic <amandic Posted on 2001-03-26 10:59:37.0Z
Date: Mon, 26 Mar 2001 20:59:37 +1000
From: Anthony Mandic <amandic@*t.com.au>
Organization: Mandic Consulting Pty. Ltd.
X-Mailer: Mozilla 4.61 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: restoring a backuped user database
References: <3ABF0CE4.3085ECF6@wuerth-phoenix.com>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Message-ID: <zPImNaetAHA.198@forums.sybase.com>
Newsgroups: sybase.public.sqlserver.backup+recovery
Lines: 48
NNTP-Posting-Host: CPE-208-111-111-203.syd.dav.net.au 203.111.111.208
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.backup+recovery:364
Article PK: 1060880


Vittorio Brugiatelli wrote:

> I will do this test:
> - dump this database
> - create a new database server
> - load the dumped file into this new database server
> Before doing the load I have to create the 3 devices (I've created them

You don't actually need to create 3. But this is a side issue.
See below.

> with another name), create my userdatabase and to allocate the devices
> to this my new database. After that I can do the load. All this seems to
> work fine.

You can also do a create database for load. This saves you the
trouble of having it doing the page allocations which are going
to be wiped by the load anyway.

> Now my question is, how does the load process know which device should
> be assigned to each segment? Ok, I think for the standard segments there
> is no problem because when I use the create (alter) database command I
> specify which device should be used for data and which device should be
> used for log, but how does it know that it must assign the device x to
> my additional segment (myseg)? The load process can not use the device
> name to do this because the names and locations are different. The id's
> of the devices could also not be used because they are different. What
> does it use? Why does the load process used the device x instead of
> device y?

Its based on relative position not name. If the dumped database
has a layout of data, data, log and data. It will use the same
relative postions during the load. It can coalesce the first
two data fragments and all 3 data fragments can be on the same
device (in fact all 4 can). If you do a test by loading into
one fragment, it will break it up to match the original and
you will end up with data, log and data - where the first data
fragment matches the two original ones. This all be on the
same device, of course.

-am © 2001


Bret Halford Posted on 2001-03-26 18:27:14.0Z
Message-ID: <3ABF8A02.1702691@sybase.com>
Date: Mon, 26 Mar 2001 11:27:14 -0700
From: Bret Halford <bret@sybase.com>
Organization: Sybase, Inc.
X-Mailer: Mozilla 4.5 [en]C-CCK-MCD (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: restoring a backuped user database
References: <3ABF0CE4.3085ECF6@wuerth-phoenix.com> <zPImNaetAHA.198@forums.sybase.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.sqlserver.backup+recovery
Lines: 52
NNTP-Posting-Host: bret-pc.sybase.com 157.133.80.211
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.backup+recovery:363
Article PK: 1060879


Anthony Mandic wrote:

> Vittorio Brugiatelli wrote:
>
>
>
> > Now my question is, how does the load process know which device should
> > be assigned to each segment? Ok, I think for the standard segments there
> > is no problem because when I use the create (alter) database command I
> > specify which device should be used for data and which device should be
> > used for log, but how does it know that it must assign the device x to
> > my additional segment (myseg)? The load process can not use the device
> > name to do this because the names and locations are different. The id's
> > of the devices could also not be used because they are different. What
> > does it use? Why does the load process used the device x instead of
> > device y?
>
> Its based on relative position not name. If the dumped database
> has a layout of data, data, log and data. It will use the same
> relative postions during the load. It can coalesce the first
> two data fragments and all 3 data fragments can be on the same
> device (in fact all 4 can). If you do a test by loading into
> one fragment, it will break it up to match the original and
> you will end up with data, log and data - where the first data
> fragment matches the two original ones. This all be on the
> same device, of course.

To rephrase this slightly: The load process works off of the logical page
numbers,
getting the segment information from what was in the sysusages table on the
source
server at the time of the dump, and getting the device information from the
sysusages
table on the destination server. ie, the dump knows that the first, say 5120
pages
are data pages, followed by 2048 log pages. When it loads, it loads the first
5120 pages
of the dump into the first 5120 pages of the destination database, on
whichever device(s)
you told the server to put the first 5120 pages on, and assigns those pages
the same segmap
value that they had on the original server.

-bret