Wednesday, April 30, 2008

FREQUENTLY ASKED QUESTIONS AND ANSWERS FOR SRW
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1. What do I need to do to upgrade reports from SRW 1.0 to 1.1?

User must export all the 1.0 SRW tables and import them into database
with SRW 1.1. Then he should use 'moverep' to move all the data in
these 1.0 tables to 1.1 tables. 1.0 tables prefixed 'FR_' while
1.1 tables prefixed 'SRW_'.

2. Can I use 'dumprep' to dump my 1.0 reports and load them into 1.1 SRW
by using 'loadrep'?

Even though SRW provides utilities called 'dumprep' dumping reports
from database into .rex files and 'loadrep' to load these ascii .rex
on other hosts and operating systems, user should not use them to
upgrade their SRW from 1.0 to 1.1, due to different table structures
and definitions between these 2 versions.

3. When installing SRW, it asks if I want to install one central set of
tables or each user has its own set of tables, which one should
I choose? Why?

All the report data and format info are stored in tables.
These so called 'SRW_' tables may be created under the 'system' account
such that they may be shared by all SRW users, or these tables may be
created under individual accounts - each user has his own set of
tables.
In order to use one set of central tables, the user must have TPO
installed. Having one set of central tables makes managing SRW easier
and causes all the reports be shared by all users.

4. Why do I get message 'Unable to access the SQL*ReportWriter V1.1 tables.'
when logging in SRW, even though the user is a valid database account?

If SRW is installed with one set of central tables, then all SRW users
except 'system' need to be added by running a script called 'srw.admin'
under ?/sqlreport/admin.
If SRW is installed with local tables for each user, then the 'SRW_'
tables must be created under the user account. The script needs to be run
is called 'srw_iloc.sql' under ?/sqlreport/admin or the 'srw.admin' and
choose the right option.

5. What is srw.admin? How should I make use of it?

Srw.admin is a script for SRW administrative uses. It adds, drops a user,
relinks user exit into the executables, etc.
One should go to ?/sqlreport/admin directory, set enviornment variable
by 'setenv LOG test' for error logs when running the script. Then type
'srw.admin' and choose the appropriate actions.
'srw.admin' runs other sql script within the same directory, such as
srw_icen.sql, srw_grnt.sql, etc.

6. How do I relink user exits into SRW executables?

In the IUG there is a section regarding creating user exits, but not very
clear. The steps for creating forms user exits in the IUG will be also
helpful.
After the iapxtb.o is created, one should use the 'srw.admin' script
and choose the 'Relink the executables with user exits'. Remember to
set the 'LOG' enviornment variable for error checking and move your
own copy of iapxtb.o to the directory you desire.

7. Why do I get 'ORA-2112 pcc: select...into returns too many rows' when
running SRW?

It is likely that user has duplicate rows in the system.product_profile
table. The reason may due to duplicate import or install of SRW system
tables.
The way to deal with the problem is to remove all the duplicate rows
in this table.

8. What is the product_profile table for?

The product_profile table gives DBA control of application usage and
resouce limit, such as restricting the page limit for SRW users, or
removing the host command from normal SQL*Plus users.
Currently only SRW and SQL*Plus make use of this table.
Refer 'SQL*Plus User's Guide and Reference 3.0' Appendix E and sql
script 'pupbld.sql' under ?/sqlplus/admin for more info.

9. When looking at the system SRW table, I find 'SRW_SUMMARY' and
'SRW__SUMMARY', what is the difference?

The difference is that 'SRW_SUMMARY' is a view of 'SRW__SUMMARY'.
Overall, 'SRW_' are views with slight modification of the original
tables 'SRW__'.

10. Why do I get 'Out of space on device' when I try to print out a
report on printer?

The 'Out of space' message usually comes from /tmp being full.
The reason is that SRW first generates a temporary file in the
/tmp directory, then spool it out through 'spoolcmd' under
?/sqlreport/admin/printer.
The workaround to this problem is to set enviornment variable
SRW_TMP to directory with more disk space.

11. Why does SRW generate a temporary file in /tmp?

SRW uses a two-pass scheme for generating report. For example, in order
to print out '1 of 10 pages' at the top of each page, the first pass
gives the total number of pages, while the second pass fill in the
number '1' at the appropriate page.
The temporary file generated in /tmp with file name such as 'SRW06536001'
makes the second pass possible.

12. What is the difference between spoollp.sh, spoolpr.sh and spoolcmd?

'Spoolcmd' is usually linked with either spoollp.sh or spoolpr.sh,
depending on the version of unix system (att or bsd). 'spoollp.sh'
uses 'lp' to spool reports, while 'spoollpr.sh' uses 'lpr'.

13. I tried to print out reports on a DEC printer and have specified
the printer definition as 'decland' for landscape mode. However,
the report still came out in protrait mode. What did I do wrong?

User who wants to print out landscape report should first find
the escape sequence which will change the printer from protrait
mode to landscape mode. Then he should modify the ':is=' cause
within the 'printdef.dat' file under ?/sqlreport/admin/printer
by adding the escape sequence.
Generate a new 'decland' printer definition file using SRW
utility 'printdef' (refer SRW User's Guide for the usage).

14. Is it possible to mail a report to an Oracle*Mail user within SRW?

'Mail' is one of the options for 'DESTYPE' parameter. User should
also specify the 'DESNAME' as Oracl*Mail userid whom the report is
supposed to be sent.

No comments: