1

When I work with Oracle databases, I often "need" to run a command similar to this before I can begin querying tables in the sysadm schema:

ALTER SESSION SET CURRENT_SCHEMA = sysadm;

I can do that in Oracle SQL Developer or SQL Plus easily, but I don't know how to do it in an SQR Program:
https://docs.oracle.com/cd/E80738_01/pt854pbh2/eng/pt/tsql/index.html

When I'm able to use SQR Express by Business Computer Solutions LLC, I can specify the default schema on the Database Table Definition Interface tab of the SQR Configuration Properties Menu Item:
Database Table Definition Interface Tab of SQR Express

Then, SQR Express will automatically set the schema for me when I run an SQR through it. Interestingly, however, it looks like SQR Express is basically a fancy wrapper around Oracle's SQRW program that is bundled with PeopleTools: https://docs.oracle.com/cd/E41633_01/pt853pbh1/eng/pt/tsql/concept_SQRCommandLine-c07b1d.html

This implies to me that SQR Express is simply passing the value of the Database Table Owner field from above picture straight on to SQRW.

Does anyone know what command line parameter I need to pass to SQRW to get it to set the current_schema to sysadm like SQR Express does?

Shawn Eary
  • 684
  • 2
  • 7
  • 21
  • 1
    I don't know of a command line, but once you get into the sqr program, you typically are in the same session with all the database calls you make. So, you can just use a BEGIN-SQL block to run your alter session command at the start of your program. – Bob Dec 08 '18 at 16:53
  • @Bob - Your workaround helped me a lot when I put what you said in the setup section of my SQR. Even though I'm still hoping to eventually learn how to set the current_schema without editing the SQR, I can at least do what you suggested in the meantime. – Shawn Eary Dec 18 '18 at 03:58

0 Answers0