Tuesday, 26 May 2015

HOT BACKUP and COLD BACKUP

HOT BACKUP and COLD BACKUP



HOT Backup:= without shutiing down DB we can do this

Alter tablespace users begin backup;
---copy datafiles on OS level

Alter tablespace users end backup;


select file_name from dba_data_file where table_space_name='USERS';

ALTER TABLESPACE USERS BEGIN BACKUP;
HOST
copy src dest
alter tablespace users end backup;


COLD BACKUP:= shutdown db first

select file_name from dba_data_files;
select 'cp'::filename ::'c:\oracle\pro\admin\ from dba_data_files;
set lines 130

spool mycopy.bat/
spool off

Monday, 18 May 2015

Help link in not working in Peoplesoft

Help link in not working :-


If help link is not working..Then navigate to peopletool --> Web Profile --> Web Profile configuration

and in place of URL place it in below format


http://webservername:port/PSOL/htmldoc/f1search.htm?ContextID=%CONTEXT_ID%&LangCD=%LANG_CD%

After which Bounce webservices and clear cache

Monday, 11 May 2015

Find the database/data files growth on a yearly basis

Find the database/data files growth on a yearly basis


SQL> select name from v$database;

NAME
---------
RMPRD

SQL> select to_char(CREATION_TIME,'RRRR') year,to_char(CREATION_TIME,'MM') month,round(sum(bytes)/1024/1024/1024) gb
  2  from v$datafile group by to_char(CREATION_TIME,'RRRR'),to_char(CREATION_TIME,'MM') order by 1,2;

YEAR MO         GB
---- -- ----------
2011 03        196
2012 08          3
2013 03         94
2013 04          0
2013 08         22
2013 10         32
2014 01         11
2014 02          1

8 rows selected.

SQL>
-----------------------------------------------------
SQL> select name from v$database;

NAME
---------
FSPRD

SQL> select to_char(CREATION_TIME,'RRRR') year,to_char(CREATION_TIME,'MM') month,round(sum(bytes)/1024/1024/1024) gb
  2  from v$datafile group by to_char(CREATION_TIME,'RRRR'),to_char(CREATION_TIME,'MM') order by 1,2;

YEAR MO         GB
---- -- ----------
2009 06        548
2010 01         12
2010 04         15
2010 06         15
2010 09          9
2010 12         42
2011 05         12
2011 09         25
2011 12          6
2012 04         15
2012 05         19

YEAR MO         GB
---- -- ----------
2012 07         83
2012 09          2
2012 10         20
2013 07         28
2013 10        211
2014 01          2

17 rows selected.

SQL>
---------------------------------------------------------
SQL> select name from v$database;

NAME
---------
HRPRD

SQL> select to_char(CREATION_TIME,'RRRR') year,to_char(CREATION_TIME,'MM') month,round(sum(bytes)/1024/1024/1024) gb
  2  from v$datafile group by to_char(CREATION_TIME,'RRRR'),to_char(CREATION_TIME,'MM') order by 1,2;

YEAR MO         GB
---- -- ----------
2009 06        138
2013 05          0
2013 11          0

SQL>

IB issue fix today :-


we need to keep password for gateway which we use for administrator ID in advance properties in Encrypted form.it fixes so much of issue.

Thursday, 7 May 2015

Start the refresh of environment with Back up of Production at particular time.



alter session set nls_date_format='YYYY-MM-DD:HH24:MI:SS';

select * from v$archived_log order by next_time desc

Thursday, 23 April 2015

Get the output files in zip format after running AE or SQR

Get the output files in zip format after running AE or SQR

--------------------------------------------------------------------------------

Global integer Π
 &PI = PSQUERY_AET.PROCESS_INSTANCE;
&query = PSQUERY_AET.QRYNAME;

 SQLExec("SELECT B.URL,A.PRCSOUTPUTDIR from PS_CDM_DIST_NODE B, PS_CDM_LIST A WHERE A.DISTNODENAME = B.DISTNODENAME AND  A.PRCSINSTANCE = :1", &PI, &url, &output);

  REM  The file I want to compress;

&fileNameToZip = &output | "/" | &query | "-" | &PI | ".xls";

