Oracle Fusion Middleware & Application Server

Tuesday, September 4, 2012

Oracle WebLogic Server 11g: Interactive Quick Reference

Oracle has published a really nice and useful Oracle WebLogic Server 11g Interactive Quick Reference under the following link http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/Poster/poster.html



The Quick Reference shows you an architecural overview of the Oracle WebLogic Server processes, tools, configuration files, log files and so on including a short description of each section and the corresponding link to the Oracle WebLogic Server Documentation.

In addition you can also download the architecural overview picture as a PDF under following link http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/Poster/pdf/Oracle-WebLogic-Server-11g.pdf

Its really a quite useful Quick Reference for everybody who is working with Oracle WebLogic Server.

Wednesday, August 15, 2012

Startup or Shutdown of multiple WebLogic Managed Servers via WLST script

Normally you will have multiple Managed Servers within one WebLogic Server Domain. The classical approach to startup or shutdown these multiple Managed Servers are:

  • using the WebLogic Server provided scripts startManagedWebLogic.[sh|cmd] and stopManagedWebLogic.[sh|cmd] in your Domain Directory
  • using a WLST script with the command shutdown()
The first option by using the startManagedWebLogic.[sh|cmd] and stopManagedWebLogic.[sh|cmd] requires that you provide the name of the Managed Server and the AdminURL, which is not quite flexible.   The second option has a small disadvantage in case you run the command shutdown() against a Managed Server which is currently not running. You will receive error messages like:
 
weblogic.server.ServerLifecycleException: Can not get to the relevant ServerRuntimeMBean for server DemoManaged

Specially when you are trying to shutdown multiple Managed Servers within such a WLST script that uses the command shutdown(), if you hit such an error the WLST script will terminate and the potential following shutdown() commands for other Managed Servers will not be executed.

With below WLST script, you can avoid this problem and perform your startup or shutdown tasks in a more elegant way.

The WLST script is using a properties file, in my case named domain.properties which contains following:

adminurl=t3://localhost:7001
adminusername=weblogic
adminpassword=weblogic
serverlist=DemoManaged,ManagedServer

The property serverlist is containing a comma seperated list of Managed Servers which you want to control.

The WLST script is moreover using an input value (start or stop). Before performing either the start() or the shutdown() command, the script will check for the MBean ServerRuntimeMBean if its existing or not for the given Managed Server.

import getopt
# Load the properties file with all necessary values
loadProperties('domain.properties')
# Split the provided Server List String for the FOR LOOP in start and stop command
serverlistSplit=String(serverlist).split(",")
 
# Get the command, must be 'start' or 'stop'
getcommand=sys.argv[1]

# Check the provided command
if getcommand != 'start' and getcommand != 'stop':
  print 'usage: <start stop="stop">'
  exit()

# Connect to the Weblogic Admin Server
# Connection Details are retrieved from properties file
connect(adminusername, adminpassword, adminurl)

# Change to the root of the MBean hierarchy
domainRuntime()

# Start Block
if getcommand == 'start':
   # Loop over the splitted Server List string
   for s in serverlistSplit:
     # Is a ServerRuntime MBean existing for current Managed Server?
     # If yes, the current Managed Server is already running and we dont need to do anything
     bean = getMBean('ServerRuntimes/' + s)
     if bean:
       print 'Server ' + s + ' is ' + bean.getState()
     else:
       start(s, 'Server', block='false')
       print 'Started Server ' + s

# Stop Block
if getcommand == 'stop':
   # Loop over the splitted Server List string
   for s in serverlistSplit:
     # Is a ServerRuntime MBean existing for current Managed Server?
     # If no, the current Managed Server is already down and we dont need to do anything
     bean = getMBean('ServerRuntimes/' + s)
     if bean:
       shutdown(s, 'Server')
       print 'Stopped Server ' + s
     else:
       print 'Server ' + s + ' is not running'

disconnect()
exit()

Place the properties file domain.properties and the WLST script start_stop_managedservers.py in one directory, adjust the properties file to your landscape.

To call the WLST script start_stop_managedservers.py just source the required script setWLSEnv.[sh|cmd] out of your WLS_HOME/server/bin directory and then execute following command:

java weblogic.WLST start_stop_managedservers.py [start|stop]

Thursday, June 7, 2012

DOAG Conference 2012 - Call for Papers

As every year the DOAG (German Oracle User Group) Conference will take place NĂ¼rnberg/Germany from the 20th November until 22nd November 2012.

The Call for Papers is already open and ends on 30th June 2012:

German Link: http://www.doag.org/de/events/konferenzen/doag-2012/fuer-referenten.html
English Link: http://www.doag.org/en/events/konferenzen/doag-2012/fuer-referenten.html

Once again, I will be in the election board for the streams (MySQL & Fusion Middleware) to rate/choose the presentation which will be shown on the conference.

Thursday, April 19, 2012

Oracle Traffic Director available for download

