Showing posts with label sap-star. Show all posts
Showing posts with label sap-star. Show all posts

To Change Oracle database archive log mode

To Change Oracle database archive log mode

To check archive log mode of Oracle Database trigger the following command
in SQL Prompt.

SQL> select log_mode from v$database;

1) Turn Archive Log Mode ON:

Login to Database host
SQL> sqlplus "/as sysdba"
SQL> shutdown immediate
SQL> startup mount
SQL> alter database archivelog;
SQL> alter database open;

2) Turning OFF Archive Log Mode:

SQL> shutdown immediate
SQL> startup mount;
SQL> alter database noarchivelog;
SQL> alter database open;

SLD or SAP System Landscape Directory Basics

What is SLD?
SLD is the acronym of “System Landscape Directory» - Is a Java Application running
in all the Sap Java Systems - Is used like Central Information repository of all your
system Landscape - SLD use the Common Information Model (CIM), this is a
standard object oriented modeling DB.

Who use SLD?
SLD is used by:
- Process Integration.
PI/XI use SLD like the repository of all the Business Systems definitions, without this service PI/XI doesn’t run.
- Solution Manager
SM Read the Information from the SLD and refresh the technical definition on SMSY.
- Portal
Used by the JCO Destination.
- NWDI
Identify the role of the system and the Name reservation
- .SLM
Software Lifecycle Management is the tool provide by SAP to make the pacification of you Landscape.
- NWA
In SLD you can create Groups used by NWA to administrate more efficiently the Landscape.
- ACC
To know all the Systems in your Landscape.

SLD Strategy
The strategy for the SLD is very important, you need to decide in witch way you want administrate the SLD Information, there are several way and key
points(Important, Version, Etc) - You can check in
https://www.sdn.sap.com/irj/sdn/nw-sld the SLD paper to develop your strategy.
(My recommendation is read the Planing Guide for SLD).

Access to the SLD
To access to the SLD you can run the transaction SLDHTMLGUI or Goto
http://:500/SLD

Create Landscape
The Landscape definition are used by different applications, Is the best way to
group your systems to Administrate better - You can create Landscape to:
- Administration
which is created for administration purposes, for example, for common
monitoring.
- General
which can contain all types of application systems.
- NWDI Systems
that contains servers of the NWDI
- Scenario
is created for a specific business scenario - Scenario landscapes are used in the Software
Lifecycle Manager of SAP Netweaver.
- Transport
is created for transport purposes - For example, all SAP Web AS systems that are connected by an
ABAP transport path distributing the ABAP development.
- Web Service
is created to collect systems offering Web services and their clients - The hierarchy of these
landscapes defines the Web service that is most appropriate for a given client.
click in “New Landscape”
Complete with the Name and Landscape Type and Create
You can add new Systems to this landscape clicking in “Add System to
Landscape..”.

Create Technical System
Is recommendable to create the System in Automatic way using RZ70 in Abap, SLD
Data Supplier in Java or sldreg in other instances types. If you want you to create manually you need to go to SLD main Screen and click in Technical System.

  • Click in New Technical System.
  • Complete with the System Name and Hostname
  • Select the Installed Product and the Software component and then click in Finish button.
  • Now you can see the System in defined in the technical Systems Screen.

Commonly Used Oracle Database Command

1) Unlocking User Account in Oracle

SQL> Alter user account unlock;

Note: in the above command needs to be substituted by the user account you want to unlock.

2)Adding Datafile to tablespace from Oracle.

SQL> ALTER TABLESPACE ADD DATAFILE ''
SIZE 5000M REUSE AUTOEXTEND ON NEXT 20M MAXSIZE 10000M;

= Tablespace name in CAPS
= Destination of datafile (Ex: /oracle/PRD/sapdata1/data_7/..)
Note: Data file added through oracle should be in correct sequence to previous one.

Also You can use BRTOOLS to do the same.

3) To Find all the datafiles of a tablespace / list of datafiles for tablespace:

SQL> select file_name from dba_data_files where tablespace_name='';

4) To get the number of active sessions in Oracle

