Dump and reload databases! My first time

tjsingh

Member
Hi

Im going to be dumping and reloading databases this weekend. Dreading it a bit as it will be my first time. We have a script in place which has been written by the previous programmer. I have posted this script below does this look correct?

I have a few questions:

1. how do you rename databases? is it the proutil utility?
2. we basically need to copy the database to the live environment once re-indexed do i use the procopy command? whats the syntax for this?

  • Ensure the backup worked.
  • Stop all the services using rslmenu and start PECAS in single user mode (edpecas – this is the editor in single user-mode)
  • Dump all data definitions and sequences. Dumping of both is important!

Dump DF (df file)

    • Go into Lseditor and go to data dictionary
    • In there go into Admin à Dump Data Defintions.
Dump Sequences (fd file)
    • Once completed then do sequences Admin à Create Bulk Loader Description File

  • Delete the test database’s to create enough working room.
    • This is done in Shell mode.
    • Rm –I test* (this deletes test database)

  • Create a new database in the test area. (Data dictionary à Database à Create.. à Empty à call the database Pecas)
  • Load the data without any data integrity (-i)
    (proutil /test/data/live-data/pecas –C BULKLOAD pecas.fd –i –T /test/data).
7. Build the indexes
proutil /test/data/live-data/pecas –C idxbuild all –T /test/data –TB 5

  • Rename the old database in the live environment using Proutil
  • Copy the database to the live environment. Use Procopy (check backup script which uses procopy)
  • Start Pecas in single user mode and run compall.p (this compiles all the code EXCEPT code in special/ls/ USE EDPECAS)
  • Use the application compiler to compile all programs in pecas/special/ls/ (application compiler is in Tools à App Compile selector à then enter/select special/ls)
  • Use PC to compile all the programs on the edi machine, packing machine, superman, FirstB2B software only compiles under V8 for some reason. Map network drive to compile on other machines)
Exit Pecas and use “rslmenu” to restart the services

cheers
 

Casper

ProgressTalk.com Moderator
Staff member
Question 1:
  1. Make sure you have the right st file (prostrct list /path/to.database/databasename)
  2. edit the st file so it reflects the new database name.
  3. prostrct repair /path/to.database/databasename
Question2:
procopy sourcedatabase targetdatabase
Look in the database administration guide how procopy handles st files.


It seems you are on V9, is this correct?
What is your OS?
Why are you doing a reload?
Why do you need to recompile?
How big is the database? (any reason why you are not using binary dump in multi user mode?).
Somehow I fail to notice that you load the df file back in the new database. You must load the df before you can use the bulkloader.

If this is your first time why not do this in a test envrionment first. Then it is more easy to get familiar with the procedure.

If you have time then maybe it is good to consider the other questions I asked too...

Good luck,

Casper.
 

tjsingh

Member
Hi

It seems you are on V9, is this correct?
We are on running progress v8 on unix.

What is your OS?
UNIX

Why are you doing a reload?
We are just re-indexing the database. The system is very old and the person previous to me done this on a yearly basis.

Why do you need to recompile?

Once the database has been re-indexed then dont the program files need to be recompiled in unix
 

TomBascom

Curmudgeon
Hi

It seems you are on V9, is this correct?
We are on running progress v8 on unix.

v8 is 10 years old and has been unsupported most of that time... You really ought to upgrade.

What is your OS?
UNIX

That's one bit of good news. Which UNIX?

Why are you doing a reload?
We are just re-indexing the database. The system is very old and the person previous to me done this on a yearly basis.

To reindex you only need to run an index rebuild. It's probably a waste of time (I rarely see any improvement as a result of reindexing) but you can do it easily enough.

Dump & load might be useful helpful with v8 if your data is becoming fragmented or scattered. It's also the only way to get from 1k db blocks to 8k blocks which usually has a significant performance benefit for v8 systems.

Why do you need to recompile?

Once the database has been re-indexed then dont the program files need to be recompiled in unix

No. Not from a re-index. You might need to after a dump & load, particularly with v8, because the schema may be loaded in a different sequence than the r-code expects. But even that is just a maybe. On the other hand it should be fairly painless to re-compile.

Using the bulk loader is almost the slowest possible way to do this. If you've got all the time in the world then that's fine but if you're trying to keep downtime to a minimum you might want to consider other options such as Highly Parallel Dump & Load
 

tjsingh

Member
cheers

Just wondering can some give me the safest way to rename the live databases? don't want to use mv command in unix.

what is the proutil command?

in regards to bulkload i looked at spreadsheet but dont have enough time to implement any code. but it will be considered for next time.

but hopefull we will be moving away from this system very soon. Want to get back to openedge
 

TomBascom

Curmudgeon
Renaming a db is often done with "prostrct repair". The process is to use OS commands to put everything where you want it, then create a .st file that reflects the new paths and names and use "prostrct" repair.

You could also use procopy or probkup & prorest.

It depends on what you are renaming and why.

I have no idea what spreadsheet you are referring to or why you are mentioning it. It sounds like a completely different question. It's helpful to create a new post in the proper forum and to use a descriptive subject for each discrete question that you might have. It is very confusing to have multiple questions in a single thread. If you've got a new question please start a new thread.
 
Top