During the official announcement of Oracle WebLogic Server 12c on 1st December 2011, Oracle also announced the new Oracle Traffic Director.

Oracle Traffic Director 11g is a high-performance caching HTTP proxy server. It is designed to take advantage of the unique engineered systems features of Oracle's Exalogic computing platform, providing a highly-available, on-board load-balancing reverse proxy for Oracle Fusion Middleware and Applications

Today I saw, that the Oracle Traffic Director 11.1.1.6.0 is available for Linux x86-64 in Oracle TechNet:


The Software can be found under: http://www.oracle.com/technetwork/java/webtier/downloads/traffic-director-1373931.html
The Oracle Traffic Director Documentation can be found under: http://docs.oracle.com/cd/E23389_01/index.htm

Thursday, April 5, 2012

asmcmd non-interactive commands in MS-DOS Batches

In the last days I was fighting with a nice behaviour of the asmcmd non-interactive mode in MS-DOS batches.

I wanted to delete several files located in ASM within a MS-DOS batch:

REM Script: asm_cleanup_DB112.cmd
set ORACLE_BASE=E:\oracle
set ORACLE_HOME=E:\oracle\product\grid-11.2.0
set ORACLE_SID=+ASM
set PATH=%ORACLE_HOME%\bin;%PATH%
asmcmd rm -f +TEMP/db112/temp_01.dbf
asmcmd rm -f +TEMP/db112/temp_02.dbf
asmcmd rm -f +REDO1/db112/redog1m1.dbf
asmcmd rm -f +REDO1/db112/redog2m1.dbf
asmcmd rm -f +REDO1/db112/redog3m1.dbf
asmcmd rm -f +REDO1/db112/redog1m2.dbf
asmcmd rm -f +REDO1/db112/redog2m2.dbf
asmcmd rm -f +REDO1/db112/redog3m2.dbf
 
As soon as I run the batch, the first file got deleted, but then the batch execution stops without continuing the next steps :-( I try to place the files into Single-Quotes, into Double-Quotes, but nothing helps, after the first asmcmd command the batch execution stops ...
This behaviour even occurs with "ls" commands and so on.
 
Oracle Metalink search = 0
Oracle Technet Forums = 1 thread with the same problem, but no answer since more then 2 years
 
After a little playing and re-thinking, I only found following solution: Build a FOR Loop in my batch.
I just created a textfile with my files which I want to delete:
 
# Content of File asm_file_list.txt
+TEMP/db112/temp_01.dbf 
+TEMP/db112/temp_02.dbf
+REDO1/db112/redog1m1.dbf
+REDO1/db112/redog2m1.dbf
+REDO1/db112/redog3m1.dbf
+REDO1/db112/redog1m2.dbf
+REDO1/db112/redog2m2.dbf
+REDO1/db112/redog3m2.dbf
 
Then I changed my batch to the FOR loop, which simple reads my above textfile with the list of my files to be delete and executed for each line the "asmcmd rm -f" command:
 
REM Script: asm_cleanup_DB112.cmd
set ORACLE_BASE=E:\oracle
set ORACLE_HOME=E:\oracle\product\grid-11.2.0
set ORACLE_SID=+ASM
set PATH=%ORACLE_HOME%\bin;%PATH%
for /f %%a in (asm_file_list.txt) do ( 
asmcmd rm -f %%a
)

Run the batch again and be happy :-)

Thursday, March 15, 2012

Long live Oracle Forms - New Statement of Direction

Oracle (Grant Ronald) published today (15th March 2012) an updated Statement of Direction for Oracle Forms and Reports.

The major statement within this Statement of Direction is:

Oracle has no plan to discontinue support of Oracle Forms. Furthermore, a new version of Forms, Oracle Forms 12c, is planned for delivery as a component of Oracle Fusion Middleware 12c.
Thats really a clear and positive statement from Oracle :-)

 
The complete Statement of Direction can be found under following link: http://www.oracle.com/technetwork/issue-archive/2010/toolssod-3-129969.pdf

Lets wait for Oracle Forms & Reports 12c :-)

Monday, February 6, 2012

ASM-00203 and Windows 2008 R2

I was fighting right now with my favorite Operating System and ASM :-)

I just installed Oracle Grid Infrastructure on a standalone Windows 2008 R2 server (successfully) and wanted to stamp some disks with the tool asmtoolg.exe. After I started the asmtoolg from a command prompt, I receive immediately an error message:

ASM-00203: No valid devices found

Cool :-) Oracle Metalink brings back following result:


After a little bit playing, I found following solution:
Open your Windows Explorer, navigate to your %ORACLE_HOME%\bin and do a right-click on the tool asmtoolg.exe and chose the Option "Run as administrator" and be happy :-) Now I could run the asmtoolg.exe without any error messages.

I was logged in as a local administrator and the above error message came up for me, only after I used above method I could stamp my disks. I really love my favorite Operating System ...