November 20, 2017

How to granted permission for users of SAP Content Server

Before trying to connect SAP to the Content Server and to create Content Repositories it is worth performing the windows server tasks that will prevent SAP from connecting and creating the Content Repositories. 

1. Adding IIS in windows server 2008

a). Click on Server Management



b). Right‐click over 'Roles' and select 'Add Roles'


c). Skip over the introduction page if shown. In Server Roles select 'Web Server (IIS)' and click on 'Next >'


d). Click 'Next >' over the introduction page


e). Select the additional standard select roles, add the 'Application Development' and 'IIS 6 Management Compatibility', then click on the 'Next >' button  





f). Click on the 'Install' button to install IIS


g). Installation should be successfully completed with the message below, click on 'Close' to finish  




2. Edit the permissions for the users of the SAP_Content_Server to allow 'Full Control'. 

a). Open Server Manager and expanding 'Roles' and 'Web Server (IIS)' to highlight 'Internet Information Services'. In the 'Connections' pane right click over 'SAP_Content_Server' and select 'Edit Permissions' 



b). Select the 'Security' tab and click on 'Edit' to change the permissions 



c). Select 'Users' and check 'Full Control' and click 'OK'


d). Allow ISAPI restrictions for the ContentServer.dll. In the 'Connections' pane highlight the server and then in the main window double click on 'ISAPI and CGI Restrictions'


e). The Window will display the restrictions in place. Ensure that the ContentServer.dll is 'allowed'. Highlight the ContentServer.dll entry and right click over and select 'Edit Feature Settings'  



f). Check 'Allow unspecified ISAPI modules' and click OK


g). Restart IIS server by highlighting the server in the 'Connections' pane right click and selecting 'Stop'


h). And starting by doing the same again but selecting 'Start'


i). Enable the Content Server to be used as a Network Service. See SAP Note 658442. From the command prompt enter the following;
Change directory so that you are in the 'C:\Program Files\SAP\Content Server'. At the prompt line enter;  

Icacls * /grant NETWORKSERVICE:F 



j). Referencing SAP note 851146, from the command prompt run, go the directory 'C:\sapdb\programs\pgm'. Enter the following;  

Icacls sql*.dll /grant NETWORKSERVICE:F 


k). Referencing check note 301352 in the directory 'C:\sapdb\programs\pgm' run the following command  

odbcreg LiveCache –i –p C:\sapdb\programs\pgm 



How to make connection to SAP R/3 from SAP Content Server

Make the Connection to SAP R/3 from Content Server

1. Use transaction OAC0 and select create


Add details as shown below, note the basic path is the file path of the content repository data volume SAP directory 

2. Now select ‘CS Admin’ button, the screen will take you to the create content repository input screen. Select the 'Execute' button  


You will be prompted for a user id and password which you will have to enter windows 2008 server user id and password you used for the install of Content Server. For my installation I used the administrator id and password (this is the windows logon password)

When done repeat the creation of the Content Repository. When it is created it will look like below
  


3. Then click onto the 'Certificates' tab and click on the 'Send Certificate' icon as shown below  



4. The certificate will be sent back. Select/highlight the certificate as shown below and click on the 'Enable' button  


The certificate will be enabled as seen below 


The installation of the Content Server is complete. By selecting the overview tab the repository can be seen running  



Troubleshooting

In testing the installation the following errors occurred and the resolution of each error is detailed in this document.
1. Cannot run sapinst.exe ‐ Java needs to be installed, e.g. Java JRE6, search on the web for download Java Runtime.
2. In opening CSADMIN in SAP I get a http 401 error. This is a security error with the Windows Server Firewall resolved.
3. In SAP using CSADMIN when connecting or creating the user id and password I am asked for is not recognised. Suggestion user the local administrator user id for the Windows Server the Content Server resides on. If this does not work use the servername\administrator_userid in the user id box and enter the password.
4. In SAP using CSADMIN when creating the Content Repository, using the create tab, a http 500 error appears, Please refer to SAPnote 658442, 851146 and 301352
  

November 10, 2017

How to Check SAP Content Server is Running

Open a Web Browser and enter the following address;

