password for APEX_PUBLIC_USER - Oracle Database 11g Express Edition Beta(Archived)

Hi,
I installed Oracle 11g Express und Apex. Now I read that the password for the APEX_PUBLIC_USER expires after 180 days. Where can I change this parameter? Thanks a lot. 

Hi,
you could either change the database's default profile to have unlimited password lifetime (which is, of course, not recommended) or create a separate profile for technical users and assign it to APEX_PUBLIC_USER.
The first solution would work as follows:
ALTER PROFILE DEFAULT LIMIT
  FAILED_LOGIN_ATTEMPTS UNLIMITED
  PASSWORD_LIFE_TIME UNLIMITED;There is a helpful [url http://oracleinsights.blogspot.com/2011/03/apexpublicuser-password-expires-on-11g.html]blog post by Marc Lancaster for the second approach.
-Udo 

What web gateway are you using?
A default installation uses EPG, which means the ANONYMOUS user for database access (instead of APEX_PUBLIC_USER).
This also means that a default install has APEX_PUBLIC_USER account locked. To configure for mod_plsql with OHS infront, there are documented steps which includes password expiration config, in the Apex 4.0 [url http://download.oracle.com/docs/cd/E17556_01/doc/install.40/e15513/otn_install.htm#BHAHBIIJ]Installation guide, chapter 3. 

I unlocked the user and changed the password. In the document I read: .....the parameter PASSWORD_LIFE_TIME is set to 180. If you are using Oracle Database 11g with Oracle Application Express, this causes the password for APEX_PUBLIC_USER to expire in 180 days. ... To prevent this behavior, create another profile in which the PASSWORD_LIFE_TIME parameter is set to unlimited and alter the APEX_PUBLIC_USER account and assign it the new profile.
....
but how can I do this? 

First we need to know, are you working with the default XE install which uses EPG, or are you trying to add and reconfigure another web server such as OHS with mod_plsql? 

just the default with apex listener, no apache or so.... 

Just as documented in the blog post I referenced above. Perhaps it's easier if I quote directly.
First, connect to your database as sys and create the new profile with unlimited password_life_time as follows
CREATE PROFILE UNLIMITED_PASSWORD_LIFETIME LIMIT
  SESSIONS_PER_USER DEFAULT
  CPU_PER_SESSION DEFAULT
  CPU_PER_CALL DEFAULT
  CONNECT_TIME DEFAULT
  IDLE_TIME DEFAULT
  LOGICAL_READS_PER_SESSION DEFAULT
  LOGICAL_READS_PER_CALL DEFAULT
  COMPOSITE_LIMIT DEFAULT
  PRIVATE_SGA DEFAULT
  FAILED_LOGIN_ATTEMPTS DEFAULT
  PASSWORD_LIFE_TIME UNLIMITED    /** this sets unlimited lifetime */
  PASSWORD_REUSE_TIME DEFAULT
  PASSWORD_REUSE_MAX DEFAULT
  PASSWORD_LOCK_TIME DEFAULT
  PASSWORD_GRACE_TIME DEFAULT
  PASSWORD_VERIFY_FUNCTION DEFAULT;If you want, you could change any other parameter to differ from the default profile.
Next, assign this profile to the APEX_PUBLIC_USER and unlock if necessary
ALTER USER APEX_PUBLIC_USER
  PROFILE UNLIMITED_PASSWORD_LIFETIME
  ACCOUNT UNLOCK;... and you are done.
-Udo 

In that case APEX_PUBLIC_USER should remain locked, and you could forget about it.
However I suspect that there is a similar concern with ANONYMOUS user, which is the case in the default XE beta installation.
SQL> select username,account_status,profile from dba_users where username='ANONYMOUS';
USERNAME     ACCOUNT_STAT PROFILE
------------ ------------ ------------
ANONYMOUS    OPEN         DEFAULT
SQL> select resource_name,limit from dba_profiles
where profile=(select profile from dba_users where username='ANONYMOUS')
    and resource_type='PASSWORD';
RESOURCE_NAME                    LIMIT
-------------------------------- ----------------------
FAILED_LOGIN_ATTEMPTS            10
PASSWORD_LIFE_TIME               180
PASSWORD_REUSE_TIME              UNLIMITED
PASSWORD_REUSE_MAX               UNLIMITED
PASSWORD_VERIFY_FUNCTION         NULL
PASSWORD_LOCK_TIME               1
PASSWORD_GRACE_TIME              7This account also has the pw life set to 180. Either you manually change its password when the time comes, or create and assign a different profile. How to do this is described if you follow the link for Security guide in above doc (see Security Guide, ch 2). You could also look up the CREATE PROFILE statement in the SQL Reference.
Commands involved would look like create profile ... and alter user ...profile. You need to be connected as a db user with appropriate privileges. Give it a go and post back as needed.
Edited by: orafad on Apr 16, 2011 2:29 PM
Edit:
Adding example extract from database sessions, while 11.2 XE (apex) home pages are accessed:
USERNAME     MODULE                 ACTION                 SERVER    STATUS
------------ ---------------------- ---------------------- --------- --------
ANONYMOUS                           auth user              NONE      INACTIVE
ANONYMOUS    APEX:APPLICATION 4950  branching              NONE      INACTIVE
ANONYMOUS                                                  NONE      INACTIVE
ANONYMOUS                                                  SHARED    ACTIVE
ANONYMOUS    APEX:APPLICATION 4950  validations            SHARED    ACTIVE
ANONYMOUS                                                  NONE      INACTIVEEdited by: orafad on Apr 16, 2011 3:14 PM 

orafad wrote:
In that case APEX_PUBLIC_USER should remain locked, and you could forget about it.Hmmm, that really depends on the web server used to serve APEX. If the APEX Listener is used, as "user7590294" posted, the default configuration would use APEX_PUBLIC_USER and hence, that user needs to be unlocked while ANONYMOUS can be locked. Probably this is a misunderstanding that there is a difference between the default installation of XE, which uses EPG, and the APEX Listener, which is a separate component.
Summary:
If it's the default installation, the profile is needed for ANONYMOUS (unlocked) and APEX_PUBLIC_USER (locked), if APEX Listener is used, it ANONYMOUS won't be used and should stay locked, while APEX_PUBLIC_USER should get a profile with unlimited password_life_time and has to be unlocked.
-Udo 

Thanks a lot ..... it'done :-) 

Great to hear that. Have fun using APEX with the new XE beta. And keep your installation steps in mind for the final release. ;)
-Udo 

Udo wrote:
Hmmm, that really depends on the web server used to serve APEX. Yes, and as I clearly have stated earlier in this thread.
Summary:
If it's the default installation, the profile is needed for ANONYMOUS (unlocked)As op indicated the default installation, I tried to leave additional options out (since there is already enough confusion with different "listeners", to involve a third gateway option, per 3.3 in the install doc).

Related

Getting ORA-06508 in APEX Listener Configuration

Hi,
I'm trying to configure the Apex Listener. After entering all required fields and clicking on "Apply" I'm getting the error messages listed below. This happens when trying both Basic and TNS Connection types.
ORA-06508: PL/SQL: could not find program unit being called
Unable to run page sentry in application 4500.
Thanks in advance for your help.
Edited by: user3654649 on Jun 14, 2011 11:32 AM
Edited by: user3654649 on Jun 14, 2011 11:33 AM 
Hi,
it seems the APEX Listener can connect to your database, so the error must be somewhere in your APEX configuration.
Could you please provide some additional information on your setup, e.g.
- Which database user did you configure your APEX Listener to use? Usually you would choose APEX_PUBLIC_USER.
- Which database version are you using?
- Which APEX version does your database have?
- Did you use some other web server before using APEX Listener? (Embedded PL/SQL Gateway or Oracle HTTP Server)
-Udo 
Hi,
Thanks for your answer.
The database user that I'm truing to configure the listener to use is APEX_PUBLIC_USER. the database version is 10.2.0.4. The APEX version is 4.0.2.00.07 and for this database I did not use Embedded PL/SQL Gateway or Oracle HTTP Server.
thanks. 
So, everything up to now seems to be correct. Now, second line questions:
- Did you encounter any problem in your APEX installation?
- Could you check if there is any invalid object in your APEX schema? (run apexvalidate.sql from your APEX installation package connected to that instance as sys)
- Which JEE container do you use?
- Did you deploy the images for APEX yet? And did you deploy it to the context you've configured as images prefix during your APEX installation?
-Udo 
I did not encounter errors in the APEX installation. I don't have any invalid objects in apex_040000 or flows_files schemas (I did select * from dba_objects where owner='APEX_040000' and status='INVALID').
I ran the apexvalidate.sql procedure and now when doing "select * from dba_registry;" I see APEX status as INVALID - however there are no invalid objects in apex_040000 or flows_files schemas.
When doing the installation I followed the Application Express installation guide Release 4 - specifically "Scenario 1: Downloading from OTN and Configuring the Oracle Application Express
Listener" and I ran the installation script as "#apexins APEXTBS APEXTBS TEMP /i/"
The images directory is under apex (apex/images) while apex is the root directory of the installation.
Is there anything that I should have done differently with the /i/ ? Should it be the physical location for the images (something like /oradata/apex/images) ? Another thing - I just noticed that APEX_040000 and FLOWS_FILES are both locked - can this have to do anything with the error I'm getting ?
Waht does it mean "configured as images prefix " ? Is there anything that should be done that is not listed in the installation guide ? Regarding the "JEE container " I don't know.
thanks. 
One more thing - When doing the configuration it prompts me to enter the images directory and to this I reply with the exact physical location.
Enter the path to the directory containing the APEX static resources
Example: /Users/myuser/apex/images
or press Enter to skip:
thanks. 
Hello Sue,
I ran the apexvalidate.sql procedure and now when doing "select * from dba_registry;" I see APEX status as INVALID - however there are no invalid objects in apex_040000 or flows_files schemas.I'm sorry, I forgot to mention that you have to add some parameters to the apexvalidate-Call. In the APEX 4.0.x-case, this would be
#apexvalidate.sql x x APEX_040000I guess this will either bring up errors or put the APEX entry in the dba_registry back to VALID.
In addition to checking for invalid objects and trying to recompile/... them in case there are hits, the validation routine also checks if all vital objects are really there. I'd expect some error should have been raised if you didn't call the procedure as noted above.
I ran the installation script as "#apexins APEXTBS APEXTBS TEMP /i/"That's correct. Are the tablespace APEXTBS and TEMP present and below their size limit?
Is there anything that I should have done differently with the /i/ ?No, that's the default value and fits perfectly in most cases.
Another thing - I just noticed that APEX_040000 and FLOWS_FILES are both locked - can this have to do anything with the error I'm getting ?No, that's the way it should be. These two schemas should never be active database users. When using APEX Listener, you use APEX_PUBLIC_USER to connect to the database.
Waht does it mean "configured as images prefix " ?+/i/+ is the images prefix in your case. As I see in your following post, you are running APEX Listener in standalone mode, so you don't have to care - it has unchangeable contexts +/apex/+ and +/i/+ which fits to your APEX installation.
To explain my question:
You can deploy the APEX Listener to a "full blown" application server (which I referred to as JEE-Container) instead of running in standalone mode.
In that case you have to provide a context containing your images that fits to that prefix.
- When doing the configuration it prompts me to enter the images directory and to this I reply with the exact physical location.That's where the context +/i/+ is mapped to in standalone mode. Everything's correct here as well.
So, after all, everything looks great. If there really hasn't been any error during the installation and the validation routine doesn't throw any error as well, I'd try a clean uninstall (drop FLOWS_FILES, APEX_040000 and APEX_PUBLIC_USER) and rerun the installation routine.
If that doesn't help, could you try to enable the EPG once just to check the APEX installation itself is fine? I really doubt this error is really related to the APEX Listener at the moment...
-Udo 
Hi Udo,
Thanks for your reply.
Running apexvalidate.sql with the suggested parameters did not produce any errors.
SYS#cwsrvsit> #apexvalidate.sql x x APEX_040000
Procedure created.
No errors.
SYS#cwsrvsit> SYS#cwsrvsit> SYS#cwsrvsit>
However the status is still invalid :
SYS#cwsrvsit> select comp_id,comp_name,status from dba_registry where comp_id='APEX';
COMP_ID COMP_NAME STATUS
------------------------------ ----------------------------------- ----------
APEX Oracle Application Express INVALID
Should I try a new installation ? Is it possible that something in the Java insrtallation is wrong ?
thanks again,
Sue 
Hi Sue,
I'm sorry, I just didn't have my APEX troubleshooting notes at hand when posting the previous comments. Now I found them I see I missed some other steps to restart the validation, but I tested the following to work on my testing environment:
set define '^'
set concat on
set concat .
set verify off
#apexvalidate x x APEX_040000
exec validate_apex;Result:
SQL> exec validate_apex
...Database user "SYS", database schema "APEX_040000", user# "46" 23:39:36
...Compiled 0 out of 2721 objects considered, 0 failed compilation 23:39:36
...234 packages
...227 package bodies
...426 tables
...12 functions
...19 procedures
...3 sequences
...439 triggers
...1177 indexes
...176 views
...0 libraries
...4 types
...0 type bodies
...0 operators
...0 index types
...Begin key object existence check 23:39:36
...Completed key object existence check 23:39:36
...Setting DBMS Registry 23:39:36
...Setting DBMS Registry Complete 23:39:36
...Exiting validate 23:39:36
PL/SQL procedure successfully completed.At the end of that block you see that the dbms_registry is set according to the result. So if your query
select comp_id,comp_name,status from dba_registry where comp_id='APEX';still returns "INVALID", I'd recommend to redo the installation.
Is it possible that something in the Java insrtallation is wrong ?I don't think so, as your APEX Listener is able to connect to the database, but the database is not able to produce the APEX workspace login page.
Sorry once more for not providing the correct troubleshooting script at once.
-Udo 
Hi Udo,
Thanks for your reply - it was very helpful. I dropped the AOPEX environment and did a reinstall - now I'm able to do the listener configuration without issues. My next question is - is there a way to do it in the background ? When doing it as "java [options] -jar apex.war" it depends on my session being connected. If I'm doing a CTRL+C the listener goes down. Is there a way to do the configuration in the background and keep it up and running ?
thanks again,
Sue 
Hi Sue,
When doing it as "java [options] -jar apex.war" it depends on my session being connected. If I'm doing a CTRL+C the listener goes down. Is there a way to do the configuration in the background and keep it up and running ?That's actually two different problems of the APEX Listener in standalone mode: One concerning the configuration to be persistent and one to let the APEX Listener run in background.
You can solve both problems by using a "full blown" application server to deploy the APEX Listener. But you can also do this in standalone mode.
Lets start with easier one - the configuration:
The APEX Listener stores its configuration in the "apex.home". By default, this is located in your TEMP-directory. So, depending on your environment, it might be gone after you logged out. You can configure the "apex.home" as a startup parameter and let it point to some directory that is persistent. You could just configure your APEX Listener once, shut it down, and copy the apex-directory to that directory and you'll never have to configure it again.
java -Dapex.home=<Path_to_your_non-temporary_directory> -jar apex.warThe second one might be a little more difficult, depending on your operating system.
If you use a Windows system, you'll find a solution description in the following message: {message:id=9606494}
On Linux systems, a simple solution might be to use a "screen" session. That doesn't really start the APEX Listener as system service, but lives as long as the screen session lives in the background and you can easily do this with a less privleged user. For a neat solution that even start/stop cleanly with your OS, I need to know which one you run your APEX Listener.
-Udo 
Hi Udo,
Thank you very much for your help - it worked.
After doing :
java -Dapex.home=/orabackup_iris2/export/apex_listener/home -jar apex.war and answereing all the prompts,
I did CTRL+C to stop the listener and then I copied the content (cp -R) of /orabackup_iris2/export/apex_listener/home to /orabackup_iris2/export/apex_listener
and the I ran :
nohup java -Dapex.port=8080 -Dapex.home=/orabackup_iris2/export/apex_listener -Dapex.images=/orabackup_iris2/export/apex/images -jar /orabackup_iris2/export/apex_listener/apex.war &
If you can please go over the steps above and see if it makes sense - I hope it's not just pure luck...
thanks again,
Sue 
Hi Sue,
it's not just luck, it definetly works that way.
Just some final remarks:
- There's no need to change/copy the contents from +/orabackup_iris2/export/apex_listener/home+ to +/orabackup_iris2/export/apex_listener+ in your case, as the first directory doesn't seem to be a temporary one.
- I'd recommend to put the java-call including parameters into a shell script and call that instead.
- nohup works fine for on-demand background processes. As you probably know it's not providing a "system service"-like functionality.
- nohup creates a default file for console output of the job it started. I'd recommend to redirect it to a named file and append all output.
So, your final setup would look as follows
start_apex_listener.sh
#!/bin/sh
java -Dapex.port=8080 -Dapex.home=/orabackup_iris2/export/apex_listener -Dapex.images=/orabackup_iris2/export/apex/images -jar /orabackup_iris2/export/apex_listener/apex.warnohup call
nohup /orabackup_iris2/export/apex_listener/start_apex_listener.sh >> /orabackup_iris2/export/apex_listener/apex_listener.log 2>&1 &If your question is answered, please mark this thread and any helpful or correct answer post accordingly.
-Udo 
Udo,
Thank you very much for all your help - my question is definiteley answer
All the best,
Sue
Edited by: Sue on Jun 19, 2011 6:25 AM 
Hi Sue,
I'm glad I could help you.
If you don't mind, you can mark "helpful" and "correct" answers in this thread. Especially in longer threads, this makes it easier for other people to find relevant posts.
Thanks,
Udo

Installing ORDS : Using different user than Sys

Is it possible to install by specifying a different user than the default SYS ?This is for version 18.2 , 11g, XE.I am struggling to figure out to force the install to use a different use who has sysdba.
Hi, yes it is possible only if the User has all the SYSDBA admin Rights. Are you sure the user you are using is SYSDBA. SYSDBA is ROLES - they are not users, not schemas. The SYSDBA role is like "root" on unix or "Administrator" on Windows. It sees all, can do all. Internally, if you connect as sysdba, your schema name will appear to be SYS. As per Burleson consulting blog display users with sysdba hereThe v$pwfile_users view contains a list of all users who have been granted the SYSDBA or SYSOPER privilege.SQL> desc v$pwfile_users;  Name Null?  Type ----------------------------------------- -------- ---------------------------- USERNAME    VARCHAR2(30) SYSDBA      VARCHAR2(5) SYSOPER     VARCHAR2(5) SYSASM      VARCHAR2(5)  SQL> SQL> select * from v$pwfile_users;  USERNAME                       SYSDB SYSOP SYSAS ------------------------------ ----- ----- ----- SYS                            TRUE TRUE FALSE TOM                            TRUE FALSE FALSEIn 11g there is a new column in v$pwfile_users for the SYSASM privilege:SYS AS SYSDBA # orcl11 SQL> select * from v$pwfile_users;  USERNAME SYSDB SYSOP SYSAS ------------------------------ ----- ----- ----- SYS TRUE TRUE FALSEregards,Franck
It's hardcoded to require SYS
Yes, I am using a user with Sysdba. Sys was not allowing remote login and I was setting up ORDS on a different machine. The setup was not allowing me to use a different user but defaulting to Sys. The setup was failing with insufficient privileges  error because Sys was not enabled for remote login. While reading the documentation, and other forum post, I believe you could specify / use a different user with SysDba role in other version, but as Jeff Mentioned below, its not possible. I ended up enabling remote login for sys and it worked. 
you must have sys as sysdba to install, upgrade etc ORDS  https://docs.oracle.com/database/ords-17/AELIG/installing-REST-data-services.htm#AELIG7181
Thank you all. The final resolution. You need Sys/sysdba to able to install. Any user with Sysdba role will not work. If you are connecting from remote machine, turn remote login on for sys/sysdba and go through the installation.
Hi Jeff,thatJeffSmith-Oracle wrote: It's hardcoded to require SYSI think earlier ORDS version(s) installation allowed a DB user with SYSDBA privileges (other than SYS), from which ORDS version is it made mandatory to use SYS AS SYSDBA?ORDS 18.2 Docs mention SYS AS SYSDBA: https://docs.oracle.com/en/database/oracle/oracle-rest-data-services/18.2/aelig/installing-REST-data-services.html#GUID-…  Regards,Kiran
Correct.
It's really strange solution. Really strange. So now having user with sysdba i can't install ords on one of the zouzanz machines in corporative network. Thank You, guys, developing ORDS.
enabling HTTPS for a database is a BIG DEAL - hence the decision to require SYS - the most restrictive account available - going forward

Oracle APEX Listener 1.1.1 Released

Oracle APEX Listener 1.1.1 is now available on OTN.
This release addresses the following issues:
- Fixed a problem with second and subsequent deployments of the Listener using the configuration of the first Listener deployment.
- Reduced the default value of apex.jdbc.MaxConnectionReuseCount from 50000 to 1000. This may address issues with the database temp segment being exhausted (Error ORA-01652).
- Fixed a problem with character encoding when consuming HTML forms submitted using the multipart/form-data content-type.
- Fixed a problem with an IllegalStateException being thrown when the path /apex (instead of /apex/) was accessed on the standalone Listener.
- Fixed a problem where stored procedures defined by the database user which the listener connects as, could not be invoked without prefixing with the schema name.
- Fixed a problem with some JDBC settings in apex-config.xml not actually being used to configure the connection pool.
- Fixed flexible parameter support to handle POSTs without requiring a query string to be present in the submitted URI
Edited by: Colm Divilly on Apr 18, 2011 9:51 AM
Edited by: Colm Divilly on Apr 20, 2011 10:17 AM 
Thanks for the release Colm,
Great to see issues raised here being actively worked on. 
Hello Colm,
at first, I have to join mwrf: It's great to see that APEX Listener is being updated more frequently these days and that topics discussed here make it to the release plan.
I have two issues that are still not fixed in this release:
- Reduced the default value of apex.jdbc.MaxConnectionReuseCount from 50000 to 1000. This may address issues with the database temp segment being exhausted (Error ORA-01652).This is not true for the standalone startup of the apex.war. At least, the console output still states 50000 and as the parameter is not configurable via listenerAdmin, I have to believe in that output.
The second issue concerns the handling of the apex.properties file: The value for apex.images stored there is never overwritten and only effective on the first start.
Reproduction:
First start of the APEX Listener using java -Dapex.images=/home/tomcat/apache-tomcat/webapps/ROOT/i -Dapex.port=8888 -jar apex.war=> adminlistener etc. have to be configured, stored value is apex.images=/home/tomcat/apache-tomcat/webapps/ROOT/i (corresponding timestamp)
=> effective images-directory is +/home/tomcat/apache-tomcat/webapps/ROOT/i+
Second start using java -Dapex.images=/home/tomcat/apache-tomcat/webapps -Dapex.port=8888 -jar apex.war=> stored value is still apex.images=/home/tomcat/apache-tomcat/webapps/ROOT/i (timestamp also unchanged)
=> effective images-directory is +/home/tomcat/apache-tomcat/webapps/ROOT/i+
Third start using java -Dapex.images=/home/tomcat/apache-tomcat/webapps -Dapex.port=8888 -Dapex.erase=true -jar apex.war=> adminlistener etc. have to be configured, stored value is still apex.images=/home/tomcat/apache-tomcat/webapps/ROOT/i (timestamp updated, i.e. correct)
=> effective images-directory is +/home/tomcat/apache-tomcat/webapps/ROOT/i+
Reproduced on Windows XP and Ubuntu.
-Udo
P.S.: If I delete the directory /tmp/apex manually, the file is recreated correctly.
Edited by: Udo on 22.04.2011 23:25
P.P.S.: Checked apex.jdbc.MaxConnectionReuseCount for "regular" deployment: The apex-config.xml created actually still contains the value 50000. (Fresh Appserver installation, first-ever apex.war deployment there).
BTW: There is a version of apex-config.xml with Kris' local config in the download package and an archive called apex_listener.1.1.1.104.21.22.zip which both don't seem to belong into a regular release package.
Edited by: Udo on 23.04.2011 00:05 
I just reproduced a third issue reported by Jeffrey Harris in thread {thread:id=2209368}:
It seems not possible to change the cache.dir used by the APEX Listener.
I tried to change it in both web.xml and apex-config.xml without any success - the caches bdb directory is always created next to the apex-config.xml.
As I tested on that issue I wondered why the same key is configured in both web.xml and apex-config.xml anyway. I suggest there should be only one location, which (if set) should be the apex-config.xml or some place in java.io.tmpdir as (documented) default value.
Please let me know if I'm doing something wrong and changing the cache dir actually works different from what I'm thinking.
Thanks,
Udo 
Just to put the good with the bad:
I've tested flexible parameter passing, and it works great now, thanks! I have a non-Apex, Web PL/SQL application, that includes hand written procedures with the web toolkit, PL/SQL Server Pages, and Web PL/SQL generated from Oracle Designer, and it works beautifully for the first time under Apex Listener. Before this latest update, there were a few things that didn't work.
Only strange thing: The main menu for the system is of course set up as the default page for this deployment. I have to set it up as schemaname.procedurename or I get a not found error, even though there is a public synonym, procedurename. Once the menu runs, other procedures run fine without using a schemaname as a prefix. 
The schemaname.procedurename problem is noted as having been fixed in 1.1.1 as per the release notes,
Are you sure it's not working? I haven't tested myself yet.
Edited by: mwrf on Apr 26, 2011 5:40 AM 
Thanks for the feedback folks, will look into the issues listed above
- Colm 
The bdb folder is used to store the Resource Templates data, it has nothing to do with the cache 
Oops - my bad. I'm pointed at the development database, and it turns out that there WASN'T a public synonym for the menu procedure on that database. (I just checked - there IS one in production - I don't know how these got out of sync.)
Once I added the synonym, and once I stopped and re-started the listener - it all worked. Hooray!
Since this particular application has always relied on Basic Database Authentication in mod_plsql, I wouldn't be able to use Apex Listener in production without changing the authentication methodology. But I have other applications that either have public access, no authentication, or have their own internal authentication scheme for which Apex Listener is now an option. 
Of course! That's my fault. I started testing with the config file location, which was reported not to be handled properly, and used a new (default) config file for these tests. That newly created config file didn't have caching configured despite the path, so it is correct that nothing happens, because there is nothing to be cached. I don't know why I didn't check that again before posting. Probably because I let myself take the (wrong) path to be the one by ignoring the obvious difference.
Sorry for the false report.
Still I'm wondering why the cache.dir is configurable in both apex-config.xml and web.xml. Possibly I missed a point there as well...
-Udo

Database connection - couldn't change

Hi all,
This is my first day in APEX.
I have the oracle apex listerner installed. First time while bringing the listerner up, instead of apex_public_user I gave a different DB user name. Now I want to change it, but it is not allowing me. The fields are non edittable. I used http://localhost:8080/apex/listenerAdmin URL.
Also when I go to http://localhost:8080/apex and use internal as workspace, ADMIN as the user and enter the password and finally if I click the login button then nothing happens. It niether throws any error nor it navigates to the next screen. Not sure it is due to the first issue mentioned above. Kindly help me to fix this.
Thanks in advance,
Jaggyam 
Hi Jaggyam,
This is my first day in APEX.Welcome!
First time while bringing the listerner up, instead of apex_public_user I gave a different DB user name. Now I want to change it, but it is not allowing me. The fields are non edittable. I used http://localhost:8080/apex/listenerAdmin URL.That's correct. You can't change the database parameters while the APEX Listener is running after you've configured the APEX Listener for the first time. However you have two options to change them anyway:
1. edit the configuration file (stop the listener, edit the apex-config.xml and restart the listener)
2. delete the configuration file and hence restart the configuration process
In either situation, you'll have to locate the apex-config.xml . If you use the APEX Listener in standalone mode (i.e., you start the apex.war with java directly), it will be in your ${java.io.tmpdir}, which usually is your users temp (e.g. /tmp on Unix or %TMP%/apex (user profile, local settings, temp) on windows).
Also when I go to http://localhost:8080/apex and use internal as workspace, ADMIN as the user and enter the password and finally if I click the login button then nothing happens. It niether throws any error nor it navigates to the next screen. Not sure it is due to the first issue mentioned above. Kindly help me to fix this.Well, this error might disappear when you use the appropriate database user. Another reason for the white screen could be the fact that you didn't provide the correct directory for the static contents for APEX ("images"). A third cause could be a port conflict if you run the APEX Listener on the same host as your database using the default port, as this default port (TCP 8080) is the same one the HTTP server integrated in the database (XDB HTTP Server) uses as default port.
-Udo 
Hi,
Thank You!
I tried deleting the apex-config.xml and restart the listerner. But it is still useing the same and not going to the reconfigure process. So I changed the username/password. Password was encrypted earlier (starting with #) so I replaced that string with actual value. No I could see the changes reflecting in listerner adminscreen. But still I could not login into APEX. Again no error messages and nothing. I am pasting some few lines related to the DB credentials. Kindly let me know your findings.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
-<properties> <comment> Updated: Mon Oct 31 17:55:11 AST 2011 Version: 1.1.3.243.11.40 </comment> <entry key="apex.db.username">apex_public_user</entry> <entry key="apex.db.password">apex_public_user</entry> <entry key="apex.db.connectionType">basic</entry> <entry key="apex.db.hostname">localhost</entry> <entry key="apex.db.port">1522</entry> <entry key="apex.db.sid">orcl</entry>*"Another reason for the white screen could be the fact that you didn't provide the correct directory for the static contents for APEX ("images")"*
I am not getting the white screen I could see the login screen with images. But upon clicking login, it stays in the same page without any error.
Oracle is running on 1522 port and apex is on 8080. So no port conflict here
Thank you,
Jaggyam 
Hi,
I tried deleting the apex-config.xml and restart the listerner. But it is still useing the same and not going to the reconfigure process.Hmm, you should at least be able to run http://localhost:8080/apex/listenerConfigure after you've stopped the APEX Listener, deleted the apex-config.xml and restarted the APEX Listener again. If it doesn't help, try to delete the whole apex-directory in your temp folder.
Password was encrypted earlier (starting with #) so I replaced that string with actual value.If you use the plain text password, you have to let it start with *!* , e.g.
<entry key="apex.db.password">!newpassword</entry> In that case, the APEX Listener will encrypt it upon the first start. Otherwhise, you'll just get an error on your console.
Again no error messages and nothing.You really should at least get an error on the console if anything went wrong.
I am pasting some few lines related to the DB credentials. Kindly let me know your findings.Are you sure your SID is actually orcl ? This is the default database instance name, but it is different in most cases. Make sure you use the right SID.
Oracle is running on 1522 port and apex is on 8080. So no port conflict hereWell, "Oracle" is everything your run. ;)
But you skipped a point I mentioned above: 1522 is the port your database listener uses for database connections. In addition to that, the database has it's own "internal" web server (the XDB HTTP Server). An that's the service that would use port 8080 per default.
You can check if that service is actually using that port by logging in to your database as sys / sysdba and run the following query:
select dbms_xdb.gethttpport from dual;If you find out it uses port 8080, and you actually don't need that service, you can disable it as follows
exec dbms_xdb.sethttpport(0);
commit;Otherwhise, you can either give it a different port than 8080 (using the same command with the target port instead of 0 as parameter) or change the port you use to run your APEX Listener.
-Udo

Oracle PDB Containers

Hi ,I am trying to understand about PDB Container.1. Installed Oracle 12c2. during installation created a PDBERP3, Connected to SQL as sys/Admin123 as sysdba - Connected successfully  4. Want to create a user as i use to create in Oracle 9i 5. System is not allowing so i created as     create user c##erp identified by erp ;     grant connect, resource to c##erp;     grant imp_full_database to c##erp;     grant exp_full_database to c##erp;If i want to create a user with ## , i am not understanding how to create . Can you please explain me for the next steps . Sandy 
SPathak wrote:
 
Hi ,
I am trying to understand about PDB Container.
1. Installed Oracle 12c
2. during installation created a PDBERP
3, Connected to SQL as sys/Admin123 as sysdba - Connected successfully
 
4. Want to create a user as i use to create in Oracle 9i
5. System is not allowing so i created as
     create user c##erp identified by erp ;
     grant connect, resource to c##erp;
     grant imp_full_database to c##erp;
     grant exp_full_database to c##erp;
If i want to create a user with ## , i am not understanding how to create . Can you please explain me for the next steps .
 
Sandy
what error do you get?
Hi Sorry , I want to create user without ## . it was my typing mistake.  for example likecreate user erp identified by erp ; sandy
SPathak wrote:
 
Hi
 
Sorry , I want to create user without ## . it was my typing mistake.  for example like
create user erp identified by erp ;
 
sandy
 when all else fails Read The Fine Manual http://docs.oracle.com/database/121/DBSEG/users.htm
In the future please post multitenant questions in the multitenant forum. Your question has alrleady been answered many times there.Multitenant
I am trying to understand about PDB Container.
1. Installed Oracle 12c
2. during installation created a PDBERP
3, Connected to SQL as sys/Admin123 as sysdba - Connected successfully
 
4. Want to create a user as i use to create in Oracle 9i
5. System is not allowing so i created as
     create user c##erp identified by erp ;
     grant connect, resource to c##erp;
     grant imp_full_database to c##erp;
     grant exp_full_database to c##erp;
If i want to create a user with ## , i am not understanding how to create . Can you please explain me for the next steps .
The BEST way to 'understand about PDB Container' is to read chapters 17 and 18 of the Concepts doc. They explain all about the new multitenant container architecture. The next thing to do is read my reply of Jul 3, 2013 12:15 PM in this thread from last year.https://community.oracle.com/message/11094131 My reply there explains the issue with local versus common users. You can NOT create a local user in the CDB which is why your step #5 failed.
Many things, even basic things like creating users, are done differently in 12c. In 12c there are common users and local users. You need to know and understand the difference. My 'guess' is that you are trying to create a user (e.g. SOMEUSER) and getting an exception because you are trying to create that user in the root CDB and you can ONLY create common users in the root. And SOMEUSER can not possibly be a common user because common users are defined differently.
To create a local user in a PDB you have to make the PDB the current container and then just create the user as you always did. Even an experienced DBA will NOT get very far if they do not RTFM first. They will experience the same problem you have.
alter session set "_ORACLE_SCRIPT"=true and try
user starts with c### is reserved for common user.So please do not create local user using c###Have a look athttp://docs.oracle.com/database/121/SQLRF/statements_8003.htmhttp://docs.oracle.com/database/121/DBSEG/users.htm
Thanks PavanYour script is working fine , I am able to create table without ## sandy
Pavan Kumar wrote:
 
alter session set "_ORACLE_SCRIPT"=true and try
NO - NO - NO! You should NEVER recommend undocumented, unsupported and, in this case, broken, hidden parameters as a solution to a problem. Those parameters should ONLY be used when Oracle TELLS you to use them as part of a support issue being resolved. That parameter does NOT provide the same functionality as normal common users and users risk violating their support contract.
SPathak wrote:
 
Thanks Pavan
Your script is working fine , I am able to create table without ##
Thanks Pavan
Your script is working fine , I am able to create table without ##
NO - that is NOT 'working fine'.  You are risking some SERIOUS issues if you do that. 1. Using undocumented '_' parameters can violate your Oracle support contract2. That particular parameter does NOT create common users that are equivalent to those created the documented way Read this article for just SOME of the reason's why the result is NOT what you think it is.Pete Finnigan's Oracle security weblog I suggest that you, and others, ABANDON any idea of using that method to circumvent Oracle's documented functionality. If that 'prefix' is really that important to you then you should upgrade to the 12.1.0.2 release which supports that properlyhttp://docs.oracle.com/database/121/SQLRF/statements_8003.htm
In a CDB, the requirements for a user name are as follows:
In Oracle Database 12c Release 1 (12.1.0.1), the name of a common user must begin with C## or c## and the name of a local user must not begin with C## or c##.
Starting with Oracle Database 12c Release 1 (12.1.0.2):
The name of a common user must begin with characters that are a case-insensitive match to the prefix specified by the COMMON_USER_PREFIX initialization parameter. By default, the prefix is C##.
The name of a local user must not begin with characters that are a case-insensitive match to the prefix specified by the COMMON_USER_PREFIX initialization parameter. Regardless of the value of COMMON_USER_PREFIX, the name of a local user can never begin with C## or c##.
Undocumented parameters are undocumented for a reason and should NOT be used unless Oracle directs you to use them as part of a support issue. There is nothing wrong with researching their use and effect on an isolated dev database. That can be a good way to learn how things work. That is what the author of that article did and they TRIED to do a thorough job of it. Bet as expert as that author is, and he is an expert, there is still the risk of missing something. Upgrade your DB if the issue is that important.
I accept it, we shouldn't use it, perhaps after working on noncdb prior to 12c stuff, please tend to create users and test it- always they want to test and see why ? it won't work.But, its just a work around, not a solution and I hope it takes time for end users to get digest into their brains "common user ##" .

Categories

Resources