Database migration

Hi,

Had a quick question I have a webrt system running 3.0.9 with mysql, I
have a dev box running webrt 3.0.10 with oracle 9i. I have the mysql
dumped , just need a nice way of importing the data, I was wondering if
anyone out there has a way or maybe can share some information.

Thanks,

David

David Cecchino wrote:

Hi,

Had a quick question I have a webrt system running 3.0.9 with mysql, I
have a dev box running webrt 3.0.10 with oracle 9i. I have the mysql
dumped , just need a nice way of importing the data, I was wondering if
anyone out there has a way or maybe can share some information.

Thanks,

David
Hm, I don’t know Oracle syntax, but I think you could use
mysqldump output as script. You have to use Oracle RT scheme to init DB
and then use dumped script(only with data, not with create table
queries) to create data. I think it can help you out, at least you can
try it since RT/Oracle machine in dev state.

		Best regards. Ruslan.

Had a quick question I have a webrt system running 3.0.9 with mysql, I
have a dev box running webrt 3.0.10 with oracle 9i. I have the mysql
dumped , just need a nice way of importing the data, I was wondering if
anyone out there has a way or maybe can share some information.

“man mysqldump” for details. It suggests:

mysqldump --opt database | mysql --host=remote-host -C database
as one way to move a database - or redirect to a file on the
dump and from the file on the restore.

Les Mikesell
les@futuresource.com

thats just for mysql to mysql, i need mysql → oracle , thanks for the
reply.

daveOn Tue, 20 Apr 2004, Les Mikesell wrote:

On Tue, 2004-04-20 at 09:08, David Cecchino wrote:

Had a quick question I have a webrt system running 3.0.9 with mysql, I
have a dev box running webrt 3.0.10 with oracle 9i. I have the mysql
dumped , just need a nice way of importing the data, I was wondering if
anyone out there has a way or maybe can share some information.

“man mysqldump” for details. It suggests:

mysqldump --opt database | mysql --host=remote-host -C database
as one way to move a database - or redirect to a file on the
dump and from the file on the restore.


Les Mikesell
les@futuresource.com

Hi David,

I have spoken to two of our Oracle DBA’s this morning and they tell me
that Oracle can handle Mysqldump files perfectly well.

To prove a point, they used my backup dump files to create an Oracle
instance on our dev server.

So long as the sql you output is valid, “Oracle doesn’t care”. They said
try sql plus or sequencer.

Rik

Message: 2
Date: Tue, 20 Apr 2004 16:27:07 -0400 (EDT)
From: David Cecchino cecchind@qwestip.net
Subject: Re: [rt-users] database migration
To: Les Mikesell les@futuresource.com
Cc: rt-users@lists.bestpractical.com
Message-ID: Pine.GSO.4.58L0.0404201626500.7620@qmail
Content-Type: TEXT/PLAIN; charset=US-ASCII

thats just for mysql to mysql, i need mysql → oracle , thanks for the
reply.

dave

Had a quick question I have a webrt system running 3.0.9 with mysql, I
have a dev box running webrt 3.0.10 with oracle 9i. I have the mysql
dumped , just need a nice way of importing the data, I was wondering if
anyone out there has a way or maybe can share some information.

“man mysqldump” for details. It suggests:

mysqldump --opt database | mysql --host=remote-host -C database
as one way to move a database - or redirect to a file on the
dump and from the file on the restore.


Les Mikesell
les@futuresource.com

Rick Ellis Richard.Ellis@Sun.COM

Rick Does that also work for mysql version 4 , or are you running 3x
version?

-daveOn Wed, 21 Apr 2004, Rick Ellis wrote:

Hi David,

I have spoken to two of our Oracle DBA’s this morning and they tell me
that Oracle can handle Mysqldump files perfectly well.

To prove a point, they used my backup dump files to create an Oracle
instance on our dev server.

So long as the sql you output is valid, “Oracle doesn’t care”. They said
try sql plus or sequencer.

Rik

Message: 2
Date: Tue, 20 Apr 2004 16:27:07 -0400 (EDT)
From: David Cecchino cecchind@qwestip.net
Subject: Re: [rt-users] database migration
To: Les Mikesell les@futuresource.com
Cc: rt-users@lists.bestpractical.com
Message-ID: Pine.GSO.4.58L0.0404201626500.7620@qmail
Content-Type: TEXT/PLAIN; charset=US-ASCII

