顯示具有 SAP BASIS 標籤的文章。 顯示所有文章
顯示具有 SAP BASIS 標籤的文章。 顯示所有文章

2020年6月12日 星期五

SAP - Client Copy – Local, Remote, Import/Export


Client Copy

用SCC4可以創建一個空的client,但要如何填入資料到這個client 則必須使用 "client copy"

Client copy means "transferring client specific data" within the same instance(SID) 或 between different instances(SID).

Client copy can be performed with three different methods :
  • Local client copy: Copy client within the same instance (SID). T-code SCCL
  • Remote client copy: Copy client between different instances(SID). T-code SCC9
  • Client Import/Export: Copy client between different instances(SID). T-code SCC8

前置作業

為避免資料不一致的狀況,在開始進行client copy之前
1) Disconnect and lock business users(SU10). End the session of active users (SM04). 
2) Suspend all background jobs
Execute SE38 --> Fill program name with "BTCTRNS1" --> Execute
3) Target system 必須有足夠的表空間. (DB02)
4) 為避免不一致的狀況,在做client copy 時,最好不要有使用者連接到source client進行作業
5) rdisp/max_wprun_time parameter should be changed to 2000 second as a SAP recommendation . 雖然指定使用parallel processes and schedule job in the background, dialog processes 不會被使用.


Local Client Copy (T-CODE SCCL)

Scenario:
Source Instance & client --> QASCL000
Target Instance & client --> QASCL801

Step 1) 創建 new target client using SCC4. client 801 in QAS system. Log on this client (QASCL801) with user SAP*
Step 2) T-Code SCCL.
Select desired profile
Enter Source client
Enter Description
Step 3) 預設 Client Copy 執行時是single process. 分配 workload to parallel processes 可以縮短 copy client的時間
Select Goto from the menubar. Select Parallel Process.
Step 4) Schedule as background job.
Step 5) 用SCC3來查看client copy 的日誌. Status - "Successfully Completed" means client copy is completed.


Remote Client Copy(T-CODE SCC9)

Scenario:
Source Instance & client --> DEVCL101
Target Instance & client --> QASCL202

Step 1) 登入target system. 創建 new target client using SCC4. client 202 in QAS system. Log on this new client (QASCL202) with user SAP*
Step 2) T-Code SCC9.
Step 3) Fill the basic details as requirement.
Step 4) 預設 Client Copy 執行時是single process. 分配 workload to parallel processes 可以縮短 copy client的時間
Select Goto from the menubar. Select Parallel Process.
Step 5) Schedule the client copy in background
Step 6) 用SCC3來查看client copy 的日誌. Status - "Successfully Completed" means client copy is completed.

Client Import/Export

對容量較大的database, 建議使用 client import/export 替代 remote client copy.
Scenario:
Source Instance & client --> PRDCL300
Target Instance & client --> QASCL202
This technique always starts with client export step.
Note: 必須先確認/usr/sap/trans file system 有足夠的空間來進行the client export.

How to export client?

Step 1) 登入target system. 創建 new target client using SCC4. client 202 in QAS system. 
Step 2) 開始做export. Export 是將 data files and co-files 從 source system's database 傳送到 target system's import buffer.
Log on to the source system/source client(PRD). Execute T-code SCC8.
Step 3) Select profile Choose target system.
Step 4) Schedule the export in background
Step 5) 當工作開始執行, data files and co-files of profiles from PRD system's database 傳送到 QAS system's import buffer. 
Once we will import request in QAS only then it will be reflected in a database of QAS system.

Depending on the chosen export profile there can be up to 3 transport requests created:

Request PRDKO00175 will hold the cross-client data,
Request PRDKT00175 will hold the client dependent data,
Request PRDKX00175 will also hold some client dependent data.


如何 import the client? 

Step 1) 登入新創建的 target client(QASCL202) using SAP*.
Step 2) T-Code: STMS_IMPORT
選擇由client export 產生的 transport requests. Import theses transport requests on the target client.
The transport requests should be imported 依下列順序:
Request PRDKO00175
Request PRDKT00175
Request PRDKX00175
系統會自動偵測到先前執行的client export transport requests and 自動做 import of the 3 requests.
The import logs 可以在 STMS_IMPORT 中觀察
Step 3) Post import phase: 當import完成後, 執行SCC7 來進行 post client import actions. Schedule the post import job in background.
Step 4) 用SCC3來查看Import log. The Client is successfully imported.

2020年6月11日 星期四

SAP - What is Client? How to create a new client


 

What is a SAP Client?

Client = A Customer. 在SAP裡面,我們可以想成每一個customer 對應到一個client. 在一個SAP instance內, 可以創建一個或多個clients,而不需要安裝多套SAP軟體給每個客戶專用. 這提供了隔離,一個client 無法看到其他client的資料。  

What does client contain?
Application Data - Application data is the data that are stored in the database tables.
Customizing Data - Customizing data is data created by customers when they customize their systems
User Master Record - A user master record defines the authorizations assigned to a user. Basis consultants are responsible for maintaining the user master record and assigning authorizations.

