ALTER PROFILE DEFAULT LIMIT FAILED_LOGIN_ATTEMPTS UNLIMITED PASSWORD_LIFE_TIME UNLIMITED;
martes, 27 de abril de 2010
¡Me salvo el trabajo!
Estas instrucciones me ayudaron a resolver el problema de contraseña vencida del sysman, cuenta con la que se puede accesar a la consola del oracle
Ensure that ORACLE_HOME is set to the correct home
- Stop the standalone dbconsole on Unix
$ emctl stop dbconsole on Windows Stop the Windows Service Oracle<oracle_home_name>DBConsole
Or
Open a DOS Command Window and type
C> emctl stop dbconsole - Check that the standalone dbconsole is stopped on Unix
$ emctl status dbconsole on Windows
Check the status of the Windows Service Oracle<oracle_home_name>DBConsole
Or
Open a DOS Command Window and type
C> emctl status dbconsole - Connect to the database as a user with DBA privilege with SQL*Plus and execute
SQL> alter user sysman identified by <new_password> ; - Check the new password
SQL> connect sysman/<new_password>[@database_alias] - Go to $ORACLE_HOME/host_sid/sysman/config
- Save the file emoms.properties to emoms.properties.orig
- Edit the file emoms.properties
- Search for the line beginning with:
oracle.sysman.eml.mntr.emdRepPwd=
Replace the encrypted value by the new password value - Search for the line:
oracle.sysman.eml.mntr.emdRepPwdEncrypted=TRUE
Replace TRUE by FALSE - Restart the standalone dbconsole on Unix
$ emctl start dbconsole
on Windows Start the Windows Service Oracle<oracle_home_name>DBConsole
Or
Open a DOS Command Window and type
C> emctl start dbconsole - Check that the password has been encrypted
Edit the file emoms.properties - Search for the line beginning with:
oracle.sysman.eml.mntr.emdRepPwd=
Check that the password is encrypted - Search for the line beginning with:
oracle.sysman.eml.mntr.emdRepPwdEncrypted=
Check that the value is TRUE
martes, 10 de noviembre de 2009
Iniciando aplicaciones con AppFuse
Interesante articulo que me esta ayudando a entender este framework
Object Computing, Inc. - Java News Brief - May 2008
viernes, 9 de octubre de 2009
Conectar a oracle mediante OBDC
Se necesita ejecutar la siguiente instrucción en el server para que se puedan conectar al Oracle 11g mediante ODBC.
alter system set SEC_CASE_SENSITIVE_LOGON=false scope=both sid='*'
martes, 29 de septiembre de 2009
Oracle - Vistas de Diccionarios de datos
V$CIRCUIT
V$CIRCUIT contains information about virtual circuits, which are user connections to the database through dispatchers and servers.
| Column | Datatype | Description |
CIRCUIT | RAW(4 | 8) | Circuit address |
DISPATCHER | RAW(4 | 8) | Current dispatcher process address |
SERVER | RAW(4 | 8) | Current server process address |
WAITER | RAW(4 | 8) | Address of the server process that is waiting for the (currently busy) circuit to become available |
SADDR | RAW(4 | 8) | Address of the session bound to the circuit |
STATUS | VARCHAR2(16) | Status of the circuit:
|
QUEUE | NUMBER | Queue the circuit is currently on:
|
MESSAGE0 | NUMBER | Size in bytes of the messages in the first message buffer |
MESSAGE1 | NUMBER | Size in bytes of the messages in the second message buffer |
MESSAGE2 | NUMBER | Size in bytes of the messages in the third message buffer |
MESSAGE3 | NUMBER | Size in bytes of the messages in the fourth message buffer |
MESSAGES | NUMBER | Total number of messages that have gone through this circuit |
BYTES | NUMBER | Total number of bytes that have gone through this circuit |
BREAKS | NUMBER | Total number of breaks (interruptions) for this circuit |
PRESENTATION | VARCHAR2(257) | Presentation protocol used by the client and server |
PCIRCUIT | RAW(4 | 8) | Address of the parent circuit |
V$SHARED_SERVER
This view contains information on the shared server processes.
| Column | Datatype | Description |
NAME | VARCHAR2(4) | Name of the server |
PADDR | RAW(4 | 8) | Server's process address |
STATUS | VARCHAR2(16) | Server status:
|
MESSAGES | NUMBER | Number of messages processed |
BYTES | NUMBER | Total number of bytes in all messages |
BREAKS | NUMBER | Number of breaks |
CIRCUIT | RAW(4 | 8) | Address of circuit currently being serviced |
IDLE | NUMBER | Total idle time (in hundredths of a second) |
BUSY | NUMBER | Total busy time (in hundredths of a second) |
REQUESTS | NUMBER | Total number of requests taken from the common queue in this server's lifetime |
V$DISPATCHER
V$DISPATCHER displays information about the dispatcher processes.
| Column | Datatype | Description |
NAME | VARCHAR2(4) | Name of the dispatcher process |
NETWORK | VARCHAR2(128) | Network address of the dispatcher |
PADDR | RAW(4 | 8) | Process address |
STATUS | VARCHAR2(16) | Status of the dispatcher:
|
ACCEPT | VARCHAR2(3) | Indicates whether the dispatcher is accepting new connections (YES) or not (NO) |
MESSAGES | NUMBER | Number of messages processed by the dispatcher |
BYTES | NUMBER | Size (in bytes) of messages processed by the dispatcher |
BREAKS | NUMBER | Number of breaks occurring in the connection |
OWNED | NUMBER | Number of circuits owned by the dispatcher |
CREATED | NUMBER | Number of circuits created by the dispatcher |
IDLE | NUMBER | Total idle time for the dispatcher (in hundredths of a second) |
BUSY | NUMBER | Total busy time for the dispatcher (in hundredths of a second) |
LISTENER | NUMBER | Most recent Oracle error number the dispatcher received from the listener |
CONF_INDX | NUMBER | Zero-based index of the DISPATCHERS configuration used by the dispatcher |
V$SHARED_SERVER_MONITOR
This view contains information for tuning the shared server.
| Column | Datatype | Description |
MAXIMUM_CONNECTIONS | NUMBER | Highest number of virtual circuits in use at one time since the instance started. If this value reaches the value set for the CIRCUITS initialization parameter, then consider raising the value of CIRCUITS. |
MAXIMUM_SESSIONS | NUMBER | Highest number of shared server sessions in use at one time since the instance started. If this reaches the value set for the SHARED_SERVER_SESSIONS initialization parameter, then consider raising the value of SHARED_SERVER_SESSIONS. |
SERVERS_STARTED | NUMBER | Total number of shared servers started since the instance started (but not including those started during startup) |
SERVERS_TERMINATED | NUMBER | Total number of shared servers stopped by Oracle since the instance started |
SERVERS_HIGHWATER | NUMBER | Highest number of servers running at one time since the instance started. If this value reaches the value set for the MAX_SHARED_SERVERS initialization parameter, then consider raising the value of SHARED_SERVERS. |
V$QUEUE
V$QUEUE contains information on the shared server message queues.
| Column | Datatype | Description |
PADDR | RAW(4 | 8) | Address of the process that owns the queue |
TYPE | VARCHAR2(10) | Type of queue:
|
QUEUED | NUMBER | Number of items in the queue |
WAIT | NUMBER | Total time that all items in this queue have waited (in hundredths of a second). Divide by TOTALQ for average wait per item. |
TOTALQ | NUMBER | Total number of items that have ever been in the queue |
viernes, 4 de septiembre de 2009
Como usar Tiles con aplicaciones JavaServerFaces
Lo que se tiene que hacer es agregar el archivo struts.jar de la distribución de los 1.1 de Struts a la ruta de clases. Incluir struts.jar no significa que Struts es necesario para utilizar JSF con Tiles. Es que el paquete se distribuye dentro del archivo struts.jar. No hay otras funcionalidades de la infraestructura de Struts que se trataran.
Algunos consejos útiles.
1.- Aquí está un fragmento del archivo web.xml que habilita Tiles:
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>TilesServet</servlet-name>
<servlet-class>org.apache.struts.tiles.TilesServlet</servlet-class>
<init-param>
<param-name>definitions-config</param-name>
<param-value>/WEB-INF/tiles-defs.xml</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
Pon atención al Tag load-on-startup tag. El servlet Tiles debe ser leído después del server Faces. ¡Esto es importante!
2.- tiles-defs-xml es el nombre del archivo estándar para el archivo de definiciones de Tiles. Sin embargo puedes nombrarlo de la manera que desees y usar mas de uno. Sepáralos por coma para definir tales archivos en el parametro definitions-config en el archivo web.xml.
3.- Establece flush="false" para las etiquetas tiles:insert si los usas dentro de un elemento f:view (entre las etiquetas de inicio y fin de f:view).
4.- Usa la etiqueta f:subview si esta usando tiles dentro de un elemento f:facet, por ejemplo:
<f:facet name="header">
<f:subview id="header">
<tiles:insert definition="page.header" flush="false"/>
</f:subview>
</f:facet>
5.- Nunca incluya un elemento f:view dentro de otro elemento f:view.
6.- No puedes hacer un forward directamente en los Tiles, como en Struts. El archivo faces-config debe referenciar a las paginas usando Tiles como vistas.
jueves, 27 de agosto de 2009
Anotaciones del tutorial: “Using Java Persistence in a Web Application”
http://www.netbeans.org/kb/docs/web/customer-book.html
Coding the Web Application
Development for the Java EE 5 platform is much easier than before because the container does more of the work. Because the container is managing persistence, you do not need to edit any deployment descriptors to configure the CMP mappings or specify the finder methods. In the Java EE 5 platform, persistence is no longer limited to an EJB component. Java EE 5 introduces the Java Persistence API, which can be used by non-EJB components, such as a web application.
Java EE 5 technology also eliminates the need for a lot of the boilerplate code needed in J2EE 1.4 development. EJB development has been streamlined so that fewer interfaces are needed, lookup is simpler, and annotations make component definition and resource injection simple and clear.
Managing Persistence
To manage persistence in the application you only need to create a persistence unit, specify which data source and entity manager to use, and then let the container do the work of managing entities and persistence. The container discovers the entity beans at runtime.
You create a persistence unit by defining it in persistence.xml. The project does not contain a persistence.xml yet so you need to create it. The persistence.xml file is created automatically when you add a persistence unit to the project with the New Persistence Unit wizard. The wizard will help you define the properties of the persistence unit.
TIP: You can also create a persistence unit in the New Entity Class wizard. When creating an entity class, the wizard will prompt you to create a persistence unit if one does not exist.
Creating the Entity Classes
When developing for the J2EE 1.4 platform, when you created entity beans you placed them in an EJB module even when the application was a simple web application. Each entity bean required several interfaces, and you had to configure the deployment descriptors in ejb-jar.xml to define the entity beans, the interfaces, persistence and finder queries for each entity bean.
In Java EE 5, instead of creating entity beans and putting them in the EJB module, you can use simple entity classes, and the entity classes can be placed anywhere in a Java EE 5 application. Writing classes for Java EE 5 applications is also easier than it was for the J2EE 1.4 platform because you can use annotations to define components and inject resources.
@Entity annotation is used to declare the class an entity class. Other annotations provide additional information such as the database table and the columns that the entity class and its properties are mapped to.