thats just for mysql to mysql, i need mysql → oracle , thanks for the
reply.

dave

On Tue, 20 Apr 2004, Les Mikesell wrote:

On Tue, 2004-04-20 at 09:08, David Cecchino wrote:

Had a quick question I have a webrt system running 3.0.9 with mysql, I
have a dev box running webrt 3.0.10 with oracle 9i. I have the mysql
dumped , just need a nice way of importing the data, I was wondering if
anyone out there has a way or maybe can share some information.

“man mysqldump” for details. It suggests:

mysqldump --opt database | mysql --host=remote-host -C database
as one way to move a database - or redirect to a file on the
dump and from the file on the restore.


Les Mikesell
les@futuresource.com


Rick Ellis Richard.Ellis@Sun.COM


The rt-users Archives

RT Developer and Administrator training is coming to LA, DC and Frankfurt this spring and summer.
http://bestpractical.com/services/training.html

Sign up early, as class space is limited.

David,

That is MySQl 4.0.18-max, but it shouldn’t matter. Both produce valid
sql in the dump file.

RikOn Wed, 2004-04-21 at 12:44, David Cecchino wrote:

Rick Does that also work for mysql version 4 , or are you running 3x
version?

-dave

On Wed, 21 Apr 2004, Rick Ellis wrote:

Hi David,

I have spoken to two of our Oracle DBA’s this morning and they tell me
that Oracle can handle Mysqldump files perfectly well.

To prove a point, they used my backup dump files to create an Oracle
instance on our dev server.

So long as the sql you output is valid, “Oracle doesn’t care”. They said
try sql plus or sequencer.

Rik

Message: 2
Date: Tue, 20 Apr 2004 16:27:07 -0400 (EDT)
From: David Cecchino cecchind@qwestip.net
Subject: Re: [rt-users] database migration
To: Les Mikesell les@futuresource.com
Cc: rt-users@lists.bestpractical.com
Message-ID: Pine.GSO.4.58L0.0404201626500.7620@qmail
Content-Type: TEXT/PLAIN; charset=US-ASCII

thats just for mysql to mysql, i need mysql → oracle , thanks for the
reply.

dave

On Tue, 20 Apr 2004, Les Mikesell wrote:

On Tue, 2004-04-20 at 09:08, David Cecchino wrote:

Had a quick question I have a webrt system running 3.0.9 with mysql, I
have a dev box running webrt 3.0.10 with oracle 9i. I have the mysql
dumped , just need a nice way of importing the data, I was wondering if
anyone out there has a way or maybe can share some information.

“man mysqldump” for details. It suggests:

mysqldump --opt database | mysql --host=remote-host -C database
as one way to move a database - or redirect to a file on the
dump and from the file on the restore.


Les Mikesell
les@futuresource.com


Rick Ellis Richard.Ellis@Sun.COM


The rt-users Archives

RT Developer and Administrator training is coming to LA, DC and Frankfurt this spring and summer.
http://bestpractical.com/services/training.html

Sign up early, as class space is limited.

Rick Ellis Richard.Ellis@Sun.COM

Thanks!
I will give it a shot, pretty big db.On Wed, 21 Apr 2004, Rick Ellis wrote:

David,

That is MySQl 4.0.18-max, but it shouldn’t matter. Both produce valid
sql in the dump file.

Rik

On Wed, 2004-04-21 at 12:44, David Cecchino wrote:

Rick Does that also work for mysql version 4 , or are you running 3x
version?

-dave

On Wed, 21 Apr 2004, Rick Ellis wrote:

Hi David,

I have spoken to two of our Oracle DBA’s this morning and they tell me
that Oracle can handle Mysqldump files perfectly well.

To prove a point, they used my backup dump files to create an Oracle
instance on our dev server.

So long as the sql you output is valid, “Oracle doesn’t care”. They said
try sql plus or sequencer.

Rik

Message: 2
Date: Tue, 20 Apr 2004 16:27:07 -0400 (EDT)
From: David Cecchino cecchind@qwestip.net
Subject: Re: [rt-users] database migration
To: Les Mikesell les@futuresource.com
Cc: rt-users@lists.bestpractical.com
Message-ID: Pine.GSO.4.58L0.0404201626500.7620@qmail
Content-Type: TEXT/PLAIN; charset=US-ASCII

