Monday, August 8, 2016

HP Data Protector : Error post installation & cannot start omni

I have installed HP DP 9.0 on my VM with a bit customize installation script (omnisetup.sh) because I want to install in my local notebook and lack of memory which require 4GB as minimum.

After I finished the installation, I saw error in post-installation part but I ignored it. Try to start omni but it was failed.

Here is error : 
08/08/2016 10:47:26 PM  OMNISV.41507.0 ["/lib/cmn/unix.c $Rev: 41801 $ $Date:: 2014-03-26 06:59:59":1413] A.09.00 b88
execvp failed! (/etc/init.d/hpdp-idb-cp) errno=2
Arg list:
        /etc/init.d/hpdp-idb-cp
        start

08/08/2016 10:47:27 PM  OMNISV.41523.0 ["/lib/cmn/unix.c $Rev: 41801 $ $Date:: 2014-03-26 06:59:59":1413] A.09.00 b88
execvp failed! (/etc/init.d/hpdp-as) errno=2
Arg list:
        /etc/init.d/hpdp-as
        quick

I will share the solution for this error into 2 part, hpdp-idb-cp and hpdp-as.

1. hpdp-idb-cp


I create the new script as /etc/init.d/hpdp-as with following script :-

#!/bin/sh
# chkconfig: 35 99 08
# description: HP Data Protector Application Server.
# processname: hpdp-as

### BEGIN INIT INFO
# Provides: hpdp-as
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 3 5
# Default-Stop: 0 1 2 4 6
# Short-Description: HP Data Protector Application Server
### END INIT INFO

#Defining AS_HOME
AS_HOME=/opt/omni/AppServer

case "$1" in
start)
echo "Starting the HP Data Protector Application Server..."
nohup su - hpdp -c "${AS_HOME}/bin/standalone.sh -b vmrhel65 &"
;;
quick)
nohup su - hpdp -c "${AS_HOME}/bin/standalone.sh -b vmrhel65 > /dev/null &"
;;
stop)
echo "Stopping the HP Data Protector Application Server..."
su - hpdp -c "${AS_HOME}/bin/jboss-cli.sh --connect command=:shutdown"
;;
log)
echo "Showing server.log..."
tail -1000f /var/opt/omni/log/AppServer/server.log
;;
*)
echo "Usage: /etc/init.d/hpdp-as {start|stop|log}"
exit 1
;; esac
exit 0

Note: you have to edit [vmrhel65] into your hostname.

2. hpdp-as

Run following command,
# su hpdp -c "LD_LIBRARY_PATH=/opt/omni/idb/lib:$LD_LIBRARY_PATH /opt/omni/idb/bin/pgbouncer -d /etc/opt/omni/server/idb//hpdp-idb-cp.cfg"

Next, re-install once again.
# ./omnisetup.sh -IS

Then, change owner of these directories
# chown hpdp /var/opt/omni/log/AppServer \ 
  /var/opt/omni/server/AppServer  \
  /opt/omni/AppServer/standalone/deployments \
  /etc/opt/omni/server/AppServer

Finish! Try to start omni once again
# omnisv start

Check the process
# /opt/omni/sbin/omnisv status
    ProcName      Status  [PID]  
===============================
    crs         : Active  [49846]
    mmd         : Active  [49844]
    kms         : Active  [49845]
    hpdp-idb    : Active  [49829]
    hpdp-idb-cp : Active  [41805]
    hpdp-as     : Active  [49890]
    omnitrig    : Active
    Sending of traps disabled.
===============================
Status: All Data Protector processes/services up and running.

Now, error of above 2 errors have been fixed.


Note : as I mentioned above, I install in my tiny VM. There is a lot of problem about memory, postgres is also. I have to edit the configuration script /var/opt/omni/server/db80/pg/postgresql.conf and change shared_buffers as it should be proper with my resource.

Test startup postgres by following command (with & as background process but it no need because when you startup omni process it also be started)
# /opt/omni/idb/bin/postgres -D /var/opt/omni/server/db80/pg & 

Done!

Wednesday, March 19, 2014

MSSQL 2012 Upgrade from Enterprise Evaluation edition to Standard edition

Hello, everyone.

Yesterday is so suck for me that I just found my MSSQL is expired. I worked all day to fix this problem. Below is my solution for this problem.



Checking existing MSSQL 2012 edition from the old logs, as I found in C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\yyyymmdd_hhmmss

Product features discovered:
  Product              Instance             Instance ID                    Feature                                  Language             Edition              Version         Clustered
  SQL Server 2012      MSSQLSERVER          MSSQL11.MSSQLSERVER            Database Engine Services                 1033                 Enterprise Evaluation Edition 11.1.3000.0     No       
  SQL Server 2012      MSSQLSERVER          MSSQL11.MSSQLSERVER            SQL Server Replication                   1033                 Enterprise Evaluation Edition 11.1.3000.0     No       
  SQL Server 2012      MSSQLSERVER          MSSQL11.MSSQLSERVER            Full-Text and Semantic Extractions for Search 1033                 Enterprise Evaluation Edition 11.1.3000.0     No        
  SQL Server 2012      MSSQLSERVER          MSSQL11.MSSQLSERVER            Data Quality Services                    1033                 Enterprise Evaluation Edition 11.1.3000.0     No       
  SQL Server 2012      MSSQLSERVER          MSAS11.MSSQLSERVER             Analysis Services                        1033                 Enterprise Evaluation Edition 11.1.3000.0     No       
  SQL Server 2012      MSSQLSERVER          MSRS11.MSSQLSERVER             Reporting Services - Native              1033                 Enterprise Evaluation Edition 11.1.3000.0     No       
  SQL Server 2012                                                          Management Tools - Basic                 1033                 Enterprise Evaluation Edition 11.1.3000.0     No       
  SQL Server 2012                                                          Management Tools - Complete              1033                 Enterprise Evaluation Edition 11.1.3000.0     No       
  SQL Server 2012                                                          Client Tools Connectivity                1033                 Enterprise Evaluation Edition 11.1.3000.0     No       
  SQL Server 2012                                                          Client Tools Backwards Compatibility     1033                 Enterprise Evaluation Edition 11.1.3000.0     No       
  SQL Server 2012                                                          Client Tools SDK                         1033                 Enterprise Evaluation Edition 11.1.3000.0     No       
  SQL Server 2012                                                          Integration Services                     1033                 Enterprise Evaluation Edition 11.1.3000.0     No       

