dbTalk Databases Forums  

Cloning db by copying devices

comp.databases.sybase comp.databases.sybase


Discuss Cloning db by copying devices in the comp.databases.sybase forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Marek Grabiec
 
Posts: n/a

Default Cloning db by copying devices - 07-13-2004 , 03:09 AM






I need to know if there are likely to be any problems with the
following approach to cloning a database. I have 2 databases, db1 and
db2,
they have been created so that they do not share any devices. The
placement of each database on their respective devices is identical.
1. I have shutdown the ase
2. Then at the operating system level I copied the physical datafiles
belonging to the devices of db1 over db2.
3. When the ase was restarted it looks like the process has worked,
ie. db2 now contains all the same objects as db1.
My question is are there any potential problems with using this
process ? Thanks

Reply With Quote
  #2  
Old   
Mark A. Parsons
 
Posts: n/a

Default Re: Cloning db by copying devices - 07-13-2004 , 10:56 AM






Marek Grabiec wrote:
Quote:
I need to know if there are likely to be any problems with the
following approach to cloning a database. I have 2 databases, db1 and
db2,
they have been created so that they do not share any devices. The
placement of each database on their respective devices is identical.
1. I have shutdown the ase
2. Then at the operating system level I copied the physical datafiles
belonging to the devices of db1 over db2.
3. When the ase was restarted it looks like the process has worked,
ie. db2 now contains all the same objects as db1.
My question is are there any potential problems with using this
process ? Thanks
Generally speaking, as long as ase is 'down' there shouldn't be a problem.

A few (obvious?) caveats ...

- suid's may not match in the second database (assuming on a second
dataserver)

- any cross-database references (referential integrity, stored procs, etc.)
probably won't work properly

- if the databases are being replicated you'll most likely have to rebuild
replication for the second database once you've 'recreated' it

- at some point the dataserver will probably come across a mismatched dbid
within the (new) db2 that could cause a few problems (eg, in the case of
un/mounting a database this is rectified when the 'new' database is
recovered)

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

If you do run into any issues you may want to look at the (relatively) new
unmount/mount/'quiesce database' commands (not sure if the un/mount are new
with 12.5.0.3 or 12.5.1??).

You may also want to take a look at the thread "Want to use quiesce and
mount to copy db under same server" (started around 6 May 2004) in the
sybase.public.ase.general newsgroup (news server = forums.sybase.com).

--
Mark A. Parsons

Iron Horse, Inc.
iron_horse (AT) NOSPAM (DOT) compuserve.com


Reply With Quote
  #3  
Old   
Marek Grabiec
 
Posts: n/a

Default Re: Cloning db by copying devices - 07-14-2004 , 02:53 AM



Thanks for the info, I've done a couple of tests and it seems to be
working fine. I was worried about somenhow corrupting my "original"
database by cloning, but I suppose a way of being sure that I don't
damage the original would be to create a second ase.

Reply With Quote
  #4  
Old   
Mark A. Parsons
 
Posts: n/a

Default Re: Cloning db by copying devices - 07-14-2004 , 12:11 PM



Marek Grabiec wrote:
Quote:
Thanks for the info, I've done a couple of tests and it seems to be
working fine. I was worried about somenhow corrupting my "original"
database by cloning, but I suppose a way of being sure that I don't
damage the original would be to create a second ase.
Nah, you won't affect the original.

--
Mark A. Parsons

Iron Horse, Inc.
iron_horse (AT) NOSPAM (DOT) compuserve.com


Reply With Quote
  #5  
Old   
Chandan
 
Posts: n/a

Default Re: Cloning db by copying devices - 07-14-2004 , 01:20 PM



This should not be a problem I did this when I move on of my beigest
database (600GB) and ASE server from one disk array to another array.
I use UNIX 'dd' command to copy the raw device, just make sure all
devices are identical.

I guess this the only rapid way to move database.


Chandan


marekgrabiec (AT) hotmail (DOT) com (Marek Grabiec) wrote in message news:<4603b4e.0407130009.4fa57cb1 (AT) posting (DOT) google.com>...
Quote:
I need to know if there are likely to be any problems with the
following approach to cloning a database. I have 2 databases, db1 and
db2,
they have been created so that they do not share any devices. The
placement of each database on their respective devices is identical.
1. I have shutdown the ase
2. Then at the operating system level I copied the physical datafiles
belonging to the devices of db1 over db2.
3. When the ase was restarted it looks like the process has worked,
ie. db2 now contains all the same objects as db1.
My question is are there any potential problems with using this
process ? Thanks

Reply With Quote
  #6  
Old   
Marek Grabiec
 
Posts: n/a

Default Re: Cloning db by copying devices - 07-15-2004 , 03:11 AM



Thanks for your responses, I feel a lot better about using this
procedure now. I logged a call with sybase a few weeks ago and they
told me that this why of cloning was not supported, but that does not
mean it does not work !

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.