database copy
Posted in 2017
Topics: Platform-Specific Issues
Solaris 10 IDS 11.50.FC5 I am looking for an easy way to make a copy of a database in the same instance, but with a different name. Any suggestions? Larry
Larry,If your database does not have external tables or user defined data
types or you don't care much about the original locations (dbspaces) of tables
and indexes, you may use "onunload/onload".Kern -- Let's go GreenThis email
contains 100% recycled electrons.
From: LARRY SORENSEN <LSORENSEN25@msn.com>
To: ids@iiug.org
Sent: Thursday, February 2, 2017 2:36 PM
Subject: database copy [38585]
Solaris 10
IDS 11.50.FC5
I am looking for an easy way to make a copy of a database in the same
instance, but with a different name. Any suggestions?
Larry
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
1. dbexport then dbimport to a different database name
2. dbschema -ss or myschema to get a schema and use that to create the
new database, then use my dbscript utility to create a data copy script for
all tables. Here's an example using my dbmove utility to do the actual
copy, but you could replace that with call to a shell script that opens
dbaccess and just does "insert into target:<table> select * from
source:<table>;" taking hte table name on the command line:
dbscript -d sourcedb -c 'dbmove -d sourcedb -D targetdb -t %s\\
'
>copy_script.sh
Art
Art S. Kagel, President and Principal Consultant
ASK Database Management
www.askdbmgt.com
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on the IIUG, nor any other organization with which I am
associated either explicitly, implicitly, or by inference. Neither do
those opinions reflect those of other individuals affiliated with any
entity with which I am affiliated nor those of the entities themselves.
On Thu, Feb 2, 2017 at 2:36 PM, LARRY SORENSEN <LSORENSEN25@msn.com> wrote:
> Solaris 10
>
> IDS 11.50.FC5
>
> I am looking for an easy way to make a copy of a database in the same
> instance, but with a different name. Any suggestions?
>
> Larry
>
>
> ************************************************************
> *******************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001a114b327acea8220547919bd4
Also can't use onunload/onload if you have blobs.
DG