Showing posts with label SAP HANA. Show all posts
Showing posts with label SAP HANA. Show all posts

Monday, December 11, 2017

HANA Index Server is not coming up

We have seen very high memory usage and user queries are taking longer and memory is not releasing. To release memory we have restarted HANA using below commands

sapcontrol -nr 00 -function StopSystem
sapcontrol -nr 00 -function StartSystem

HANA Database is not coming online and we see that Index Server is Initializing and we waited for 25 mins and no luck

$ sapcontrol -nr 00 -function GetProcessList

11.12.2017 08:29:31
GetProcessList
OK
name, description, dispstatus, textstatus, starttime, elapsedtime, pid
hdbdaemon, HDB Daemon, GREEN, Running, 2017 12 04 21:58:59, 154:30:32, 5259
hdbcompileserver, HDB Compileserver, GREEN, Running, 2017 12 04 21:59:31, 154:30:00, 5490
hdbindexserver, HDB Indexserver, YELLOW, Initializing, 2017 12 04 21:59:33, 154:29:58, 5528
hdbnameserver, HDB Nameserver, GREEN, Running, 2017 12 04 21:59:03, 154:30:28, 5283
hdbpreprocessor, HDB Preprocessor, YELLOW, Initializing, 2017 12 04 21:59:31, 154:30:00, 5492
hdbwebdispatcher, HDB Web Dispatcher, YELLOW, Running, 2017 12 04 22:37:54, 153:51:37, 11186
hdbxsengine, HDB XSEngine, YELLOW, Initializing, 2017 12 04 21:59:33, 154:29:58, 5530
In meanwhile when I look into the logs I see below errors

1. HANA OUT OF MEMORY, that is expected

indexserver_scllpa0000012.30003.rtedump.20171204-173900.014195.compositelimit_oom.trc
Composite limit violation (OUT OF MEMORY) occurred.

2. This below error is new and not seen in HANA logs before

Unknown pending exception
Throw location of the exception unknown
[4216]{-1}[-1/-1] 2017-12-04 19:58:44.751308 d Crypto           RootKeyStoreAccessorBase.cpp(00093) : Caught RootKeyStoreRecordNotFoundException reading SSFS version /usr/sap/HANADBX/SYS/global/hdb/security/ssfs:HDB_SERVER/PERSISTENCE/ROOTKEY/VERSION
[4216]{-1}[-1/-1] 2017-12-04 19:58:44.751320 a Crypto           RootKeyStoreAccessorBase.cpp(00072) : ExcExit time_t Crypto::SecureStore::RootKeyAccess::RootKeyStoreAccessorBase::readValueForContentKey(const string&, Crypto::Buffer&)(1596usec)
exception  1: no.301103  (Crypto/Ssfs/RootKeyAccess/RawAccess/RawRootKeyStoreReaderWriter.cpp:52)
    RawRootKeyStoreReader::read: SSFS-4218: Record with key "HDB_SERVER/PERSISTENCE/ROOTKEY/VERSION" not found in secure storage <-- SSFS-4215: Data file "/usr/sap/HANADBX/SYS/global/hdb/security/ssfs/SSFS_HANADBX.DAT" exists, but does not contain the requested entry