&fileout = &output | "/" | &query | "-" | &PI | ".zip";

&filename = &query | "-" | &PI | ".xls";

 REM  The internal zip file's structure -- internal location of file;

&zipInternalPath = &filename;

 Local JavaObject &zip = CreateJavaObject("java.util.zip.ZipOutputStream", CreateJavaObject("java.io.FileOutputStream", &fileout, True));

 Local JavaObject &file = CreateJavaObject("java.io.File", &fileNameToZip);

REM  to read &fileNameToZip into a buffer and write it out to &zip;

Local JavaObject &buf = CreateJavaArray("byte[]", 1024);

 Local number &byteCount;

Local JavaObject &in = CreateJavaObject("java.io.FileInputStream", &fileNameToZip);

 Local JavaObject &zipEntry = CreateJavaObject("java.util.zip.ZipEntry", &zipInternalPath | "/" | &file.getName());

 &zipEntry.setTime(&file.lastModified());

 &zip.putNextEntry(&zipEntry);

 &byteCount = &in.read(&buf);

 While &byteCount > 0

   &zip.write(&buf, 0, &byteCount);

   &byteCount = &in.read(&buf);

End-While;


&in.close();

&zip.flush();

&zip.close();

 &file.delete();

 Local string &MAIL_CC, &MAIL_TO, &MAIL_BCC, &MAIL_SUBJECT, &MAIL_TEXT, &MAIL_FILES, &MAIL_TITLES;

Local number &MAIL_FLAGS;

 &MAIL_FLAGS = 0;

 /* Code new */

Local string &runcntrl_id;

&runcntrl_id = PSQUERY_AET.RUN_CNTL_ID.Value;

&oprid = PSQUERY_AET.OPRID.Value;

If &oprid = "XXXXX" Then

   SQLExec("SELECT EMAIL_LIST FROM PS_UC_RNCTRL_EMAIL where RUNCONTROLID = :1", &runcntrl_id, &MAIL_TO);

Else

   SQLExec("select emailid from PSOPRDEFN where OPRID =:1", &oprid, &MAIL_TO);

End-If;

/* Code new */

&MAIL_CC = "";

&MAIL_BCC = "";

&MAIL_TEXT = &query;

&MAIL_FILES = &fileout;

&MAIL_TITLES = &query | "-" | &PI | ".zip";

&MAIL_SUBJECT = &query;

 &RET = SendMail(&MAIL_FLAGS, &MAIL_TO, &MAIL_CC, &MAIL_BCC, &MAIL_SUBJECT, &MAIL_TEXT, &MAIL_FILES, &MAIL_TITLES);

 If &RET <> 0 Then

   MessageBox(0, "", 0, 0, "Sending Email Failed, Email IDs are  " | &RET);

Else

   MessageBox(0, "", 0, 0, "Succesfuly sent Emails to following Email IDs " | &RET);

End-If;

Sunday, 19 April 2015

Start a missing PSAPPSRV service



Start a missing PSAPPSRV

---------------------------------------------------------
 

XXXX-XXXXX)-<PS_HOME>psadmin.sh

PSADMIN -- Tools Release: 8.18.15
Copyright (c) 1988-2002 PeopleSoft, Inc.  All Rights Reserved.

--------------------------------
PeopleSoft Server Administration
--------------------------------


  1) Application Server
  2) Process Scheduler
  3) Web Components
  q) Quit


Command to execute (1-3, q): 1


--------------------------------------------
PeopleSoft Application Server Administration
--------------------------------------------

  1) Administer a domain
  2) Create a domain
  3) Delete a domain
  q) Quit

Command to execute (1-3, q) : 1


Tuxedo domain list:

  1)  FS
  2)  FS_T1
  3)  FS_T2

Select domain number to administer: 2



--------------------------------
PeopleSoft Domain Administration
--------------------------------
     Domain Name: FS_T1

  1) Boot this domain
  2) Domain shutdown menu
  3) Domain status menu
  4) Configure this domain
  5) TUXEDO command line (tmadmin)
  6) Edit configuration/log files menu
  7) Messaging Server Administration menu
  q) Quit