SAP comes with three "standard clients": 
000 Client: We can find this clients in the system as soon as we install SAP r/3 software. This is called master client. Client 000 contains a simple organizational structure of a test company and includes parameters for all applications, standard settings, and configurations for the control of standard transactions and examples to be used in many different profiles of the business applications. It contains client independent data.

001 Client: This clients is a copy of the 000 client including the test company. This client's settings are client-independent if it is configured or customized. People normally use 001 clients to create a new client.

066 Client: This client is called early watch client. The SAP earlywatch alert is a diagnosis service, for solution monitoring of SAP and non-SAP systems in the SAP Solution Manager. Alert may contain Performance issue, average response time, current system load, Database administration,etc..



How to create a new client?

從理論上講,我們可以創建000到999個客戶。但是要維護如此大量的客戶就成為了一個挑戰。
Step 1) Execute T-Code SCC4

Step 2) Click New Entry to make a new SAP Client

Step 3) 
1. 輸入client基本資料
Client number & description
City to which client Belongs (例 Amesterdam)
Logical system may be <SID>CLNT<Client Number> (例 QASCL800)
Std Currency may be (例 TWD)
Client roles may be Test, Customizing, Demo, Training/Education, Production, etc..
2. 視需求輸入client specific data and set permission for the clients
3. Save
4. Press F3 to come back to SCC4

Step 4) New client will be there in the list

SAP - What is SAP Instance and SID, Configure SAP GUI



What is an Instance?

SAP instance is a group of resources ....
  • Memory
  • Work Processes
  • Dispatcher
  • Gateway

3種類instances
  • Dialog instance
  • Central Instance
  • Database Instance

SAP System= Dialog Instance + Central Instance + Database Instance.


Configure SAP GUI

Step 1) Click on 新增 button
Step 2) Fill the Server details
  • 連線類型 Connection Type: 自訂應用程式伺服器 Custom Application Server
  • 說明 Description: - Name of instance
  • 應用程式伺服器 Application Server: - IP address of remote application server
  • 事例號碼 Instance number: which you can find from os level (Unix) Goto /usr/sap/sid/DVEBGMS00 Here instance number = 00
  • System ID: - As per you setting which you have specified during installation time.

2019年10月25日 星期五

SAP - Profile Administration (transaction RZ10) 參數設定










SAP建議使用事務T-CODE RZ10調整SAP配置文件。 但是,例如,如果由於錯誤的配置而無法再啟動SAP系統,則可以在文件系統級別上更改相應文件中的SAP參數。


下方例子
1. 修改參數 login/min_password_lng
2. 新增參數 login/min_password_digits

When using the helper file, remember to reload the profiles with transaction RZ10 afterwards! Utilities → Import profiles → Of active servers
a) First look up the current values of the profile parameters you want to change. Go to transaction RZ11 and enter the Param. Name, for example login/min_password_lng. Choose Display. Note the Current value. Repeat this for the other parameters you want to change.
b) To change the parameters in the SAP system, go to transaction RZ10. By using the F4 help select DEFAULT as Profile, select Extended Maintenance and choose Change.
c) To change an already existing parameter, for example login/min_password_lng, simply click into this row and choose Change
d) Enter the new value in the Parameter val. field, for example 8. Choose Copy and Back.
e) To add a new parameter choose Create. Enter the Parameter name, for example login/min_password_digits. Enter the Parameter val., for example 1. Choose Copy twice and Back.
f) In the parameter list choose Copy and Back.
g) Choose Save and in the popup choose No. In the Activate profile popup choose Yes. Then Continue twice.
h) Now restart your SAP system. First stop the Dialog Instance and afterwards the Central Instance. Start in the opposite order. Log on to operating system level of your SAP system and double click the desktop shortcut SAP Management Console. In the new window right click on one instance of your system and choose Stop. After it is stopped, right click and choose Start.
i) After the system is started again, log on and change your password in transaction SU3. If you set parameter login/password_compliance_to_current_ policy to 1 you may need to change your password directly after logging on. Try to violate any parameter you set. You successfully changed some password parameters of your AS ABAP based SAP system.



login/min_password_diff = 3
--Defines the minimum number of characters that must be different in the new password compared to the old password.

login/password_expiration_time = 90
#login/password_expiration_time 密碼有效期
#Default: 0
#Permissible values: 0 - 1000

login/min_password_lng = 6
--Default: 6
--Permissible values: 3 - 40
--Defines the minimum length of the password.

login/failed_user_auto_unlock = 0
--Defines whether user locks due to unsuccessful logon attempts are automatically removed at midnight.

login/no_automatic_user_sapstar = 0
--login/no_automatic_user_sapstar 用戶SAP* 能不能登錄, 0代表SAP*可以登錄,1代表SAP*不能登陸!


login/fails_to_user_lock = 6
--login/fails_to_user_lock 密碼輸錯多少次後鎖定

login/min_password_letters = 2
--Defines the minimum number of letters (A-Z) in passwords.

login/min_password_digits = 2
--Defines the minimum number of digits (0-9) in passwords.

login/system_client = 800
--login/system_client 登錄時默認的Client號