Thursday, July 3, 2008

DOS COMMANDS

DOS COMMANDS


AT - Schedule tasks to be performed at a specified time and date

AT

Enables users to schedule tasks to be performed at a specified time and date.


C:Documents and Settings>at /?

The AT command schedules commands and programs to run on a computer at
a specified time and date. The Schedule service must be running to use
the AT command. ( Note : Use "net start" to verifty the service is running)

AT [\computername] [ [id] [/DELETE] | /DELETE [/YES]]
AT [\computername] time [/INTERACTIVE]
[ /EVERY:date[,...] | /NEXT:date[,...]] "command"

\computername Specifies a remote computer. Commands are scheduled on the
local computer if this parameter is omitted.
id Is an identification number assigned to a scheduled
command.
/delete Cancels a scheduled command. If id is omitted, all the
scheduled commands on the computer are canceled.
/yes Used with cancel all jobs command when no further
confirmation is desired.
time Specifies the time when command is to run.
/interactive Allows the job to interact with the desktop of the user
who is logged on at the time the job runs.
/every:date[,...] Runs the command on each specified day(s) of the week or
month. If date is omitted, the current day of the month
is assumed.
/next:date[,...] Runs the specified command on the next occurrence of the
day (for example, next Thursday). If date is omitted, the
current day of the month is assumed.
"command" Is the Windows NT command, or batch program to be run.


Examples

At 22:00 every night run a batch script called rman_backup.bat

C:Documents and SettingsAdministrator>AT 22:00 /every:M,T,W,Th,F,S,Su cmd /c "L:Backuprman_backup.bat"

Added a new job with job ID = 1

Running at on its own gives a detailed list of all jobs available


C:Documents and SettingsAdministrator>AT
Status ID Day Time Command Line
-------------------------------------------------------------------------------
1 Each M T W Th F S Su 16:55 PM cmd /c "C:Documents and SettingsAdministratorhello.BAT"

To delete a scheduled job

C:Documents and SettingsAdministrator>AT 1 /DELETE


To check the status of a job

C:Documents and SettingsAdministrator>AT 1

Task ID: 1
Status: OK
Schedule: Today
Time of day: 16:55 PM
Interactive: No
Command: C:Documents and SettingsAdministratorhello.BAT

Tuesday, July 1, 2008

AIX Procedures

AIX Procedures

NTP Setup AIX Client Side

NTP Setup AIX Client Side

Within any production environment it is advisable to implement an ntp server to
synchronize the date and time of all you server to one central clock. To configure
this on and AIX ( Client Side) , perform the following:

The client configuration for ntp is defined in the configuration file /etc/ntp.conf
and should resemble the following , where server point to the ip address of the ntp
server

root#> more xntp.conf

server 10.101.50.6
driftfile /etc/ntp.drift
tracefile /etc/ntp.trace


# To start the xntpd daemon, enter:

startsrc -s xntpd

# To stop the xntpd daemon, enter:

stopsrc -s xntpd

to configure xntpd to start up at boot time

Edit the /etc/rc.tcpip file, and near the bottom uncomment the
'start xntpd' line. This will ensure ntp client restart on reboot.


e.g.

root#> stopsrc -s xntpd
0513-044 The /usr/sbin/xntpd Subsystem was requested to stop.
root#> ps -ef | grep xntpd
root 499964 581830 0 12:33:58 pts/1 0:00 grep xntpd
root#> startsrc -s xntpd
0513-059 The xntpd Subsystem has been started. Subsystem PID is 499966.
root#> ps -ef | grep xntpd
root 499966 209062 0 12:34:10 - 0:00 /usr/sbin/xntpd
root 532568 581830 0 12:34:13 pts/1 0:00 grep xntpd
root#> date
Sun May 4 12:34:16 BST 200



Note : The /etc/rc.tcpip startup script which defines the TCP/IP daemons is called at boot time by
/etc/inittab

i.e.

root#> grep tcpip inittab

rcptcpip:23456789:wait:/etc/rc.tcpip > /dev/console 2>&1 # Start TCP/IP daemons

PL/SQL Errors

PL/SQL Errors