http:\\servername:1090\ContentServer\ContentServer.dll?serverInfo

replacing server name with the name of your server Content Server has been installed on.

A response below will show that the Content Server is running.
 




It is worth trying this on the server and remotely on your desktop as the connection from your desktop my not work due to the firewall in Windows 2008 Server on your server.  

If the firewall is blocking the Content Server from responding, create a inbound firewall rule for Content Server using TCP for the Content Server port, please follow steps on below for resolve . Then try the url above to see if the Content Server is responding remotely.  

Resolve Content Server was blocking by Firewall :

1) In 'Administrative Tools' open 'Windows Firewall with Advanced Security'


2) Right click over 'Inbound Rules' and select 'New Rule...'


3) In the Rule Wizard select 'Port' and click on 'Next'


4) Enter the port number you set for the Content Server, the default port is 1090, and click 'Next'

 
5) Select 'Allow the connection' and click 'Next'


6) Select the Profile for your network and click on 'Next'


7) Enter the name of rule, e.g. 'Content Server' and click on 'Finish'

March 02, 2017

How to Check DB2 database on SAP Level

We can check the database on SAP level with tcode DB02 or DBACOCKPIT and navigate to space -> Space Overview to view
  • Database Name
  • Database System
  • Size
  • Free Size
  • Used Percentage
  • Number of Tablespaces
  • Number of Container Tablespaces

In DB02 or DBACOCKPIT, navigate to space -> space overview to find all on below details

Database Name and Database System



 

Total Size of Database, Free size and Used Percentage of Database



 In DB02 or DBACOCKPIT, navigate to tablespaces -> tablespaces overview to find all on below details

Total Size of Tablespaces, Free size and Used Percentage of Tablespaces


Tablespaces content name
 In DB02 or DBACOCKPIT, navigate to Containers -> containers overview to find all on below details
List Containers of tablespaces

How to reallocate and rename a datafile on SAP oracle

The Condition if we want to reallocate and rename a datafile oracle :

a. We have created a datafile on the wrong filesystem or drive.
b. We have created a datafile where a hidden character or a linefeed was introduced by by accident.
c. We add a new filesystem(s), drive(s) to the system and want to redistribute the datafiles.
d. We restore some datafiles to a new location because the original is not available any more ( media error )

Before setting offline any tablespace, be sure that all datafiles of the tablespace are ONLINE.

For example, use the following command:

Login to SQL from the user <oraSID>

Erppi1# su orapi1
erppi1:orapi1 54>
erppi1:orapi1 53> sqlplus / as sysdba
SQL>
SQL> SELECT vtbs.name, vdf.status, count(*) cnt FROM  v$datafile vdf, v$tablespace vtbs WHERE  vdf.TS#=vtbs.TS# AND vtbs.name = '<tablespace_name>' GROUP BY vtbs.name, vdf.status;

There are several options to perform this condition:

Option 1) 

Connect to the open database:
Login to SQL from the user <oraSID>

Erppi1# su orapi1
erppi1:orapi1 54>
erppi1:orapi1 53> sqlplus / as sysdba

Take the tablespace offline:
SQL> ALTER TABLESPACE <NAME> OFFLINE;

Copy the datafiles to the new location by using OS commands manually: 
Compare the size of the two files, they have to be the same

Update the new datafile location with one of this commands:
SQL> ALTER DATABASE RENAME FILE '<old>' TO '<new>';
SQL> ALTER TABLESPACE <NAME> RENAME DATAFILE '<old>' TO '<new>';

Bring the tablespace online with the command:
SQL> ALTER TABLESPACE <NAME> ONLINE;

Remove at OS level the original file.

You cannot use this method for the SYSTEM tablespace.


Option 2)

Stop the database:
Login to SQL from the user <oraSID>

Erppi1# su orapi1
erppi1:orapi1 54>
erppi1:orapi1 53> sqlplus / as sysdba
SQL>
SQL> shutdown immediate;

Copy the datafiles to the new location by using OS commands manually: 

Compare the size of the two files, they have to be the same

Mount the database:
Login to SQL from the user <oraSID>

