This Site Create for Help Tech guys in Issues and fixes in Linux SAP and Oracle.

Search This Blog

Powered by Blogger.

Create Client in SAP

First Create Client via SCC4 THEN COPY Client via SCCL profile SAP_CUST After copy login into Client 000 and export default users t...

Create Client in SAP



First Create Client via SCC4

THEN COPY Client via SCCL profile SAP_CUST
After copy login into Client 000 and export default users tcode scc8 create transport
Via selecting profiles “ USERS” then import that transport via stms_import
Then login into new client and import transport via tcode SCC7
.

User Locked in SAP


Lock user (unlock)

lock - is  a record in the field  uflag, "0" - the user is not locked,

To Unlock - need to switch field  uflag to "0":

Locked
SQL> select uflag from sapsr3.usr02 where mandt='000' and bname='SAP*';

     UFLAG
----------
       128
Not locked:
SQL> select uflag from sapsr3.usr02 where mandt='431' and bname='USERNAME';

     UFLAG
----------
         0
Unlocking:
SQL> update sapsr3.usr02 set uflag='0' where mandt='000' and bname='DDIC';

1 row updated.

SQL> commit work;




UNLOCK your self
update sapr3.usr02 set uflag='0' where mandt='830' and bname='USER'; 
commit work;

RESET PASSWORD PROCESS:

SQL> select bcode, passcode from sapsr3.usr02 where mandt='000' and bname= 'DDIC';

BCODE            PASSCODE
---------------- ----------------------------------------
EF82F150AB6136BF 6BBFC576AC43020521E2206DBC1A0421A43E91C4

SQL> update sapsr3.usr02 set bcode='11FAF9DD879FE537',
passcode='ECB96161D5BDA8E04CE52AC886DEF5CD318869AE' where mandt='000' and bname='DDIC';

IF DATE EXPIRED:

SQL> select PWDCHGDATE from sapr3.usr02 where mandt='830' and bname='USERNAME';

PWDCHGDATE
------------------------
20190227

SQL> update sapr3.usr02 set PWDCHGDATE='20190728' where mandt='830' and bname='USERNAME';

1 row updated.


Pull Oracle Tablespace Size


select owner, table_name, round((num_rows*avg_row_len)/1024) "Size in KB" from All_tables where owner = 'SAPR3' order by "Size in KB" desc;


SELECT DS.TABLESPACE_NAME, SEGMENT_NAME, ROUND(SUM(DS.BYTES) / 1024) "SIZE in KB"
  FROM DBA_SEGMENTS DS
  WHERE SEGMENT_NAME IN (SELECT TABLE_NAME FROM ALL_TABLES where OWNER='SAPR3')
 GROUP BY DS.TABLESPACE_NAME,
       SEGMENT_NAME;


Use VNC on Tunnel Linux



Please follow below documents to take VNC Session. You need to run highlighted command with Yellow on servers.

  • Need a vnc-server installed;  it’s tigervnc-server for RHEL7
  • Team will start VNC server process(es) as desired
    • May be one “shared” session for particular/common account to be used across timezones/globe
    • May be one per actual user (A vs. B)
    • Vncserver starts using ports at 5901, but user could specify any port number, even one in their 10,000 list of port exceptions for EIP
  • Team must launch vncserver with the -localhost directive
    • This prevents from binding to any network interface other than localhost
    • Forces them to use an SSH tunnel to access the VNC server
  • No firewall rules for any of the vnc ports, aka 5901…must be over SSH tunnel
  • Any other VNC configuration is on the DBAs; is not a root managed daemon that is started on boot

vncserver -autokill -IdleTimeout 900 -localhost

    • VNC SSH Tunnel on local computer (5901 is only an example. It may be 5902 or higher, depending on different factors.)
ssh -L 5901:localhost:5901 -N -f -l $DOMAIN\\$USER $SERVER


Check User in Locked in AD Domain via Linux


[root@XXXXX ~]# /opt/pbis/bin/find-user-by-name --level 2 username
User info (Level-2):
====================
Name:                         username
SID:                          S-1-5-21-1960408961-1844823847-1417001333-122211
UPN:                          username@xyz.COM
Generated UPN:                NO
DN:                           CN=xx\,XXX,OU=XX,OU=XXX,OU=01_Users,DC=aXXX,DC=ixyz,DC=com
Uid:                          1971859108
Gid:                          1972229393
Gecos:                        <null>
Shell:                        /bin/bash
Home dir:                     /home/Domain/username
LMHash length:                0
NTHash length:                0
Local User:                   NO
Account disabled (or locked): FALSE
Account expired:              FALSE
Password never expires:       FALSE
Password expired:             FALSE
Prompt for password change:   YES
User can change password:     YES
Days till password expires:   6
Logon restriction:            NO



Expected archived log not found


Error : - RMAN-06059: expected archived log not found, loss of archived log compromises recoverability


RMAN>CHANGE ARCHIVELOG ALL VALIDATE;

RMAN> CROSSCHECK ARCHIVELOG ALL;
wait