Wednesday, December 25, 2013

Setup git Server under apache on Windows server 2008 R2

This summary is not available. Please click here to view the post.

Wednesday, August 28, 2013

quickest way to do massive dbsnmp password change for Oracle enterprise manager


1. using script change dbsnmp user password in database.

2. stop agent

3. modify following file  on agent home folder

$agent_inst_home/sysman/emd/targets.xml

4. change all rows have password, reset password in the file and update encryption to false



to



5. start agent

6. the password should be encrypted again.

Thursday, August 22, 2013

Oracle RAC starts hang

ref: http://abcdba.com/abcdbaservertroubleshootingrc3dstartuphangs


SYMPTOM

The Oracle High Availability Services (OHAS) software stack appears to hang when a server housing CRS, ASM, RDBMS and an application reliant on the database is rebooted.

CAUSE

It is not unusual for a server's startup routine as dictated by the contents of the /etc/rc3.d directory to contain not only the OHAS components - installed by root.sh as part of the grid infrastructure installation - but also a step that starts an application running on the same server - usually installed manually and configured to start after the OHAS components. It is also notuncommon to have the application program look for the existence of a database to which it will need to communicate, and to enter a spin/sleep cycle and wait for access to the database to become available.
Unfortunately, due to the requirements of OHAS to be able to handle, for example, a dead process situation, it relies on the facilities offered by the inittab functionality to issue a 'respawnable' execution of the init.ohasd process. This is the process that ultimately starts the OHAS software stack and, as per any configured services, will initiate, amongst others, the listener, the ASM instance and the RDBMS instance. The entry for this process is located in the/etc/inittab file and, like the rc3.d entries, is is also installed by root.sh as part of the grid infrastructure installation.
Field two of each entry in the /etc/inittab file state the run level(s) that the server must have reached in order for the entry to be executed. In the case of init.ohasd this is set to 3 and 5. Thus a 'chicken and egg' situation arises whereby the rc3.d entries cannot complete - in this example because the application is sleeping and waiting for the database to start - and the inittab entry - which ultimately starts the database - cannot begin because the rc3.dprocesses haven't finished. The net result is an apparently hung startup.

EXAMPLE /etc/inittab ENTRY

h1:35:respawn:/etc/init.d/init.ohasd run >/dev/null 2>&1 

SOLUTION

Write a wrapper for rc scripts and call original script at backgroud with &
e.g. 

#!/bin/ksh
#
# It was created as a workaround to speed up RAC's startup at boot time.  ###################################################################################

FLAG=${1}

/etc/init.d/gcstartup ${FLAG} &

 
As the /etc/inittab file will not get processed until /etc/rc3.d entries complete, any entry in the /etc/rc3.d directory must not be allowed to sleep and wait for the OHAS software stack to appear. Instead, either remove the application startup completely from the rc3.d process and if appropriate start the application manually after the OHAS software stack is up, or rewrite the application startup routine so that rather waiting 'in line' as part of the rc3.dprocesses, it spawns another 'out of line' process perhaps using the /usr/bin/at command and a suitable delay.
Either of the above solutions will ensure that the server reaches runlevel 3 unhindered, and so allows any dependent steps configured in /etc/inittab to begin.

Thursday, July 18, 2013

Using the Oracle 11GR2 database flash cache

http://guyharrison.squarespace.com/blog/2009/11/24/using-the-oracle-11gr2-database-flash-cache.html

key parameter

you configure the flash cache by setting the parameters DB_FLASH_CACHE_FILE and DB_FLASH_CACHE_SIZE.

Thursday, April 25, 2013

the way to set application path without touch system path

http://msdn.microsoft.com/en-us/library/ee872121%28VS.85%29.aspx#appPaths



o register and control the behavior of your applications with the App Paths subkey:
  1. Add a subkey with the same name as your executable file to the App Paths subkey, as shown in the following registry entry.
    HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER
       SOFTWARE
          Microsoft
             Windows
                CurrentVersion
                   App Paths
                      file.exe
                         (Default)
                         DontUseDesktopChangeRouter
                         DropTarget
                         Path
                         UseUrl

Thursday, April 11, 2013

database suspend


database suspend
ref:  --http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:373618158622
from Tom
"
The basic steps for using SUSPEND and RESUME are as follows:
Place the database tablespaces in hot backup mode using the ALTER TABLESPACE BEGIN BACKUP
statement. For example, to place tablespace USERS in hot backup mode enter:

ALTER TABLESPACE users BEGIN BACKUP;


       
If your mirror system has problems with splitting a mirror while disk writes are
occurring, issue the following:

ALTER SYSTEM SUSPEND;
   

       
Split your mirrors at the O/S or hardware level.

Issue the following:

ALTER SYSTEM RESUME;
   

       
Take the specified tablespaces out of hot backup mode. For example, to take tablespace
USERS out of hot backup mode enter:

ALTER TABLESPACE users END BACKUP;
   

       
Copy the control file and archive the online redo logs as usual for a backup.
"

Friday, January 18, 2013

How Do I Reset A Lost Weblogic Admin User Password?

ref: http://www.kpipartners.com/blog/bid/137794/how-do-i-reset-a-lost-weblogic-admin-user-password?utm_source=twitter&utm_medium=social&utm_content=f6f6d54b-7a48-4584-b676-8799daca3a5b

main steps:

1. Make sure all the services are down
2. change directory to \user_projects\domains\bifoundation_domain\bin
cd \user_projects\domains\bifoundation_domain\bin
3. Source the setDomainEnv.cmd(Windows) / setDomainEnv.sh (Linux) script so we can get all the WebLogic variables set correctly
In windows: setDomainEnv.cmd
In Linux: . setDomainEnv.sh
4. Now change the directory to security directory in your instance.
cd \user_projects\domains\bifoundation_domain\security
5. Move the DefaultAuthenticatorInit.ldift to a backup file
In Windows:
mv DefaultAuthenticatorInit.ldift DefaultAuthenticatorInit_old.ldift
In Linux:
mv DefaultAuthenticatorInit.ldift DefaultAuthenticatorInit_old.ldift
6. Run the “java weblogic.security.utils.AdminAccount newuser newpassword .” to generate a new DefaultAuthenticatorInit.ldift with a new user with the assigned password within the security directory
eg: java weblogic.security.utils.AdminAccount weblogic weblogic123 .
Notereplace newuser and newpassword with a user and password of your choosing. Ensure the password is a minimum of 8 characters and contains at least one numeric character. Also, don’t forget the period “.” at the end of the above command, it is required.
7. Change directory to \user_projects\domains\bifoundation_domain\servers\AdminServer\security
cd \user_projects\domains\bifoundation_domain\servers\AdminServer\security\
8. Edit the boot.properties file and replace newpassword and newusername with the user and password you defined in step 6. Do this for all the servers in the domain.
password=newpassword
username=newusername
The boot.properties will get encrypted once the admin server starts up
9. Rename or remove directory\user_projects\domains\bifoundation_domain\servers\AdminServer\data\ldap as it will get recreated once the WebLogic Admin server starts.
e.g:
rename \user_projects\domains\bifoundation_domain\servers\AdminServer\data\ldap \user_projects\domains\bifoundation_domain\servers\AdminServer\data\ldap_OLD
10. Change directory to \user_projects\domains\bifoundation_domain\bin and start the Weblogic Admin Server
In Windows: startWebLogic.cmd
In Linux:  ./ startWebLogic.sh
11. Once the weblogic server is up, you’ll be able to login to Console with the new weblogic Admin user and password.

12 The last things is if some file get locked reboot your machine or find the process and stop it or kill it. I run into file get locked by jvm controller.