Erppi1# su orapi1
erppi1:orapi1 54>
erppi1:orapi1 53> sqlplus / as sysdba
SQL>
SQL> startup mount;

Update the new datafile location:
Login to SQL from the user <oraSID>

Erppi1# su orapi1
erppi1:orapi1 54>
erppi1:orapi1 53> sqlplus / as sysdba
SQL>
SQL> ALTER DATABASE RENAME FILE '<old>' TO '<new>';

Open the database:
Login to SQL from the user <oraSID>

Erppi1# su orapi1
erppi1:orapi1 54>
erppi1:orapi1 53> sqlplus / as sysdba
SQL>
SQL> ALTER DATABASE OPEN;

Remove at OS level the original file.


Option 3)

This option is useful when you can not type the name due to the linefeed or hidden character.

Make a trace file:
Login to SQL from the user <oraSID>

Erppi1# su orapi1
erppi1:orapi1 54>
erppi1:orapi1 53> sqlplus / as sysdba
SQL>

SQL> ALTER DATABASE BACKUP CONTROLFILE TO TRACE;

Modify datafile pointers in the tracefile generated above to reflect the changes and rename the file so the extension is "sql".

Stop the database:
Login to SQL from the user <oraSID>

Erppi1# su orapi1
erppi1:orapi1 54>

erppi1:orapi1 53> sqlplus / as sysdba
SQL>
SQL> shutdown immediate;

Copy the datafiles to the new location by using OS commands manually: 

Compare the size of the two files, they have to be the same

Run the script created before:
Login to SQL from the user <oraSID>

Erppi1# su orapi1
erppi1:orapi1 54>

erppi1:orapi1 53> sqlplus / as sysdba
SQL>
SQL> @filename.sql

Remove at OS level the original file.


Option 4)

Oracle 12c includes an enhancement to the ALTER DATABASE command to allow datafiles to be moved online: 
Login to SQL from the user <oraSID>

Erppi1# su orapi1
erppi1:orapi1 54>


erppi1:orapi1 53> sqlplus / as sysdba
SQL>
SQL> ALTER DATABASE MOVE DATAFILE ('<old>') TO ('<new>') [REUSE] [KEEP];

The REUSE keyword indicates the new file should be created even if it already exists.
The KEEP keyword indicates the original copy of the datafile should be retained.

This option is also available in the BRSPACE tool (function "dfmove" option "-o yes").

NOTE: BEFORE making any structural changes to a database, such as renaming and relocating the datafiles of one or more tablespaces, always completely backup the database. AFTER making any structural changes to a database, always perform an immediate and complete backup.

Difference between PFILE and SPFILE in Oracle

A PFILE is a static, client side text file. This file normally resides on the server. However in case you would like to start oracle from a remote machine, you will need a local copy of the PFILE in that machine.


This file can be edited with a standard text editor like notepad or vi editor. This file will be commonly referred as INIT.ORA file.


SPFILE (Server parameter file) is a persistent server side binary file. SPFILE should only be modified through “ALTER SYSTEM SET” command . Editing an SPFILE directly will corrupt the file and the start up of the database or instance will not be possible.

As SPFILe is a server side binary file,  local copy of the PFILE is not required to start oracle from a remote machine. 



Advantages of SPFILE compared to PFILE

  • A SPFILE doesnot need a local copy of  the pfile to start  oracle from a remote machine.  Thus eliminates configuration problems.

  • SPFILE  is a binary file and modications to that can only be done through ALTER SYSTEM SET command.

  • As SPFILE is maintained by the server, human errors can be eliminated as the parameters are checked before modification in SPFILE

  • It is easy  to locate SPFILE as it is stored in a central location

  • Changes to the parameters in SPFILE will take immediate effect without restart of the instance i.e Dynamic change of parameters is possible


  • SPFILE can be backed up by RMAN

Difference between PFILE and SPFILE in Oracle :


Query to findout, if database is running with PFILE or SPFILE

Goto SQL prompt and execute the following command to figure out if database is started with a PFILE or SPFILE.


SQL > SELECT DECODE(value, NULL, ‘PFILE’, ‘SPFILE’) “Init File” FROM sys.v_$parameter WHERE name = ‘spfile’;