我的網誌清單

20110503

DB-01 起動流程

1.The <SID>adm user is the UNIX(or UNIX-Like) user of the SAP system. This user is used to call the startup script, which is part od the SAP kernel.

2.SAP OS Collector(saposcol)先被啟動, 且一台機器只會起動一個, 就算此機器上裝有二套以上的SAP軟體一樣只起動一個.

3.再來系統會用R3trans 這個指令去判斷DB是否有起動, 若沒有起動, 則呼叫startdb這個script去起動DB; 但若DB是裝在另一台主機上, 則需先起動DB, 否則DB起動的測試會fail, 起動流程就會被終止.(單獨起動DB指令, 可用 sapstart db 或 startdb)

4.確認DB起動后, 則會呼叫sapstart 去起動SAP, 此程式會去讀start profile(/sapmnt/<SID>/profile) 起動instance.
--The sapstart process is the parnet process of all service processes(syslog, Message Server, and Dispatche), and it must run during the entire duration of the system operation, as a termination of this process automatically terminates the SAP instance as well.

5.The start profile contains the components and services to be started:
--In a central instance, the following services are started: Message Server, Dispatcher, Collector, Sender, and Gateway Server.
--In a dialog instance, the following services are started: Dispatcher, Sender, and Gateway Server.

6.Dispatcher 會去讀default及instance profile 然后起動他們各自的kernel processes(dialog, background, spool 等等)
--Work process always consists of establishing the connection to the DB. For this purpose, the work process receives the connection data to the DB server from the SAP DEFAULT profile(or rather, it inherits this data from the Dispatcher). After that, it starts the db_connect function. Then, the work process connects to the Oracle Listener and authenticates itself in the DB.
--only the work processes  connect to the DB, not the Disapatcher, the ICM, or any other  process of an SAP instance.
--Once the connection has been established, the Listener starts an Oracle shadow process and passes the connection with the SAP work processes on the shadow process. Then the shadow process "become an orphan" and is attached to the central UNIX process, init(PID=1), like the BGD(background process). The Listener is always connected to the PMON processfrom which it receives information on the DB.
--Once the shadow process has started, the SAP work process completes the connection setup. Form that point onward the work porcess(that is, its DB interface) and the shadow process are linked to eatch other via a TCP/IP connectiion. Then, the WP(work process) carries out additional internal startup steps, such as building up the memory and carrying out connection tests.

7.Once the individual work processes have started, the processes connetc to the Oracle DB and the system is “online”.

8.取得SAP wp及Oracle process 之間的關係
select a.spid, b.process, b.program, b.schemaname, b.osuser from v$process a, v$session b where a.addr=b.paddr;
(spid=pid of the Oracle process, Process = pid of the SAP work process)

 

99

沒有留言:

張貼留言