Friday, February 25, 2011

View SQL ran in Maximo Logs

GOTO > System Configuration > Platform Configuration > Logging

Search for SQL

Change log4j.logger.maximo.sql Log Level to DEBUG

Log Level:DEBUG
key:log4j.logger.maximo.sql
Inherited Appenders: Console,Rolling

Hit SAVE
then Apply Changes

Thursday, February 24, 2011

Import a Report Design File into Maximo

1) GOTO > Administration > Reporting > Reporting Administration

2) Search for and select wms_woprint.rptdesign
3) Select Action Import Report
4) Upload to Report Design File
5) OK on override message
6) OK on the Resource file message

7) Verify all the settings and update them as below

Limit Rec? - checked
Max Rec Limit - 200
Priority - 2
Toolbar Seq - 4
Browser view - checked
Browser loc - ALL
Direct Print - checked
Drct Prnt loc - All
Drct Prnt atch - checked
Drct Prnt atch loc - All

8) Press the Generate Request pages button
9) SAVE

Wednesday, February 9, 2011

Scheduled Task to keep Business Objects Up

If you have issues with your BO server falling over durning hours, Setup a Scheduled Task in windows to Start the "Central Management Server" every few hours.

Run: C:\WINNT\system32\net.exe start "Central Management Server"

Start in: C:\WINNT\system32

Run as: 'service account of some kind'

Wednesday, February 2, 2011

Rename Log files with unique name when greater than a certin size

@echo off

::Set vars
SET LOGFILE=\\\SUPPORT\LOGS\log.txt
SET LOGNAME=log

:CHECK_FILE
:: Create file if does not exist
IF EXIST %LOGFILE% (goto:CHECK_SIZE) ELSE (
echo Created %DATE% > %LOGFILE%
goto:CHECK_FILE
)

:CHECK_SIZE
FOR %%? IN (%LOGFILE%) DO (SET FILESIZE=%%~z?)
::Check if less than 10kb
If %FILESIZE% LSS 10000 (
GOTO:EOF
)
::Check if greater than 10kb, if so rename to unique name
If %FILESIZE% GTR 10000 (
ren %LOGFILE% "%LOGNAME%-%date:~4,2%-%date:~7,2%-%date:~10%-%time:~0,2%%time:~3,2%%time:~6,2%"
pause
echo Created %DATE% > %LOGFILE%
)
GOTO:EOF

Rename the file using the current system date

Here's how you'd rename the file using the current system date.

ren test.txt test%date:~4,2%-%date:~7,2%-%date:~10%.txt

or even better

ren test.txt test-%date:~4,2%-%date:~7,2%-%date:~10%-%time:~0,2%%time:~3,2%%time:~6,2%.txt

:Unique - returns a unique string based on a date-time-stamp, YYYYMMDDhhmmsscc

:Unique - returns a unique string based on a date-time-stamp, YYYYMMDDhhmmsscc

:Unique ret -- returns a unique string based on a date-time-stamp, YYYYMMDDhhmmsscc
:: -- ret [out,opt] - unique string
:$created 20060101 :$changed 20080219 :$categories StringOperation,DateAndTime
:$source http://www.dostips.com


SETLOCAL
for /f "skip=1 tokens=2-4 delims=(-)" %%a in ('"echo.|date"') do (
for /f "tokens=1-3 delims=/.- " %%A in ("%date:* =%") do (
set %%a=%%A&set %%b=%%B&set %%c=%%C))
set /a "yy=10000%yy% %%10000,mm=100%mm% %% 100,dd=100%dd% %% 100"
for /f "tokens=1-4 delims=:. " %%A in ("%time: =0%") do @set UNIQUE=%yy%%mm%%dd%%%A%%B%%C%%D
ENDLOCAL & IF "%~1" NEQ "" (SET %~1=%UNIQUE%) ELSE echo.%UNIQUE%
EXIT /b

DOS BATCH - (Read File Properties)

http://www.robvanderwoude.com/battech_fileproperties.php


Many times we need to check a file's size, its last-modified date, its location, or we may require its fully qualified path in short (8.3) notation.

Arguably CMD's most versatile internal command to the rescue: FOR.

FOR %%? IN (file_to_be_queried) DO (
ECHO File Name Only : %%~n?
ECHO File Extension : %%~x?
ECHO Name in 8.3 notation : %%~sn?
ECHO File Attributes : %%~a?
ECHO Located on Drive : %%~d?
ECHO File Size : %%~z?
ECHO Last-Modified Date : %%~t?
ECHO Parent Folder : %%~dp?
ECHO Fully Qualified Path : %%~f?
ECHO FQP in 8.3 notation : %%~sf?
ECHO Location in the PATH : %%~dp$PATH:?
)
pause


Note: Not all of these properties can be read this way in every Windows version. With every new Windows version, more options became available.
Type FOR /? for more details.

Many of these properties can be combined, as is shown for the s option (short, or 8.3 notation).

Play with it, experiment, and learn. Have fun.