Dynamic menu

Advertisements

SQLPlus Usage

good links

http://psoug.org/reference/sqlplus.html

 

Connect your self as DBA,  sys/sysman account;

conn  sys/password@orcl as sysdba;

 

 

There are many users on a full installation of Oracle, most of which you probably won’t need. To lock an Oracle user account, you can use the following command:

alter user username account lock;

To unlock the user, simply replace ‘lock’ with ‘unlock.’

Oracle comes with a few default accounts that should never be locked or dropped. These include: SYS, SYSTEM, SYSMAN (Oracle 10g), OUTLN. However, you do want always to change the password for these users. The default password for SYS is change_on_install. It is important that you follow these directions. To change the password for a user:

alter user username identified by new_password;

For non-critical users, you can always lock and expire the account. We can change the password for, lock, and expire the account CTXSYS all at once:

alter user ctxsys identified by 0bscur3 account lock password expire;

To make the password can not expired.

alter profile default limit password_life_time unlimited;

Unlike older releases, Oracle 11g sets password expiry by default. That's really annyoing

  • for SYS and SYSTEM: noboday wants to regularly change (and forget) them.
  • for any accounts that are used by application servers: the password is usually configured in a datasource file, nobody would ever want to change it
  • if some superusers directly access the DB and keep forgetting the password, the automatic locking will lock your application out: not great for your uptime.

So let’s get rid of these annoyances with: ALTER PROFILE DEFAULT LIMIT FAILED_LOGIN_ATTEMPTS UNLIMITED PASSWORD_LIFE_TIME UNLIMITED;

One way to do this is to change the profile in the enterprise manager. You log on as sys/sysdba, go to Server->Profiles->Default->Edit->Password->Expire in->Unlimited. That’s it. I don’t know if this will change once set Expiration Dates as well, otherwise re-set the profile on the user (in enterprise mgr again)


 


Use ANT to build the portlet project 11G

By W.ZH July 22 2009

If you develop a portlet project, it is in fact has many differences with the normal web application, But when you develop project in the Jdev 11g, it developed as a normal project., when u do the deploy from Jdev, it will ask to develop as a web app or a portlet app. (This is a simple article, but it is very trick practice in your real project. it may take several days if you explore how to do this by ur self. )

But how to deploy the portlet project in ANT?

1. first you deply in jdev , you can get the ear file and war file. unzip that file to see what is inside.

2. you design a normal web build.xml for your project.

3. notice the major difference that jdev changed during the deploy for the portlet proejct are:

  • under the WEB-INF/lib there are some jar files you need to include. you copy them out , use the ant copy to copy these files before you start build your war file.
  • under the WEB-INF/wsdl there are some xml and ws config files you need to include. you copy them out , use the ant copy to copy these files before you start build your war file.
  • there are some files in the WEB-INF are new added for WSRP, you need get them and copy to your WEB-INF folder. Such as for mine:

WSRP_v1_Service-java-wsdl-mapping.xml

WSRP_v2_Service-java-wsdl-mapping.xml

wsrp_mime_cs_mappings.properties

standard-webservices.xml

oracle-webservices.xml

  • and also in the WEB-INF, weblogic.xml and web.xml file has beed changed. you need copy them out and use these to build the war file for your portlet deploy.

Basically, if you include all these, your build should be able to build the project as a portlet deployment.

There are some tips in ANT build file:

1. when you compile use <javac in ant, it will not auto copy any non java file to your classes dir, you need take note your properties, xml, xsd, wsdl files in the src folder to include them into your war file , after compile.

2. If you have the webservice /client proxy in your src, then then will create some *.xsd and *.wsdl in the src, you need to remeber to copy them to your classes folder.