exception throw location:
 1: 0x00007fd869fe4721 in Crypto::SecureStore::RootKeyAccess::RawAccess::RawRootKeyStoreReader::read(Crypto::Buffer&)+0x40 at RawRootKeyStoreReaderWriter.cpp:86 (libhdbbasement.so)
 2: 0x00007fd869fe2f06 in Crypto::SecureStore::RootKeyAccess::RawAccess::RawRootKeyStore<false, false>::read(ltt::basic_string<char, ltt::char_traits<char> > const&, ltt::basic_string<char,

3. We see that HANA trying to recovery and but not coming online.

[4216]{-1}[-1/-1] 2017-12-04 19:59:59.100341 i Logger           PersistenceManagerImpl.cpp(06361) : Starting log replay at position 0x2b6f7dd9d02
[4216]{-1}[-1/-1] 2017-12-04 19:59:59.100362 i Logger           RecoveryHandlerImpl.cpp(01681) : Triggering recovery of remaining log
[4216]{-1}[-1/-1] 2017-12-04 19:59:59.100399 i Logger           RecoveryHandlerImpl.cpp(01741) : Finishing log recovery, waiting for in-process and in-load segments
[4607]{-1}[-1/-1] 2017-12-04 19:59:59.100685 i Logger           PersistenceManagerImpl.cpp(05084) : Found savepoint 253169 log record
[4607]{-1}[-1/-1] 2017-12-04 19:59:59.143111 i Logger           RecoveryHandlerImpl.cpp(02271) : Log recovery cannot expect any more data at position 0x2b6f7decec0, load states:
  - LogPartition[/hana/log/HANADBX/mnt00001/hdb00004/:0]: #segments 0/1 processed, 1/1 loaded, 1 total, last loaded LogSegment[0:0x2b6f7dd6d80/Writing,ts=2017-12-04 19:55:56.333631][GUID=5575D4BD-004F-20171119-045408-3E00001BA3/PrevGUID=5575D4BD-004F-20171119-045408-3E00001BA2/PersGUID=47A64522-004F-20150528-232756-3C50000001/RestoreGUID=74736948-6469-7547-0000-002000000000]
[4607]{-1}[-1/-1] 2017-12-04 19:59:59.143164 i Logger           RecoveryHandlerImpl.cpp(02553) : Recovery finished at log position 0x2b6f7decec0
[4597]{-1}[-1/-1] 2017-12-04 19:59:59.582532 i Logger           RecoveryHandlerImpl.cpp(03921) : Signaling finish wait barrier
[4216]{-1}[-1/-1] 2017-12-04 19:59:59.586365 i Logger           LogSegment.cpp(00672) : Closing open log segments after log recovery completed at position 0x2b6f7decec0
[4216]{-1}[-1/-1] 2017-12-04 19:59:59.586411 i Logger           LogSegment.cpp(00760) : Closing open on-disk segment LogSegment[0/18:0x2b6f7dd6d80-0x2b6f7decec0(0x585000B)/GUID=5575D4BD-004F-20171119-045408-3E00001BA3/PrevGUID=5575D4BD-004F-20171119-045408-3E00001BA2,TS=2017-12-04 19:55:56.333631,Hole=0x2b6f7dd6d80/Writing/0x0]@0x00007f43f1a385c0 after log recovery completed at position 0x2b6f7decec0
[4216]{-1}[-1/-1] 2017-12-04 19:59:59.587204 i Logger           LoggerImpl.cpp(01468) : Replayed 5009280B (4MB) of log in 1.522 seconds; 3.13877MB/s; max known TID=379629377
[4216]{-1}[-1/-1] 2017-12-04 19:59:59.587299 i Logger           LoggerImpl.cpp(01064) : Starting logger with 8 log buffers per partition, 1024KB each, segment size 1024MB, log mode normal
[4511]{-1}[-1/-1] 2017-12-04 20:00:39.628427 i Logger           RecoveryHandlerImpl.cpp(00701) : Termination of indoubt transactions. (raw page size in bytes to be still rolled back 136717467648 or garbage collected 0)
[4512]{-1}[-1/-1] 2017-12-04 20:01:29.664585 i Logger           RecoveryHandlerImpl.cpp(00701) : Termination of indoubt transactions. (raw page size in bytes to be still rolled back 133028642816 or garbage collected 0)

We have seen this type of behavior earlier but not same errors, restarting HANA helped to resolve the issue. We restarted HANA again and to see where it helps, but still “HANA Index Server is Initializing” and the log stopped at below error and no further update..

[4216]{-1}[-1/-1] 2017-12-04 19:59:05.121382 i Logger           LoggerImpl.cpp(00525) : Setting log segment backup timeout to 900s, original value was 0s
[4216]{-1}[-1/-1] 2017-12-04 19:59:05.190851 i PersistenceManag PersistenceManagerImpl.cpp(05984) : BACKUP DATA seems to have been executed, database should be recoverable from backup
[4216]{-1}[-1/-1] 2017-12-04 19:59:05.190879 i Logger           PersistenceManagerImpl.cpp(06226) : Deactivating REDO logging for log replay
[4216]{-1}[-1/-1] 2017-12-04 19:59:05.190881 i Logger           PersistenceManagerImpl.cpp(06237) : Start termination of rollback(s) open in restart/backup savepoint
[4216]{-1}[-1/-1] 2017-12-04 19:59:32.523954 i Logger           PersistenceManagerImpl.cpp(06245) : Termination of rollback(s) open in restart/backup savepoint finished in 27.2676 seconds;

[4607]{-1}[-1/-1] 2017-12-04 19:59:59.143164 i Logger           RecoveryHandlerImpl.cpp(02553) : Recovery finished at log position 0x2b6f7decec0
[4597]{-1}[-1/-1] 2017-12-04 19:59:59.582532 i Logger           RecoveryHandlerImpl.cpp(03921) : Signaling finish wait barrier
[4216]{-1}[-1/-1] 2017-12-04 19:59:59.586365 i Logger           LogSegment.cpp(00672) : Closing open log segments after log recovery completed at position 0x2b6f7decec0
[4216]{-1}[-1/-1] 2017-12-04 19:59:59.586411 i Logger           LogSegment.cpp(00760) : Closing open on-disk segment LogSegment[0/18:0x2b6f7dd6d80-0x2b6f7decec0(0x585000B)/GUID=5575D4BD-004F-20171119-045408-3E00001BA3/PrevGUID=5575D4BD-004F-20171119-045408-3E00001BA2,TS=2017-12-04 19:55:56.333631,Hole=0x2b6f7dd6d80/Writing/0x0]@0x00007f43f1a385c0 after log recovery completed at position 0x2b6f7decec0
[4216]{-1}[-1/-1] 2017-12-04 19:59:59.587204 i Logger           LoggerImpl.cpp(01468) : Replayed 5009280B (4MB) of log in 1.522 seconds; 3.13877MB/s; max known TID=379629377
[4216]{-1}[-1/-1] 2017-12-04 19:59:59.587299 i Logger           LoggerImpl.cpp(01064) : Starting logger with 8 log buffers per partition, 1024KB each, segment size 1024MB, log mode normal
[4511]{-1}[-1/-1] 2017-12-04 20:00:39.628427 i Logger           RecoveryHandlerImpl.cpp(00701) : Termination of indoubt transactions. (raw page size in bytes to be still rolled back 136717467648 or garbage collected 0)

[4607]{-1}[-1/-1] 2017-12-04 19:59:59.143164 i Logger           RecoveryHandlerImpl.cpp(02553) : Recovery finished at log position 0x2b6f7decec0
[4597]{-1}[-1/-1] 2017-12-04 19:59:59.582532 i Logger           RecoveryHandlerImpl.cpp(03921) : Signaling finish wait barrier

After reviewing the logs I see that many errors are DEVIATING the problem and it looks like issue with log segment. Normally you will see this behavior when your log file system is full or backup backup file system is full.

I have verified all locations and everything looks good except log backup location. When I am trying to list or view the log backups it just hung, I see that there is some issue with backup location.

We have unmounted and remounted back and also renamed old backup location and created new. When I look into the logs I see that HANA coming online..

As you see below log HANA was just hanging and after fixing issue immediately HANA coming online.

[5699]{-1}[-1/-1] 2017-12-04 22:07:28.699548 i Basis            Helper.cpp(00514) : Using 'x64_64 ABI unwind' for stack tracing
[5576]{-1}[-1/-1] 2017-12-04 22:37:20.216535 i Logger           LogSegment.cpp(00672) : Closing open log segments after log recovery completed at position 0x2b6f7decf00
[5576]{-1}[-1/-1] 2017-12-04 22:37:20.216830 i Logger           LogSegment.cpp(00760) : Closing open on-disk segment LogSegment[0/32:0x2b6f7decec0-

Note that during HANA index server initialization, it needs all required resources for rollback,recovery,backup..etc. But log backup mount point was timing out and not accessible from HANA side which is causing the issue.

Wednesday, June 1, 2016

xxxxx is disabled and will not be called. Reason: timeout SNAPSHOT_ID

In HANA Studio I see many following internal alerts

 Internal statistics server problem --- xxx is disabled and will not be called. Reason: timeout SNAPSHOT_ID: <timestamp>


I found below error message in Indexserver trace.

These issues fixed in SAP HANA SPS08 database maintenance version 85.05, Please check the release SAP note 2188592.

If you are in higher version still receiving these alerts then raised a ticket with SAP.

Regards
Satishbabu Gunukula, Oracle ACE

Monday, March 21, 2016

Oracle In-Memory vs SAP HANA, What is your choice?

This is one of the very important discussions between DBA’s and BASIS Admins. Let’s see what benchmark results say….!
  • Oracle Database In-Memory brings breakthrough analytical performance to enable businesses to make real-time decisions rapidly and easily. It is compatible with all existing applications and there is no need to rewrite your application to take advantage of it. In contrast, with SAP HANA the application need to be rewritten
  • Oracle Database In-Memory implements state-of-the-art technology to accelerate analytics by orders of magnitude to allow users to get immediate answers to business questions that previously took hours. This same Oracle in-memory technology is proven to speed up SAP applications 2x faster than SAP HANA on SAP's own benchmarks. Read the Benchmark white paper*
     
  • Oracle Database In-Memory does not mandate that all data fit in memory. Frequently accessed data can be kept In-Memory while less active data is kept on much lower-cost flash and disk, providing even more cost savings. In contrast, SAP HANA can only handle database sizes that fit in memory
     
  • Building on decades of innovation, Oracle Database offers a proven platform with integrated high availability and data protection to deliver a reliable, secure, "always-on" business operation you can count on. Does SAP HANA offer the same high availability capabilities? Read more.
     
  • Oracle has been an active leader in publishing benchmarks on transaction processing performance as measured by SAP's own standard application benchmarks (SAP Standard Application Benchmarks). Oracle Database In-Memory now enables real-time analytics on live transactional data. With Oracle, performance optimizations are built in for both transactions and analytics, unlike HANA, which optimizes your database for analytics at the cost of slowing down transactions. Where is the benchmark demonstrating HANA transaction processing performance running the SAP standard application benchmarks on HANA?
 Source: https://www.oracle.com/corporate/features/oracle-powers-sap.html
  • Oracle is compatible with Compatible with cloud computing, big data and data warehousing. SAP HANA Database cloud consolidation is also not feasible 
  • No new APIs and minimal new DBA commands are required, making Oracle Database In-Memory trivial to implement and maintain. Because HANA is a new “platform” with unique operational procedures and programming practices, a new team or retraining is required.
  • Oracle Database In-Memory’s unique dual format enables transparent scale-up and scale-out for analytics and OLTP workloads running together. HANA uses a column format for high-performance analytics, which has severe architectural limitations for OLTP performance and scalability. Scaleup and scale-out are very immature
Source: http://www.oracle.com/technetwork/database/options/dbim-vs-sap-hana-2215625.pdf

Now it’s your time to read the benchmarks white paper and understands the facts and take the decision.

Regards
Satishbabu Gunukula, Oracle ACE
http://www.oracleracexpert.com

Thursday, March 10, 2016

SAP DBTech JDBC: [403]: internal error: Cannot get remote source objects: Unable to load driver manager

When trying to create “Remote source” to Microsoft SQL Server under Smart Data Access (SDA) using HANA received following error

SAP DBTech JDBC: [403]: internal error: Cannot get remote source objects: Unable to load driver manager 

By looking the error it looks like the driver does not exists or not installed properly.  To find out the driver install or not run below command, if you receive an error then its not installed.

#isql --help
SAP DBTech JDBC: [403]: internal error: Cannot get remote source objects: [unixODBC][Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Login failed for user 'hanasdauser'. 

I have followed below steps to install the Drivers

1. Set the environment
# cd /hana/ms-odbc-driver/unixODBC-2.3.0
# export CPPFLAGS=”-DSIZEOF_LONG_INT=8”
# echo $CPPFLAGS
-DSIZEOF_LONG_INT=8

2. Configure
#./configure --prefix=/usr --libdir=/usr/lib64 --sysconfdir=/etc --enable-gui=no --enable-drivers=no --enable-iconv --with-iconv-char-enc=UTF8 --with-iconv-ucode-enc=UTF16LE

3. Run make utility
# make

4. Run make install
# make install

5. Test the driver is installed or not
# isql –help
unixODBC 2.3.0

After installing the driver I was able to create Remote Source in HANA under SDA.

Regards
Satishbabu Gunukula, Oracle ACE
http://www.oracleracexpert.com

Failed to get connections for connection [http://hostname:8000] using session locale [English]


Failed to get connections for connection [http://hostname:8000] using session locale [English].

I was trying to create a OLAP connection from CMC to HANA in BOXI4.1 SP6 for Analysis Office 2.x SSO setup and receive below error. All the server details verified and everything seems to be correct.


After doing some investigation I found that the issue is due to limitation in BI platform4.1 sp06 or lower.

It cannot able to connect to HANA in CMC because there is no data provider available.

Errors in MDAS log file
Creating a BICS application with alias [session-2:http://hostname:8000:dev:en_US:HTTP:CREDENTIALS:null]
JCoDestinationDataProvider adding destination session-2:http://hostname:8000:dev:en_US:HTTP:CREDENTIALS:null.
JCoDestinationDataProvider setting jco.destination.pool_capacity property to 0 because it was not specified. <exception> com.sap.ip.bi.base.service.connection.impl.ConnectionException: No connection factory found for type session-2:http://hostname:8000:dev:en_US:HTTP:CREDENTIALS:null/HTTP.

Possible Solution: Upgrade to BI 4.1 SP07 or higher then you should be able to connect using HTTP provider.

Refer below SAP Note for more info
2182585 - Cannot connect to the Hana via SAP Hana Http OLAP connection in CMC


Regards
Satishbabu Gunukula, Oracle ACE

Tuesday, March 1, 2016

Note 1732157 - Collecting support information for SAP HANA.

If you open any ticket with HANA, first they will ask you to collect the dump.

Collecting the dump is very simple in HANA and follows the steps.

1. Open HANA Studio -->  go to ‘Diagnosis files’ --> In ‘Diagnosis Information’ click  'List '
2. Select the dates where you had the issue or you want to collect diagnosis information --> Click “OK”
3. Collecting the diagnosis information will take time and once it finish “Download the Collection”

The dump will be created under below path
/usr/sap/SID/SYS/global/sapcontrol/snapshots

Regards,
Satishbabu Gunukula, Oracle ACE
http://www.oracleracexpert.com

Wednesday, February 17, 2016

How to enable and disable HANA Client Trace

Use hdbodbc_cons for tracing applications based on ODBC and hdbsqldbc_cons for tracing applications based on SQLDBC.

Use blow syntax

hdbodbc_cons.exe trace <level> <on/off>

Where levels are:
             api: tracing of ODBC api calls
             debug: detailed tracing of whole call stack
             sql: tracing of sql commands as well as output and parameter handling

Before you trun on trace, first configure the trace file name.
C:\Program Files\sap\hdbclient>hdbodbc_cons.exe config trace filename C:\temp\hdbodbc_trace.log

To turn on/off trace use below examples

Tracing of sql commands as well as output and parameter handling
          C:\Program Files\sap\hdbclient>hdbodbc_cons.exe trace sql on
          C:\Program Files\sap\hdbclient>hdbodbc_cons.exe trace sql off

Detailed tracing of whole call stack
          C:\Program Files\sap\hdbclient>hdbodbc_cons.exe trace debug on
          C:\Program Files\sap\hdbclient>hdbodbc_cons.exe trace debug off

Tracing of ODBC api calls
           C:\Program Files\sap\hdbclient>hdbodbc_cons.exe trace api on
           C:\Program Files\sap\hdbclient>hdbodbc_cons.exe trace api off

Reference:-
SAP Note: 1993254 - Collecting ODBC Trace
SAP Note: 1993251 - Collecting SQLDBC Trace

Regards,
Satishbabu Gunukula, Oracle ACE

SAP DBTech JDBC: [2048]: column store error: search table error

We have received following error when selection data from an reporting application.

[SAP AG][LIBODBCHDB DLL][HDBODBC] General error;2048 column store error: search table error: [1000002] exception 1000002: ltt/impl/memory.cpp:86 Allocation failed ; $size$=1573119; $name$=ihm; $type$=pool; $inuse_count$=80; $allocated_size$=109062096 exception 1000002: ltt/impl/memory.cpp:86 Allocation failed ; $size$=209664; $name$=temp_aggregates; $type$=pool; $inuse_count$=946; $allocated_size$=58136000 Unable to create extract

Sometimes you will not get complete error message in the application log. It’s always good idea to run the query in HANA studio to get the complete error.

I have ran the same query manually using HANA studio and got the below error

SAP DBTech JDBC: [2048]: column store error: search table error: [9] Memory allocation failed
If you look at the error carefully you should be able to identify that “memory allocation failed”. Normally you will see this error when there is a statement memory limit set for the application user or end user running the query.

I have increased the memory for the user using below command and the issue has been resolved.
ALTER USER <username> SET PARAMETER STATEMENT MEMORY LIMIT = <gb>

You need to identify the optimal value for you environment to avoid these errors.

To reset a statement limit use the SQL statement:
ALTER USER <username> CLEAR PARAMETER STATEMENT MEMORY LIMIT


Note that in order to enable statement memory limit you must enable STATEMENT MEMORY TRACKING IN THE GLOBAL.INI FILE.

The below parameters must be ON.
enable_tracking = on
memory_tracking = on

You should be able to view the memory consumption of a statement in M_EXPENSIVE_STATEMENTS.MEMORY_SIZE.

Regards,
Satishbabu Gunukula, Oracle ACE



Friday, November 6, 2015

syntax error: unterminated quoted string literal


I have encountered below “sql syntax error” during data import into HANA Dynamic Tiering

* 257: sql syntax error: unterminated quoted string literal: line 1 col 13 (at pos 13) SQLSTATE: HY000
Here are the possible reasons for this error

1. You will see this error when data file name is wrong in the control file

2. The “quote” is not closed properly in the IMPORT command.

For ex:-
HANA=>IMPORT FROM '/hana/shared/DT/HDB00/work/employee.txt.ctl
As you see quote is not ended properly in above command

3. when data file is empty

Regards,
Satishbabu Gunukula, Oracle ACE

Friday, August 7, 2015

[SAP][ODBC Driver]Non-space text found after ending quote


I have encountered below error during data import into HANA Dynamic Tiering

* 403: internal error: [SAP][ODBC Driver]Non-space text found after ending quote
-- (dblib/db_RecScanner.cxx 2657) SQLSTATE: HY000


I found that data has quotes (“) which is causing the issue. But didn’t find any forum/link related to this error in HANA DT or solution.

At this situation SLT can help, I have used SLT to load the data and was able to load successfully.

During research I found that few users encountered same issue during the data import into SYBASE
They propose below recommendations

- Remove quotes from all values in data file
- TURN OFF the QUOTES as QUOTES ON is default.

Refer below link for more info for SYBASE error
https://scn.sap.com/thread/3638327

Other possible errors you may encounter:

* 403: internal error: [SAP][ODBC Driver]Cannot convert PatKey to a integer(10) (column EMPLOYEE_ID) SQLSTATE: HY00

Possible solution: Please choose appropriate data type.

Regards
Satishbabu Gunukula, Oracle ACE
http://www.oracleracexpert.com 

2: general error: Table does not exist SQLSTATE: HY000


I was importing data into HANA Dynamic Tiering and encountered below error.

* 2: general error: Table does not exist SQLSTATE: HY000

You will see this error if TABLE NAME is wrong. I have verified that table exists in the database but still see same issue and I have verified the syntax of the control file and everything looks good.

IMPORT DATA INTO TABLE "dtuser"."employee" FROM '/hana/shared/DT/HDB00/work/employee.txt'
RECORD DELIMITED BY '\n'
FIELD DELIMITED BY '|'
OPTIONALLY ENCLOSED BY '"'
ERROR LOG '/hana/shared/DT/HDB00/work/employee.log'

I see that user and table name is in lower case. I have modified the control file to use upper case for user/ table name and I was able to IMPORT successfully.

Other possible errors you may encounter:  
  • 2: general error: Cannot open the file, /hana/shared/DT/HDB00/work/employee.txt SQLSTATE: HY000
Possible solution: The file name is wrong or path may be in correct. You need to correct the same 
  • 2: general error: Cannot open Control file, /hana/shared/DT/HDB00/work/employee.ctl
Possible solution: The control file name is wrong or control file path may be incorrect

Regards
Satishbabu Gunukula, Oracle ACE
http://www.oracleracexpert.com