Database

How to shrink Oracle database “undo” tablespace data file?

Sometimes it happens that we accidentally or unconsciously run very big DML transactions in database. Especially in ones, which dedicated for development purposes. As change history must be saved somewhere to enable a rollback of transaction, memory is necessary for that. And this is purpose which undo tablespace is serving for in Oracle database. And after some huge transactions it…

Continue Reading

Database

How to drop corrupted “undo” tablespace segment of Oracle database?

Once it happened that “undo” tablespace segments got corrupted for some reason, here you’ll find a way to get rid of them. Corrupted tablespace segment status is indicated as NEEDS RECOVERY. Check how many of them you have: Steps to drop corrupted segments: Gather all segment names together and write them into system parameter _OFFLINE_ROLLBACK_SEGMENTS.¬†Here is a statement which generates…

Continue Reading

Database

Why can’t connect to Oracle instance using “sqlplus / as sysdba” ?

Problem Trying to connect to Oracle database instance directly from server command line. Once you have access to file system, you can connect to an instance without providing sys DB user credentials: After a try get this error message: ORA-12162: TNS:net service name is incorrectly specified Solution This may hapen because of not complete database server enviroment setup. In more…

Continue Reading

ADF Exceptions

[ADF security error] Accessing the securityContext property on class oracle.adf.share.ADFContext is not permitted. What can be the reason?

Problem ADF application has view object containing bind variable based on groovy expression. The latter tries to access ADF security context. On compilation I get static type checking error: [Static type checking] – [ADF security error] Accessing the securityContext property on class oracle.adf.share.ADFContext is not permitted. Possible solution You need to switch definition type of groovy expression. Move it from…

Continue Reading

ADF Exceptions

JBO-25186: Exception in expression “bindVariableName” of unknown type : oracle.jbo.ExprSecurityException. What can be the reason?

Problem I have a bind variable (i.e. “bindVariableName“) defined in view object query scope. It is based on groovy expression which access ADF security context. In particular I try to verify whether user is in certain role: adf.context.securityContext.isUserInRole(“RoleName”). And get an exception: JBO-25186: Exception in expression “IsPlanAssumptProvideAssigned” of unknown type : oracle.jbo.ExprSecurityException Reason Looks that ADF does not execute groovy…

Continue Reading

Database

How to enable and disable flashback for a table in Oracle database? How to create flashback data archive?

Here is just a reminder what is Oracle Flashback in general: Oracle Flashback Technology is a group of Oracle Database features that that let you view past states of database objects or to return database objects to a previous state without using point-in-time media recovery. Here are the steps which we need to accomplish if want to have table enabled…

Continue Reading

ADF

What is an impact of “immediate” attribute either for UICommand and UIInput behaviour? ADF Faces Page lifecycle.

In ADF development we face immediate attribute for a button¬†quite frequently. Sometimes developers do not clearly understand what the meaning and impact for action behaviour it cause. Actually this attribute makes sense not just for UICommand (buttons), but for UIInput (input fields) as well. And by the way, its not an ADF invention, it comes from JSF (Apache MyFaces) framework.…

Continue Reading