[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
[sqr-users] RE: Help Needed - SQR - Switch database inside SQR -Any Comments will be greatly appreciated
- Subject: [sqr-users] RE: Help Needed - SQR - Switch database inside SQR -Any Comments will be greatly appreciated
- From: "Alexander, Steven" <Steven.Alexander@sanjoseca.gov>
- Date: Fri, 18 Aug 2006 09:26:33 -0700
- Delivery-date: Fri, 18 Aug 2006 12:29:15 -0400
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
Ravishankar, please don't send e-mail to me directly. I prefer that you
join the SQR users group list and send your questions there. I'll see them
there and try to help, and you'll have hundreds of other programmers who
could also help you.
As for your question - unless you have the ODBC version of SQR, there is no
way for a single SQR program to switch from one database instance to another
or from one database server to another.
I've faced the same task as you have and I've found only two solutions:
1. Write a program to read the first database and write it to a disk
file. Write another program to read the disk file and compare it to the
second database.
2. Have the Database Administrator (DBA) create a link within the
databases so that you can log into the first database and have access to the
tables in the second database. Ask the DBA to show you the way to refer to
tables in the second database. Some DBAs won't want to do this - and there
are often good reasons not to. If so, you're stuck with option 1.
_____
From: B, Ravishankar (Cognizant) [mailto:Ravishankar.B@cognizant.com]
Sent: Friday, August 18, 2006 9:15 AM
To: sqr-users@sqrug.org; jiju vengal; Steven.Alexander@sanjoseca.gov;
DWhite@drc.com; rayo@ontko.com
Subject: Help Needed - SQR - Switch database inside SQR - Any Comments will
be greatly appreciated
Hi all,
I've been stuck up with an issue for the last 2-3 days. Any comments on how
to proceed will be greatly appreciated.
The issue is:
I need to switch database server inside the SQR report.
This is the version info of SQR we using:
SQR/8.3.1/IBM RS6000/AIX 5.1/Sybase SDK 12.0/Jan 27 2005
Functionality:
My goal is to fetch data from a table inside one server (dev1), compare it
with another table which resides in another server (dev2) and list those
matching data in the report. Both servers are SYBASE. We run our SQR report
in UNIX environment.
I ran the report from one server (dev1) and pulled data into an array. Now I
want to switch the server to dev2 and compare the data inside the array.
Here only, I got stuck up. I've tried the following stuffs to come out of
the situation:
1) used -DB keyword with begin-select to switch the db.
It returned error message "Bad param found on 'BEGIN-SELECT' line; ..."
2) used Connect command like: Connect 'usrid/passwd@dev2'
It also returned error message "CONNECT failed. Perhaps username/password
incorrect."
3) changed environment variables in UNIX from SQR to switch the server:
Call system using 'export Server=dev2' #statuscode
Call system using 'export Server=user' #statuscode
Call system using 'export Server=pwd' #statuscode
It returned no error. But, the variables are not changing as specified. It
still holds its old value while echoing the value after export.
4) called a shellscript from SQR for exporting the values.
It changed the values to dev2 while echoed from the shell script. But, when
coming back to SQR and echo, still holds the old value.
5) still to try the db link:
CREATE PUBLIC DATABASE LINK MY_LINK
CONNECT TO userid IDENTIFIED BY passwd
USING 'T: dev1:rptenv01'
I think this code need to be run from Sybase - is it? Will it need to be
performed by DBA?
Anyway, I don't know whether this will work or not?
Can anybody suggest any method for implementing the functionality?
Can somebody help me to get out of this hell?
Any comments on the same will do a world of good.
Thanks in advance,
Regards,
Ravishankar B
* Landline: (91)(44) 42284499
* Extn: 4499 * VNET: 444620
This e-mail and any files transmitted with it are for the sole use of the
intended recipient(s) and may contain confidential and privileged
information.
If you are not the intended recipient, please contact the sender by reply
e-mail and destroy all copies of the original message.
Any unauthorized review, use, disclosure, dissemination, forwarding,
printing or copying of this email or any action taken in reliance on this
e-mail is strictly
prohibited and may be unlawful.
Visit us at http://www.cognizant.com
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users