How To Start And Stop Sap System In Windows Command
In this weblog post, we'll discuss starting, stopping, and restarting an instance of SAP HANA. You can start and cease the SAP HANA instance via the command line and with SAP HANA Studio; nosotros describe both methods in the showtime two sections. The SAP documentation vaguely mentions that it's also possible to practise with the SAP HANA cockpit, merely this doesn't announced to be true at this time. By default, starting the SAP HANA example also starts the tenant databases, but it'southward of form likewise possible to showtime and finish them individually. You tin also disable the automatic startup for one or more tenants. Nosotros cover these subjects later on on past showing how you lot can check the electric current condition of the instance and the tenant databases, and in the last section we have a closer await at the SAP start service process. The commands to start and stop an SAP HANA instance are operations implemented as options of the HDB command, as shown here: These commands run in the foreground; that is, the server session remains blocked until the process finishes. If you want to do other things, such as monitoring the trace files, during startup or shutdown, then yous must open up an actress session on the database server. There's nada particularly interesting most the output of the commands, and then we won't bear witness it here—except for this little intriguing line in the HDB stop output: Observe the proper name NewDB . We think the developers left this in on purpose to commemorate the very early days of SAP HANA by referring to information technology—just this in one case—by its old working name. In SAP HANA Studio, you find the functions to showtime, cease, and restart (stop + start) the system when you lot right-click a connection to the organization database (non a tenant database). You lot and then encounter the options Commencement System , Cease Organisation , and Restart Organisation in the context carte du jour, as shown in the figure below. Allow'southward now wait at each of those options in more detail, and also take a brief look at the trace files for these processes. Choose Commencement System from the context menu. Confirm in the popup window that you want to first the system now. The status of the services on the Processes screen will gradually change from xanthous to green (run into below); this screen refreshes every few seconds. The instance is fully started when all services are green. Choose Stop System from the context menu. The popular-upwards window below volition appear; here y'all cull between a soft shutdown, which waits for all active sessions to finish, and a hard shutdown, which kills and rolls back the currently open transactions. For a soft shutdown, you lot can also specify a timeout; if there are still open up sessions at the end of the timeout menstruation, SAP HANA Studio will do a hard shutdown. The default timeout flow is 10 minutes. As soon equally the shutdown sequence begins, the statuses of the services on the Processes screen will offset to alter from dark-green to yellowish. When the shutdown is consummate, but the HDB daemon service will be listed with a red status icon. This selection shuts down and immediately restarts the example. Choose Restart System from the context menu. Equally when stopping the system, you can choose between a soft shutdown (with a timeout) and a hard shutdown. While the start or stop process is ongoing, information technology's interesting (and necessary, if there'south trouble) to look at the example trace files. In SAP HANA Studio, y'all tin do so by opening the Diagnosis Files tab (to the right of the Processes tab in the figure above). The trace file y'all may want to look at first is the one for the hdbdaemon procedure ( daemon_<hostname>. <service>.000.trc ). Double-click the proper noun to display the contents of the file (see below). The screen will show the most contempo messages; you lot tin enable an autorefresh function (correct-hand side of the toolbar) so that you lot ever go upwardly-to-engagement status information. According to the SAP HANA Administration Guide , you can outset and stop the organisation by using the Start System and Cease System buttons at the elevation of the Database Directory screen. We cannot ostend this considering in all the cockpit versions we checked, and despite satisfying the connection requirements, these buttons proved elusive. Non that we really come across this as a major shortcoming. Given that information technology's extremely easy to end and start SAP HANA from the command line, this is really what we advise y'all to practice. And if you insist on using a GUI, the part works impeccably in SAP HANA Studio, which volition probably withal be around by the time the outcome in the cockpit gets fixed. By default, the tenant databases start upwards automatically when the SAP HANA example starts. It's possible to modify this behavior with following SQL statement: To reinstate the automatic start, use this argument: 4 These operations require a connection to the organization database. You can utilize three methods for this: To check the instance condition from the server control line, use HDB info . If the instance is running, you'll see the HDB daemon process with the service processes underneath it. The presence of one or more hdbindexserver processes indicates that the tenant databases are also agile. To run across the status of all databases, use the following query when connected to the system database: The ACTIVE_STATUS column shows the current state of the tenant database; if ACTIVE_ Status is 'NO' , then ACTIVE_STATUS_DETAILS gives the reason the tenant is down—for example, because it was stopped manually or because autorestart is disabled. M_DATABASES View : The M_DATABASES view only provides data about all databases when executed in the system database. The view too exists for the tenant databases, but at that place information technology merely shows the data for the tenant itself. Stopping the SAP HANA instance using whatsoever of the methods we saw in the previous sections does not end the SAP start service ( sapstartsrv ) procedure itself. This is fine; there's commonly no need to stop information technology, and its resource use is close to nothing. There may exist exceptional situations, however, when yous do want to cease the service process; furthermore, sapstartsrv has numerous management and information functions that you might want to make use of. All communication with the sapstartsrv process is done using another program, sapcontrol . This program interfaces with the service process using spider web service calls. A sapcontrol command more often than not takes this form: Here, <xx> is the two-digit SAP HANA example number, <servicename> is the name of the service function you want to call, and <parameters> represents the parameters to be passed to the service function (not every function takes parameters). There are more command line arguments than this, just only -nr and -function are mandatory. Use sapcontrol -h for a list of all options and all service functions with their parameters. To facilitate the use of commands like sapcontrol that need the instance number, an surroundings variable TINSTANCE is normally gear up in the surroundings of the <hsid>adm case administrator. In the kickoff section we first describe how you can end and start the SAP beginning service procedure; so we look at some of the interesting services you tin can invoke with sapcontrol . To stop the service procedure, use this command: The service will normally stop almost immediately. It's safety to do this even while the SAP HANA instance is running; this is considering, every bit we mentioned earlier, sapstartsrv is not attached to the SAP HANA process tree (the process at the top of the tree is sapstart ). Still, as long as the service procedure is stopped, you lot can't use HDB to cease or starting time SAP HANA because information technology needs to collaborate with sapstartsrv . To restart the service process, use this command: Notice that the StartService function has the HSID as a mandatory parameter. There is also a part to restart (stop + start) the service, as follows: We won't go through the entire list of available functions (and some don't apply to SAP HANA anyway), simply we'll prove some of the more useful ones. To check the status of the SAP HANA instance processes, utilise this command: If the instance is upwards, the output is a list of processes with Greenish status. If the output contains a Yellow status, then this means that the process is not fully operational (e.g., still starting), and GRAY means that the procedure is stopped. For a stopped example, you'll meet something like this: Utilise following command to brandish the log of the sapstartsrv process: The next command lists the environs in which the service process was started; this can sometimes be useful when troubleshooting if you suspect that environment settings might have been incorrect when the case was started: For version information (of the SAP start service, not of SAP HANA), utilise this command: Editor's note: This mail service has been adapted from a section of the volume SAP HANA 2.0 Administration by Marker Mergaerts and Bert Vanstechelman.With the Command Line
HDB start HDB stop HDB restart(cease + offset) hdbdaemon volition expect maximal 300 seconds for NewDB services finishing. With SAP HANA Studio
Starting
Stopping
Restarting
Trace Files
With SAP HANA Cockpit
Starting and Stopping Tenant Databases
alter database <DB> no restart; modify database <DB> default restart;
alter system stop database <DB>; alter system start database <DB>;
Checking the Instance and Database Status
select * from M_DATABASES; Managing the SAP Start Service
sapcontrol -nr <twenty> -function <servicename> [<parameters>] Stopping and Starting sapstartsrv
sapcontrol -nr <xx> StopService sapcontrol -nr <xx> StartService <HSID> sapcontrol -nr <xx> RestartService Other Service Functions
sapcontrol -nr $TINSTANCE GetProcessList sapcontrol -nr $TINSTANCE -function GetProcessList GetProcessList OK name, description, dispstatus, textstatus, starttime, elapsedtime, pid hdbdaemon, HDB Daemon, Gray, Stopped, , , 15427 sapcontrol -nr $TINSTANCE GetTraceFile sapcontrol -nr $TINSTANCE GetEnvironment sapcontrol -nr $TINSTANCE GetVersionInfo /usr/sap/HXE/HDB90/exe/sapstartsrv, 753, patch 512, changelist 1949210, ...
Source: https://blog.sap-press.com/how-to-start-and-stop-an-instance-of-sap-hana
Posted by: petersonbeforrome1969.blogspot.com

0 Response to "How To Start And Stop Sap System In Windows Command"
Post a Comment