Command to execute (1-7, q) : 5
Loading command line administration utility ...
tmadmin - Copyright (c) 1996 BEA Systems, Inc.
Portions * Copyright 1986-1997 RSA Data Security, Inc.
All Rights Reserved.
Distributed under license by BEA Systems, Inc.
TUXEDO is a registered trademark.

> psr
Prog Name      Queue Name  Grp Name      ID RqDone Load Done Current Service
---------      ----------  --------      -- ------ --------- ---------------
BBL            58678       XXXX         XXXX  XXXXX(  IDLE )
MISSING ID=1
PSAPPSRV       APPQ        APPSRV         2  89997   4499850 ICPanel
PSAPPSRV       APPQ        APPSRV         3  90392   4519600 ICPanel
PSAPPSRV       APPQ        APPSRV         4  91276   4563800 ICPanel
PSAPPSRV       APPQ        APPSRV         5  90998   4549900 ICPanel
PSAPPSRV       APPQ        APPSRV         6  90386   4519300 ICPanel
PSAPPSRV       APPQ        APPSRV         7  90540   4527000 ICPanel
PSAPPSRV       APPQ        APPSRV         8  91016   4550800 ICPanel
WSL            00001.00020 BASE          20      0         0 (  IDLE )
PSQRYSRV       QRYQ        APPSRV        70      0         0 (  IDLE )
PSQRYSRV       QRYQ        APPSRV        71      0         0 (  IDLE )
PSSAMSRV       SAMQ        APPSRV       100      0         0 (  IDLE )
JSL            00095.00200 JSLGRP       200      0         0 (  IDLE )
JREPSVR        00094.00250 JREPGRP      250     80      4000 (  IDLE )

SELECT OPTION 5
TUXEDO command line (tmadmin) and run below, as it was 1 that missing so I used 1, you can use whatever is missing.

> boot -i 1
INFO: TUXEDO(r) System Release 6.5
INFO: Serial #: 101998665, Expiration NONE, Maxusers 1000000
INFO: Licensed to: PeopleSoft

Booting server processes ...

exec PSAPPSRV -- -C psappsrv.cfg -D FS_T1 -S PSAPPSRV :
        process id=17525 ... Started.
1 process started.

> psr
Prog Name      Queue Name  Grp Name      ID RqDone Load Done Current Service
---------      ----------  --------      -- ------ --------- ---------------
BBL            58678       XXXXX       0 199520   9976000 (  IDLE )
PSAPPSRV       APPQ        APPSRV         1      4       200 ICPanel
PSAPPSRV       APPQ        APPSRV         2  90036   4501800 ICPanel
PSAPPSRV       APPQ        APPSRV         3  90427   4521350 ICPanel
PSAPPSRV       APPQ        APPSRV         4  91318   4565900 ICPanel
PSAPPSRV       APPQ        APPSRV         5  91037   4551850 ICPanel
PSAPPSRV       APPQ        APPSRV         6  90423   4521150 ICPanel
PSAPPSRV       APPQ        APPSRV         7  90579   4528950 ICPanel
PSAPPSRV       APPQ        APPSRV         8  91054   4552700 ICPanel
WSL            00001.00020 BASE          20      0         0 (  IDLE )
PSQRYSRV       QRYQ        APPSRV        70      0         0 (  IDLE )
PSQRYSRV       QRYQ        APPSRV        71      0         0 (  IDLE )
PSSAMSRV       SAMQ        APPSRV       100      0         0 (  IDLE )
JSL            00095.00200 JSLGRP       200      0         0 (  IDLE )
JREPSVR        00094.00250 JREPGRP      250     80      4000 (  IDLE )

> quit


--------------------------------
PeopleSoft Domain Administration
--------------------------------
     Domain Name: FS_T1

  1) Boot this domain
  2) Domain shutdown menu
  3) Domain status menu
  4) Configure this domain
  5) TUXEDO command line (tmadmin)
  6) Edit configuration/log files menu
  7) Messaging Server Administration menu
  q) Quit

Command to execute (1-7, q) :
----------------------------------------------------------

The purge process did not run because the Oprid configured to start the Process Scheduler did not have the required permissions to run the purge process.

  Purge process - Required permissions The PeopleSoft Oprid used to start the Process Scheduler, as defined in the Scheduler's psprcs.cf...