[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
[sqr-users] CURSOR error message when running SQR on Unix with readonly user
- Subject: [sqr-users] CURSOR error message when running SQR on Unix with readonly user
- From: mc_integra8 <mc_integra8@yahoo.ca>
- Date: Fri, 30 Jan 2004 19:02:05 -0500 (EST)
- List-id: This list is for discussion about the SQR database reporting language from Hyperion. <sqr-users.sqrug.org>
I am hoping someone can help me with this. Here is all the version info:
SQR: SQR/3.0.12.3/Sun/Solaris 2.4/Sybase 4.9.2/Mar 19 1996
Unix: Solaris OS V2.8,
database: Sybase V11.9.2.
For the last couple of years, I have a SQR program executing with no problems.
Due to security issues with the sybase user (local) that executes this program
(it has dbo access to the database db_local), I was asked to change the sybase
user to a different user that has less privileges. I had a new sybase user
setup (report) that has read, execute, update privileges to a database called
db_local). I am now running into an error, this is the error:
(SQR 5528) Sybase DBSQLEXEC error in cursor 2:
(10331) CREATE PROCEDURE permission denied, database concorde, owner dbo
SQL: create procedure SQR_19849_1075416278;1 @__p1 varchar(12) as select
cpty_margin_ai from db_local..reporac where trade_id = @__p1
Error on line 154:
(SQR 3722) Couldn't set up cursor.
SQR: Program Aborting.
Please note that the new user, report & local both have readonly to the
database concorde.
This error also occurs on NT, here is the version info:
SQR/4.0.2/PC/WINDOWS NT 4.0/Sybase CT-LIB 10.0.3/MAY02 1997
I have attached my SQR program
Thanks in advance,
Martha
---------------------------------
Post your free ad now! Yahoo! Canada Personals
BEGIN-REPORT
do main
END-REPORT
BEGIN-SETUP
declare Printer
Type=HPLaserJet
orientation=Landscape
Font=45
Top-Margin=0.5
Left-Margin=0.0
!Lines-Inch=10
Lines-Inch=9
Chars-Inch=16.6
Point-size=7
Symbol-Set=8U
Font-Style=Fixed
Page-size 65 230
printer-init <27>&l3A
END-SETUP
BEGIN-HEADING 6
print '' (1,1)
print 'OUTSTANDING REPOS/REVERSES LENDS/BORROWS' (1) center bold
do print_as_of_date
print '<----- Before Margin Requirements ----->' (+3,138) bold
print '<------ Including Margin Requirements ----->' (,183) bold
print 'Customer' (+1,1) bold
print 'Cusip' (,12) bold
print 'Maturity' (,23) bold
print 'Repo' (,36) bold
print 'Trade' (,43) bold
print 'On Date' (,51) bold
print 'Off Date' (,63) bold
print 'Trade' (,75) bold
print 'Type' (,84) bold
print 'Depo' (,89) bold
print 'Nominal' (,99) bold
print 'Instrument' (,107) bold
print 'Price' (,127) bold
print 'Bonds' (,145) bold
print 'Cash/Collatl' (,154) bold
print 'Net Diff' (,169) bold
print 'Bonds' (,189) bold
print 'Cash/Collatl' (,202) bold
print 'Net Diff' (,217) bold
print '(in mm)' (+1,99) bold
print 'Date' (,25) bold
print 'Rate' (,36) bold
print 'Price' (,43) bold
graphic (+1,1,230) horz-line
print ' ' (+1)
END-HEADING
BEGIN-FOOTING 2
print 'Printed: ' (2,1,0) bold
date-time (2,11,0)
page-number (2,220) 'Page '
END-FOOTING
BEGIN-PROCEDURE main
move 0 to #bond_before_tot
move 0 to #grand_bond_before_tot
move 0 to #net_before_tot
move 0 to #grand_net_before_tot
move 0 to #net_diff_before_tot
move 0 to #grand_net_diff_before_tot
move 0 to #bond_after_tot
move 0 to #grand_bond_after_tot
move 0 to #net_after_tot
move 0 to #grand_net_after_tot
move 0 to #net_diff_after_tot
move 0 to #grand_net_diff_after_tot
do get_data
do grand_print_totals
END-PROCEDURE main
BEGIN-PROCEDURE get_data
BEGIN-SELECT
nm_cpty_name (+1,1)
ON-BREAK LEVEL = 1 SKIPLINES = 2
sort_type (,11) ON-BREAK LEVEL
= 2 AFTER=print_totals SKIPLINES = 2 PRINT=NEVER
cusip (+1,12)
sec_mat_date (,23) edit DD/Mon/YYYY
repo_rate (,36) edit 99.99
trade_price (,42) edit 999.99
on_date (,51) edit DD/Mon/YYYY
off_date (,63) edit DD/Mon/YYYY
trade_id (,75)
trade_type (,84)
depository (,89)
nominal (,96) edit 9,999.999
sec_name (,107)
market_price (,127) edit 999.999
bonds_amt &bonds_before_amt
(,137) edit b9,999,999,999
net_amt + interest_amt &net_before_amt
(,152) edit b9,999,999,999
bonds_amt + net_amt + interest_amt &net_before_diff
(,166) edit b9,999,999,999
bonds_after_margin_amt &bonds_after_amt
(,182) edit b9,999,999,999
cash_after_margin_amt + int_after_margin_amt &net_after_amt
(,197) edit b9,999,999,999
bonds_after_margin_amt + cash_after_margin_amt + int_after_margin_amt
&net_after_diff (,212) edit b9,999,999,999
add &bonds_before_amt to #bond_before_tot
add &net_before_amt to #net_before_tot
add &net_before_diff to #net_diff_before_tot
add &bonds_after_amt to #bond_after_tot
add &net_after_amt to #net_after_tot
add &net_after_diff to #net_diff_after_tot
from db_local..reporac
order by nm_cpty_name, sort_type, trade_type, sec_mat_date, cusip
END-SELECT
END-PROCEDURE get_data
BEGIN-PROCEDURE get_date
BEGIN-SELECT
dt_current &dt_current
from concorde..concorde
END-SELECT
do date
END-PROCEDURE get_date
BEGIN-PROCEDURE date
let $date = &dt_current
END-PROCEDURE date
BEGIN-PROCEDURE print_as_of_date
do get_date
print 'As of date: ' (,202) bold
print $date (,216) edit
DD-Mon-YYYY
END-PROCEDURE print_as_of_date
BEGIN-PROCEDURE print_totals
print '------------' (+1,139)
print '------------' (,154)
print '-----------' (,169)
print '------------' (,184)
print '------------' (,199)
print '-----------' (,215)
print #bond_before_tot (+2,137) edit
99,999,999,999
print #net_before_tot (,152) edit
99,999,999,999
print #net_diff_before_tot (,167) edit
9,999,999,999
print #bond_after_tot (,182) edit
99,999,999,999
print #net_after_tot (,197) edit
99,999,999,999
print #net_diff_after_tot (,213) edit
9,999,999,999
add #bond_before_tot to #grand_bond_before_tot
add #net_before_tot to #grand_net_before_tot
add #net_diff_before_tot to #grand_net_diff_before_tot
add #bond_after_tot to #grand_bond_after_tot
add #net_after_tot to #grand_net_after_tot
add #net_diff_after_tot to #grand_net_diff_after_tot
move 0 to #bond_before_tot
move 0 to #net_before_tot
move 0 to #net_diff_before_tot
move 0 to #bond_after_tot
move 0 to #net_after_tot
move 0 to #net_diff_after_tot
END-PROCEDURE print_totals
BEGIN-PROCEDURE grand_print_totals
print '============' (+3,139)
print '============' (,154)
print '============' (,168)
print '============' (,184)
print '============' (,199)
print '============' (,214)
print #grand_bond_before_tot
(+2,137) edit 99,999,999,999
print #grand_net_before_tot (,152)
edit 99,999,999,999
print #grand_net_diff_before_tot (,167)
edit 9,999,999,999
print #grand_bond_after_tot (,182)
edit 99,999,999,999
print #grand_net_after_tot (,197)
edit 99,999,999,999
print #grand_net_diff_after_tot (,213)
edit 9,999,999,999
END-PROCEDURE grand_print_totals