Skip to content

Instantly share code, notes, and snippets.

@mtcoffee
mtcoffee / CreatePRCSServerDomain.sh
Last active August 27, 2016 17:56
CreatePRCSServerDomain
#!/bin/bash
#This script will quickly create a new Linux/Unix PeopleSoft process scheduler domain and perform some checks
#IMPORT INFORMATION
#1. YOU MUST SET THE PS_HOME PS_CFG_HOME PS_APP_HOME and PS_CUST_HOME VARIABLES BEFORE RUNNING THIS SCRIPT
#2. YOU MUST ALSO HAVE A CUSTOM TEMPLATE SAVED UNDER $PS_HOME/appserv/prcs/unix_custom.cfx
# THE TEMPLATE CAN BE CREATED BY COPYING THE DELIVERED TEMPLATE $PS_HOME/appserv/prcs/unix.cfx
#3. THE SECTION AFTER "POST DOMAIN CHECKS" IS OPTIONAL AND CAN BE EASILY CUSTOMIZED OR EXCLUDED.
#Known to work with PeopleTools 8.54 and 8.55.
############################
@mtcoffee
mtcoffee / CreateAPPServerDomain.sh
Created August 27, 2016 17:55
CreateAPPServerDomain
#!/bin/bash
#This script will quickly create a new Linux/Unix PeopleSoft appserver domain and perform some checks
#IMPORT INFORMATION
#1. YOU MUST SET THE PS_HOME PS_CFG_HOME PS_APP_HOME and PS_CUST_HOME VARIABLES BEFORE RUNNING THIS SCRIPT
#2. YOU MUST ALSO HAVE A CUSTOM TEMPLATE SAVED UNDER $PS_HOME/appserv/small_custom.cfx
# THE TEMPLATE CAN BE CREATED BY COPYING THE DELIVERED TEMPLATE $PS_HOME/appserv/prcs/small.cfx
#3. THE SECTION AFTER "POST DOMAIN CREATION CHECKS" IS OPTIONAL AND CAN BE EASILY CUSTOMIZED OR EXCLUDED.
#4. lsof is required for the port checks at bottom. Install with package manager. (sudo yum install lsof)
#Known to work with PeopleTools 8.54 and 8.55.
############################
@mtcoffee
mtcoffee / CreatePIAServerDomain.sh
Last active August 28, 2016 16:39
CreatePIAServerDomain
#!/bin/bash
#This script will quickly create a new Linux/Unix PeopleSoft webserver domain and perform some checks
#IMPORT INFORMATION
#1. YOU MUST SET THE PS_HOME PS_CFG_HOME PS_APP_HOME and PS_CUST_HOME VARIABLES BEFORE RUNNING THIS SCRIPT
#2. THE SECTION AFTER "POST DOMAIN CREATION CHECKS AND CONFIGURATION" IS OPTIONAL AND CAN BE EASILY CUSTOMIZED OR EXCLUDED.
# IT INCLUDES SOME TEXT FILE MANIPULATION TO CONFIGURE YOUR IBGATEWAY SETTINGS AND IMPORTS ANY CERTIFICATES NEED BY YOUR WEBLOGIC KEYSTORE
#Known to work with PeopleTools 8.54 and 8.55.
############################
##variables required for silent install of PIA domain
@mtcoffee
mtcoffee / QueryMultipleOracleDBviaPS.ps1
Created September 10, 2016 15:53
Use PowerShell to query multiple databases
#This script requires Powershell, sqlplus aka Oracle command line client and tnsname resolution of your target databases
#A typical use case would be to find the lock status of an account in multiple databases
$databases = @("fndev", "fntst")
$credential = Get-Credential
$username = $credential.GetNetworkCredential().username
$password = $credential.GetNetworkCredential().password
if (!$password) { Write-Host "password is null"; Exit }
foreach ($db in $databases)
{
- description: |-
Find all domains within a PS_CFG_HOME and restart selected servers/clear cache:
*weblogic cache
*appserver cache
*process scheduler cache
executionEnabled: true
group: BasicTasks
id: ed3f817e-0e46-48fc-b609-1a4387ee99bd
loglevel: INFO
name: 'Stop,Start,Restart servers with cache clear '
@echo off
REM PeopleTools Object Type export script
REM Find object type numbers
REM Definition Type Selections on PeopleTools 8.54: Application Designer Developer's Guide - Appendix B
REM https://docs.oracle.com/cd/E55244_01/psft/acrobat/pt854tapd-b0714.pdf
REM example - To create a project via application designer containing all PTF objects (104=Test Definitions,105=Test Framework Test Cases)
set pside=E:\apps\psoft\PT85509\bin\client\winx86\pside.exe
set export_path=E:\TEMP\out\export
set log_path=E:\TEMP\out
@mtcoffee
mtcoffee / drop-public-synonyms.sql
Created September 8, 2017 18:12
PL/SQL Script to delete all public synonyms for a schema
SET serveroutput ON
BEGIN
FOR cur_syn IN (SELECT synonym_name
FROM all_synonyms
WHERE table_owner = upper('schema_user'))
LOOP
BEGIN
EXECUTE IMMEDIATE ('drop public synonym ' || cur_syn.synonym_name ||' ');
EXCEPTION
WHEN OTHERS
#!/bin/bash
#reference - stolen from https://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html
#This script should run on any Linux host and has no hard coded parameters
#set percentage to trigger alert
threshold=80
emailaddress=youremail@yourdomain.com
#important****the first line will exclude filesystems with specified strings******
df -PH | grep -vE '^Filesystem|tmpfs|cdrom|nashome' | awk '{ print $5 " " $1 " " $6 }' | while read output;
do
echo $output
@mtcoffee
mtcoffee / add RITM variables to request
Created July 4, 2021 21:57
mail script to add ServiceNow RITM variables to Request
//custom function to retrieve all variables from a RITM and print in email
//https://community.servicenow.com/community?id=community_question&sys_id=c8eff1461b4b6050ed6c9979b04bcb59
(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */
email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */
event) {
// Add your code here
template.print("Summary of Requested items:<br />");
@mtcoffee
mtcoffee / add RITM variables to task
Created July 4, 2021 22:02
mail script to add ServiceNow RITM variables to Task
//custom function to retrieve all variables from a RITM and print in email
//https://community.servicenow.com/community?id=community_question&sys_id=c8eff1461b4b6050ed6c9979b04bcb59
(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */
email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */
event) {
// Add your code here
template.print("Summary of Related Requested item:<br />");