SQL> select count(*) from v$session where status ='ACTIVE';
or
SQL> select count(*) from v$session;

5) Following command gives you the size of oracle database in GB

SQL> Select sum(bytes)/1024/1024/1024 from dba_data_files;

Error in SAPINST Service marked for deletion on Windows

Symptom: While doing refresh on Windows using SAPINST you get the following error:
"Service marked for deletion"

Solution: This happens as SAPINST tries to delete the existing SAP Service from services.msc and create a new one with same name. Please follow the procedure below to resolve this.

GOTO run and type regedit

1. Stop the service you want to remove

2. Find the registry entry:

HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services

4. Find the service name there and delete it.

Also you can run sc delete from cmd

Note: Please be careful while handling Microsoft registry as it can cause non-reverse-able damage to your system.

Then restart SAPINST and continue old installation



Unlocking SAP* in ABAP if no other user exists or locked

Reason: If all the administrative users are locked and if no other user has access then you have to unlock SAP* to be able to login to SAP.

Solution:

First insert the following parameter in Instance Profile:
login/no_automatic_user_sapstar = 0

Restart SAP Only.

Then login to Oracle and execute the following commands:

SQL> Delete from .usr02 where bname = 'SAP*' and mandt = '***';
SQL> Commit;

Note: Please substitute mandt=*** with the client number and with actual schema.
Example: So the command would look like this if SAPSHEMA is SAPSR3 and Client you want to unlock SAP* is 400
SQL> Delete from sapsr3.usr02 where bname = 'SAP*' and mandt = '400';

Common Refresh Errors while doing ABAP and JAVA Backup/Restore Procedure

1) When running SAPINST for DB Installation you encounter following error:
Error:
FCO-00011 The step checkForLoadType with step key |NW_Java_DB|ind|ind|ind|ind|0|0|NW_CreateDBandLoad|ind|ind|ind|ind|9|0|NW_CreateDB
|ind|ind|ind|ind|0|0|NW_OraDBCheck|ind|ind|ind|ind|0|0|checkForLoadType was executed with status ERROR.

Solution:
Edit the control.xml in the installation directory:
Search for "update ORACHECK_PAR" and delete the row "row.createDb = false;" underneath.

This error happens typically when using Homogenous Backup/Restore Procedure in SAPINST.

Then restart SAPINST with old options.

Also SAP Note 970518 might help you

Mass User Creation in SAP

Requirement: Need to create multiple users in SAP
Creating multiple users can be a hectic tasks specially when you have to create multiple users with same roles

Procedure:

Enter Transaction SU10 in SAP
Enter all the users in the table below
Press Create Button
Enter User Type --> Dialog
Depending on the requirement fill out the other details
Goto Roles tab and enter the roles required (Please note that same roles will be given to all the users)
Based on the requirement you can also assign profiles / groups
Then Press Save

Result: You have created mass users with same role.

Note: All the users are assigned random system generated password which can be viewed in log which is in the screen after you save.

How to configure Transport Domain Controller

To configure a system as the transport domain controller (and thereby configure a new transport domain):


  1. Log on in client 000 using super user or user with Transport Domain Adminitration authorization in the SAP System that you want to configure as the transport domain controller.
  2. Enter Transaction STMS. The dialog box TMS: Configure Transport Domain appears. (This dialog box only appears if you have not yet configured a transport domain.)
  3. If you have already configured TMS then goto Utilities --> Delete TMS Configuration
  4. Enter the name and a short description of the transport domain.
  5. The name of the transport domain may not contain blank characters. You cannot change the name of the transport domain afterwards without reconfiguring the domain controller and thereby the entire transport domain.
  6. If your SAP System consists of multiple application servers, you can choose one server for the TMS.
  7. Save your entries. The following actions are performed automatically in your SAP System:
  • The user TMSADM is created.
  • The RFC destinations required for the TMS are generated.
  • The TMS configuration is stored in the transport directory.
  • The transport profile for the transport control program tp is generated.
  • The SAP System is configured as a single system.

First system in Transport Domain is always the Transport Domain Controller. However you can still
change once you add any more systems. This should be decided based on the availibility and security
of the system.