As you see, the installed MSSQL is enterprise evaluation edition but I have already bought the standard edition. I can use this evaluation edition for only 180 days. Once I have not upgraded it yet , when the expired date is arrived I cannot access the database anymore.

The error message will be shown when you access the database via MSSQL Management Studio (but I didn’t capture it. But, I found the similar message in event log of windows log, as below.

Log Name:      Application
Source:        MSSQLSERVER
Date:          19/3/2557 19:26:19
Event ID:      17051
Task Category: Server
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      saturn
Description:
SQL Server evaluation period has expired.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="MSSQLSERVER" />
    <EventID Qualifiers="49152">17051</EventID>
    <Level>2</Level>
    <Task>2</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2014-03-19T12:26:19.000Z" />
    <EventRecordID>56278</EventRecordID>
    <Channel>Application</Channel>
    <Computer>saturn</Computer>
    <Security />
  </System>
  <EventData>
    <Binary>9B4200001000000007000000530041005400550052004E00000000000000</Binary>
  </EventData>
</Event>

The main error log must be shown as “SQL Server evaluation period has expired.”

To fix this problem, you must have 2 things: installation CD and CD-key.

In my solution, I have only standard edition key. So, I have to download the standard edition install CD as well. These 2 things must match together, if it mismatch, the upgrade cannot be done.

1. Insert the installation CD, launch the setup widows. Select maintenance option in the left-hand panel. Then, select edition upgrade.



2. Next 2 windows will be shown as the setup support rules. Click Next on both windows.

3. Enter your purchase product key, click next.

4. Accept the license term, click next. And click next once again on selecting instance page.

5. Click next on edition upgrade rule page.

6. Then, it will show you the ready to upgrade edition, click upgrade button, then wait for everything is completed.

7. Once the upgrade edition is completed, it will show every feature as passed status. Click close button to exit this wizard.

8. Verify your upgraded edition via log file which located at C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\Summary.txt

Overall summary:
  Final result:                  Passed
  Exit code (Decimal):           0
  Start time:                    2014-03-19 19:18:41
  End time:                      2014-03-19 19:32:34
  Requested action:              EditionUpgrade

Machine Properties:
  Machine name:                  SATURN
  Machine processor count:       16
  OS version:                    Windows Server 2008
  OS service pack:               Service Pack 2
  OS region:                     United States
  OS language:                   English (United States)
  OS architecture:               x86
  Process architecture:          32 Bit
  OS clustered:                  No

Product features discovered:
  Product              Instance             Instance ID                    Feature                                  Language             Edition              Version         Clustered
  SQL Server 2012      MSSQLSERVER          MSSQL11.MSSQLSERVER            Database Engine Services                 1033                 Enterprise Evaluation Edition 11.1.3000.0     No       
  SQL Server 2012      MSSQLSERVER          MSSQL11.MSSQLSERVER            SQL Server Replication                   1033                 Enterprise Evaluation Edition 11.1.3000.0     No       
  SQL Server 2012      MSSQLSERVER          MSSQL11.MSSQLSERVER            Full-Text and Semantic Extractions for Search 1033                 Enterprise Evaluation Edition 11.1.3000.0     No       
  SQL Server 2012      MSSQLSERVER          MSSQL11.MSSQLSERVER            Data Quality Services                    1033                 Enterprise Evaluation Edition 11.1.3000.0     No       
  SQL Server 2012      MSSQLSERVER          MSAS11.MSSQLSERVER             Analysis Services                        1033                 Enterprise Evaluation Edition 11.1.3000.0     No       
  SQL Server 2012      MSSQLSERVER          MSRS11.MSSQLSERVER             Reporting Services - Native              1033                 Enterprise Evaluation Edition 11.1.3000.0     No       
  SQL Server 2012                                                          Management Tools - Basic                 1033                 Enterprise Evaluation Edition 11.0.2100.60    No       
  SQL Server 2012                                                          Client Tools Connectivity                1033                 Enterprise Evaluation Edition 11.1.3000.0     No       
  SQL Server 2012                                                          Client Tools Backwards Compatibility     1033                 Enterprise Evaluation Edition 11.1.3000.0     No       
  SQL Server 2012                                                          Client Tools SDK                         1033                 Enterprise Evaluation Edition 11.1.3000.0     No       
  SQL Server 2012                                                          Integration Services                     1033                 Enterprise Evaluation Edition 11.1.3000.0     No       

Package properties:
  Description:                   Microsoft SQL Server 2012 Service Pack 1
  ProductName:                   SQL Server 2012
  Type:                          RTM
  Version:                       11
  SPLevel:                       0
  Installation location:         H:\x86\setup\
  Installation edition:          Standard

Or you may check it via MSSQL Management Studio. Right click at database instance, select server properties.
 

Check out in product field.  It should be preferred edition. (in this case, should be standard edition)



Hope this may be useful for anyone who stuck in the same problem as mine.