To upgrade from Ingres 6.4 using the unload/reload procedure, follow this process.
Note: In this procedure, the notation [Each DB] means: "For each database, not including the iidbdb, become the DBA for that database, cd to the unload directory for the database created in Step 1, and perform this step." If using Ingres Star, include the coordinator database in the list of databases. Steps that apply to a particular upgrade type only (that is, in-place upgrade or clean install upgrade) are marked accordingly.
The sections that follow provide details on steps that differ from those described previously in this guide.
Old databases may have objects created by users who no longer exist. Check for obsolete users for each database.
To check for obsolete users:
Each script contains one line for each user who owns a database object.
To record database privileges
sql iidbdb
\script dbaccess.out
select dbname, usrname
from iidbaccess
order by dbname, usrname
\go
\script
\script dbprivs.out
select *
from iidbprivileges
where database_name <> ''
order by database_name,grantee_name
\go
\script
\quit
This procedure creates two files, dbaccess.out and dbprivs.out.
Note: This step is required only for a clean-install upgrade.
To save users, groups,and roles
sql iidbdb
create table unload_tmp as
select name,status,default_group
from iiuser
where name not in ('ingres','$ingres','root')
\go
copy unload_tmp (
name=c0comma,status=c0comma,default_group=c0nl
) into 'users.out'
\go
drop unload_tmp;commit
\go
copy iiusergroup (
groupid=c0comma,groupmem=c0nl
) into 'groups.out'
\go
copy iirole(
roleid=c0nl
) into 'roles.out'
\go
\quit
Note: This step is required only for an in-place upgrade.
To clean the iidbdb database, become the installation owner and run the following steps against the master database iidbdb.
Note: It is assumed that there are no objects created by users in the iidbdb.
statdump '-u$ingres' -zdl iidbdb
sysmod -s iidbdb
verifydb -mrun -sdbname iidbdb -opurge
verifydb -mrun -sdbname iidbdb -odbms
ckpdb -s -j iidbdb
The verifydb command may issue the following messages, which you can ignore:
S_DU1611_NO_PROTECTS iirelation indicates that there are protections for table (owner), but none are defined.
S_DU0305_CLEAR_PRTUPS Recommended action is to clear protection information from iirelation, and S_DU1619_NO_VIEW iirelation indicates that there is a view defined for table (owner), but none exists.
S_DU030C_CLEAR_VBASE Recommended action is to clear view base specification from iirelation.
You can also ignore the "patch warning" message that warns of the loss of user tables in "runinteractive" mode. This mode will not be used.
To record Ingres configuration:
You will use this information later as a guide for configuring Ingres. The Ingres installation procedure does not preserve the Version 6.4 parameter settings. During installation, the ingres/files directory is deleted, so save the information.
Shut down Ingres with the iishutdown command.
To fix logins:
Note: This step is required only for an in-place upgrade.
The upgrade runs more smoothly if the Ingres 6.4 executables, control files, and environment variables are deleted. However, you do not want to lose your installation ID and default locations. These are kept in a file named symbol.tbl.
Copy $II_SYSTEM/ingres/files/symbol.tbl to a safe area not in the Ingres directory tree.
Note: This step is required only for an in-place upgrade.
To guarantee a clean environment for Ingres:
cd $II_SYSTEM/ingres
rm -rf bin files lib utility dbtmplt version.rel admin
mkdir files
Note: This step is required only for an in-place upgrade.
The Ingres installation procedure asks for a location for temporary files and sorting, and creates the directories if they do not exist. However, you should create this location manually because some versions of the installation procedure may not properly set the protections for the directories, which can cause upgradedb to fail when upgrading the iidbdb database.
For information on placement of your default work location, see the Database Administrator Guide.
As the installation owner, assume a work location called /mywork:
UNIX:
/mywork:
mkdir /mywork/ingres
mkdir /mywork/ingres/work
mkdir /mywork/ingres/work/default
mkdir /mywork/ingres/work/default/iidbdb
chmod 755 /mywork/ingres
chmod 700 /mywork/ingres/work
chmod 777 /mywork/ingres/work/default
chmod 777 /mywork/ingres/work/default/iidbdb ![]()
Windows:
md \mywork\ingres
md \mywork\ingres\work
md \mywork\ingres\work\default
md \mywork\ingres\work\default\iidbdb ![]()
Restore any site-specific files that you copied in the step Preserve Site Modifications.
If the checkpoint template file cktmpl.def has been modified, the modifications may need to be carried forward into Ingres. The cktmpl.def from Ingres 6.4 cannot be used with Ingres, as the file format has changed. This means that you must recreate the changes using the Ingres 6.4 cktmpl.def as a guide. See the Ingres 6.4 Database Administrator's Guide.
If the archiver exit script acpexit was changed in Ingres 6.4, you must make the changes to the Ingres template (acpexit.def), and then move that file to $II_SYSTEM/ingres/files/acpexit.
Run Configuration-By-Forms (CBF) and initially configure the Ingres installation. Use the rundbms.opt and showrcp information from Ingres 6.4 as a guideline. For information about CBF and the various tuning parameters, see the System Administrator Guide.
Information on the correlation between 6.4 and Ingres parameter names, is described in Corresponding Parameter Names.
Derived parameters are recalculated when values they depend on are changed. If derived parameters are set, they can be "protected" against change.
Ingres versions from 2.0 through 2.6 may calculate very large default lock and resource limits parameters. Check the lock_limit and resource_limit settings, and consider reducing these limits to the Ingres 6.4 settings.
On OS-thread platforms, do not turn on async_io; and do not declare the II_NUM_SLAVES Ingres variable.
Ingres supports larger qef_sort_mem values than Ingres 6.4. Ingres may not need as much qsf_memory as did Ingres 6.4. OS-thread platforms should not reduce quantum_size, as it does not improve performance on those platforms.
Note: This step is required only for a clean-installation upgrade.
If your 6.4 installation has only a few Ingres users defined, you should use the accessdb utility or the CREATE USER SQL statement to recreate those users in the Ingres installation. As a guide, use the file users.out or refer to the 6.4 installation.
If you have many users, the following procedure recreates them in mass.
As the installation owner, change directory to your iidbdb unloaddb directory where you stored the files from the step Save Users, Groups, and Roles.
Run this SQL:
sql '-u$ingres' iidbdb
copy iiuser(name=c0comma,status=c0comma,default_group=c0nl)
from 'users.out'
\go
update iiuser
set default_priv = status, user_priv = status,
flags_mask = case when default_group <> ' ' then 28 else 24 end
where user_priv = 0 and flags_mask = 0;
\go
copy iiusergroup(groupid=c0comma,groupmem=c0nl)
from 'groups.out'
\go
commit
\go
\quit
Windows: Omit the quotes from the sql command line. ![]()
Ingres has new user privileges that do not exist in 6.4. If you recreate users using the above bulk load procedure, you should review the added users with accessdb to make sure that all user privileges are set the way you want them. In particular, review the definitions for any 6.4 "superusers."
Ingres handles the "update system catalog" privilege differently than did 6.4. You must explicitly grant this privilege to the Ingres user after you recreate it, with a grant statement, as follows:
grant update_syscat on current installation to user-name
If your 6.4 installation had roles defined, recreate them with the ADD ROLE SQL statement. Use the file roles.out as a guide. Roles cannot be reliably bulk-loaded from the 6.4 installation, so you must recreate them by hand. After you recreate each role, issue the following SQL statement:
grant rolename to public; commit
This allows the role to be used in the same manner as in 6.4.
To recreate database privileges:
sql iidbdb
grant access on database database-name to username; commit
Each row describes one or more database privileges given to the user grantee-name. A Y or N in a privilege column indicates the specific privilege. (A U in a column means Unchanged.)
grant privilege on database database-name to grantee-name;commit
If the privilege column is N, grant noprivilege instead of privilege.
If you have defined many privileges, or recreated many users, groups, or roles, you should run sysmod on the iidbdb, which will accelerate query processing. Issue the sysmod command, as follows:
sysmod iidbdb
Because the new database was not created with front-end catalogs, it is not necessary to drop them.
To fix the front-end reload script, for each database:
\include/ing64/ingres/files/iiud.scr
\include/ing64/ingres/files/iiud64.scr
Note: The directory path may differ.