thats just for mysql to mysql, i need mysql → oracle , thanks for the
reply.

dave

On Tue, 20 Apr 2004, Les Mikesell wrote:

On Tue, 2004-04-20 at 09:08, David Cecchino wrote:

Had a quick question I have a webrt system running 3.0.9 with mysql, I
have a dev box running webrt 3.0.10 with oracle 9i. I have the mysql
dumped , just need a nice way of importing the data, I was wondering if
anyone out there has a way or maybe can share some information.

“man mysqldump” for details. It suggests:

mysqldump --opt database | mysql --host=remote-host -C database
as one way to move a database - or redirect to a file on the
dump and from the file on the restore.


Les Mikesell
les@futuresource.com


Rick Ellis Richard.Ellis@Sun.COM


The rt-users Archives

RT Developer and Administrator training is coming to LA, DC and Frankfurt this spring and summer.
http://bestpractical.com/services/training.html

Sign up early, as class space is limited.


Rick Ellis Richard.Ellis@Sun.COM

Real quick question, which mysqldump flags were your giving to dump your
database , and then import to oracle sql?

it seems to be having some problems on attachmentswhere is missing
commas.

daveOn Wed, 21 Apr 2004, Rick Ellis wrote:

David,

That is MySQl 4.0.18-max, but it shouldn’t matter. Both produce valid
sql in the dump file.

Rik

On Wed, 2004-04-21 at 12:44, David Cecchino wrote:

Rick Does that also work for mysql version 4 , or are you running 3x
version?

-dave

On Wed, 21 Apr 2004, Rick Ellis wrote:

Hi David,

I have spoken to two of our Oracle DBA’s this morning and they tell me
that Oracle can handle Mysqldump files perfectly well.

To prove a point, they used my backup dump files to create an Oracle
instance on our dev server.

So long as the sql you output is valid, “Oracle doesn’t care”. They said
try sql plus or sequencer.

Rik

Message: 2
Date: Tue, 20 Apr 2004 16:27:07 -0400 (EDT)
From: David Cecchino cecchind@qwestip.net
Subject: Re: [rt-users] database migration
To: Les Mikesell les@futuresource.com
Cc: rt-users@lists.bestpractical.com
Message-ID: Pine.GSO.4.58L0.0404201626500.7620@qmail
Content-Type: TEXT/PLAIN; charset=US-ASCII

thats just for mysql to mysql, i need mysql → oracle , thanks for the
reply.

dave

On Tue, 20 Apr 2004, Les Mikesell wrote:

On Tue, 2004-04-20 at 09:08, David Cecchino wrote:

Had a quick question I have a webrt system running 3.0.9 with mysql, I
have a dev box running webrt 3.0.10 with oracle 9i. I have the mysql
dumped , just need a nice way of importing the data, I was wondering if
anyone out there has a way or maybe can share some information.

“man mysqldump” for details. It suggests:

mysqldump --opt database | mysql --host=remote-host -C database
as one way to move a database - or redirect to a file on the
dump and from the file on the restore.


Les Mikesell
les@futuresource.com


Rick Ellis Richard.Ellis@Sun.COM


The rt-users Archives

RT Developer and Administrator training is coming to LA, DC and Frankfurt this spring and summer.
http://bestpractical.com/services/training.html

Sign up early, as class space is limited.


Rick Ellis Richard.Ellis@Sun.COM

Hi David,

Our guys used SQL plus to do the import. They didn’t seem to do anything
significant to alter the data prior to import, so I don’t know if that
is significant or not as I’m no expert on Oracle. You might also want to
look at Oracle Migration Workbench (OMWB) which is supposed to do fancy
things with MySQL. I can ask them next time I’m in their Office.

My dump statement is run from a batch file and is:

/usr/local/mysql/bin/mysqldump --complete-insert --add-drop-table rt3 >
./dump/rt3dumpdate '+%y%m%d%H%M'.sql;

Missing commas sounds like the sql isn’t properly formed.

RikOn Wed, 2004-04-21 at 19:04, David Cecchino wrote:

Real quick question, which mysqldump flags were your giving to dump your
database , and then import to oracle sql?

it seems to be having some problems on attachmentswhere is missing
commas.

dave

On Wed, 21 Apr 2004, Rick Ellis wrote:

David,

That is MySQl 4.0.18-max, but it shouldn’t matter. Both produce valid
sql in the dump file.

Rik

On Wed, 2004-04-21 at 12:44, David Cecchino wrote:

Rick Does that also work for mysql version 4 , or are you running 3x
version?

-dave

On Wed, 21 Apr 2004, Rick Ellis wrote:

Hi David,

I have spoken to two of our Oracle DBA’s this morning and they tell me
that Oracle can handle Mysqldump files perfectly well.

To prove a point, they used my backup dump files to create an Oracle
instance on our dev server.

So long as the sql you output is valid, “Oracle doesn’t care”. They said
try sql plus or sequencer.

Rik

Message: 2
Date: Tue, 20 Apr 2004 16:27:07 -0400 (EDT)
From: David Cecchino cecchind@qwestip.net
Subject: Re: [rt-users] database migration
To: Les Mikesell les@futuresource.com
Cc: rt-users@lists.bestpractical.com
Message-ID: Pine.GSO.4.58L0.0404201626500.7620@qmail
Content-Type: TEXT/PLAIN; charset=US-ASCII

thats just for mysql to mysql, i need mysql → oracle , thanks for the
reply.

dave

On Tue, 20 Apr 2004, Les Mikesell wrote:

On Tue, 2004-04-20 at 09:08, David Cecchino wrote:

Had a quick question I have a webrt system running 3.0.9 with mysql, I
have a dev box running webrt 3.0.10 with oracle 9i. I have the mysql
dumped , just need a nice way of importing the data, I was wondering if
anyone out there has a way or maybe can share some information.

“man mysqldump” for details. It suggests:

mysqldump --opt database | mysql --host=remote-host -C database
as one way to move a database - or redirect to a file on the
dump and from the file on the restore.


Les Mikesell
les@futuresource.com


Rick Ellis Richard.Ellis@Sun.COM


The rt-users Archives

RT Developer and Administrator training is coming to LA, DC and Frankfurt this spring and summer.
http://bestpractical.com/services/training.html

Sign up early, as class space is limited.


Rick Ellis Richard.Ellis@Sun.COM

Rick Ellis Richard.Ellis@Sun.COM

Hi.

I’m migrating from situation 1 to situation 2 as described below:

  1. -mysql 4.0.18, rt3.4.5, apache 1.3.27 all running on the one box, say
    ticket1.

  2. -mysql5.0.19 on a new box, say ticket2
    -rt3.4.5, apache 1.3.27 on ticket1

So, instead of using a database on the local box I’m telling RT to use a
remote host for its database.

What I’ll be doing is the following:
- bring down necessary stuff (apache, sendmail etc.) on ticket1

- change the config file (RT_SiteConfig.pm) on ticket1 to point to 

ticket2
- dump database on ticket1
- import database on ticket2

-start necessary services on ticket1 (apache, sendmail etc.)

I have done some testing from ticket1, which uses a mysql4 client, to
connect to mysql5 on ticket2.
So: ‘mysql -u -p -h ticket2 rt3’
In order to get that working I needed to:
-set all the passwords for users on ticket1 in the ‘mysql’ database
on ticket2 with the ‘old_password’ function. This is because encryption
has changed between versions.
‘update mysql.user set password = old_password() where User =
’’ and Host = ‘’;’
-set the rt_user and rt_pass in RT_SiteConfig.pm on ticket2 to be
the same as those on ticket1 and make sure they work when connecting
using mysql4 client from ticket1:
ticket1:‘mysql -u <rt_user> -p<rt_pass> -h ticket2 rt3’

I believe this is all I need to do when cutting over.
The only way to set database and host on ticket1 is in the
RT_SiteConfig.pm file.
The underlying libraries of RT (including DBIx::SearchBuilder) use the
parameters from that file.
As far as I know there are no other places where I need to tell RT which
host to use as its database, correct?

I haven’t been able to actually test this cutover given that it’s a
production machine.
If anyone has any suggestions on what to look out for when doing this,
I’d appreciate the input.

Thanks.
Kind regards.

Luke

Luke