Quantcast
Channel: SCN : Discussion List - SAP HANA and In-Memory Computing
Viewing all 5653 articles
Browse latest View live

call hana stored procedure with table type parameter from abap

$
0
0

Hi, everyone, I'm new here and I'm new to SAP, either...So I need your help, please...

At this moment I am dealing with a job which needs to send a table variable to a Hana stored procedure. I created a test procedure in Hana like this:

drop type slt_dee300.tst_tb_in;
create type slt_dee300.tst_tb_in as table (    tb_para_in nvarchar(10)
); 

drop type slt_dee300.tst_tb_out;
create type slt_dee300.tst_tb_out as table (
    tb_para_out nvarchar(10)
);

drop procedure slt_dee300.tst_pr;
create procedure slt_dee300.tst_pr (
    in para_in slt_dee300.tst_tb_in,    out para_out slt_dee300.tst_tb_out
)   

language sqlscript as
begin
    para_out=select tb_para_in as tb_para_out from :para_in;
end

And call this from ABAP like this:

data: begin of line,       para_nvchar_in(10) type c,       end of line.

 data: tab_in like table of line.
 line-para_nvchar_in = 'test1'.
 append line to tab_in.

 data: tab_out like table of line with header line.

 EXEC SQL.
   connect to 'HANA' as 'CONN1'
 ENDEXEC.

 EXEC SQL.
   EXECUTE PROCEDURE SLT_DEE300.TST_PR_GK ( IN  :tab_in, OUT :tab_out )
 ENDEXEC.

 exec sql.
   disconnect 'CONN1'
 endexec.

 loop at tab_out.
   write: tab_out-para_nvchar_in.
 endloop.

The program can be actived successfully, but come up with an error says: " feature not supported: Parameterized input table parameter is not allowed ".

Can anybody tell me why this occurs, and indeed how to solve my problem?

 

Thanks!


SAPHANA:Unable to expose store procedure via ServerSide

$
0
0

Hi Experts

 

I am a beginner to server side java script(XSJS).                                     

I am trying to expose the .xsjs, file data containing StoreProcedure and access through web browser with the following url containing hostname,portnumber and package path as shown below:

 

"hostname:80<instance#>/testdemo/Demodata.xsjs"

 

and i am getting the following error when i am trying to access it.  

 

"This link seems to be broken

We could not find the resource you're trying to access.

It might be misspelled or currently unavailable"

 

 

I have created the following files in Project Explorer:

 

1.An Empty File with file extension .xsapp

2.A file with extension .xsaccess: 

 

 

            {

            "exposed":true,

            "authentication":[{"method":"LogonTicket"},{"method":"Basic"}]

            }

 

 

3.A file with file name Demodata.xsjs:

 

     $.response.contentType = "text/html";

     var body = ''; 

     var conn = $.db.getConnection(); 

     var cst = conn.prepareCall('{CALL testdemo.TESTPROCEDURE(?,?)}');  

     if (cst.execute()) { 

     body = 'Ok'  + cst.getInteger(3); 

     }

     else

     { 

     body = 'Failed'; 

     } 

    cst.close();

    conn.commit();

    conn.close();

 

4.A Store procedure with name TEST_PROCEDURE in SQL console:

 

create procedure testdemo.TEST_PROCEDURE LANGUAGE SQL SCRIPT AS "TEST"

/********* Begin Procedure Script ************/

BEGIN

SELECT

           cStyID,

           cName,

           cDimension,

           cSea,

           cDes,

           cMCCod,

           cBrand,

     Avgpr,

           cFil,

           cCom,

           cWhs,

           cUse,

           dtDa,

           dtDat,

           Art,

           STyp,

           SVal,

           CreatBy,

           Crea,

           ModiBy,

           ModiDt,

           Log

FROM tblArticl;

END;

/********* End Procedure Script ************/

 

 

The procedure gets executed well and the result value is OK.

 

Below are the views:

 

Project Explorer View Below:

       ProjectExplorer.png

RepositoryViewBelow:

        Repository.png

NavigatorViewBelow:

NavigatorView.png

All the above files are committed and activated succesfully.But an error occured when I tried to access "hostname:80<instance#>/testdemo/Demodata.xsjs" it in browser.

 

What could be wrong here?

 

Any sample examples would be appreciated.

 

Thanks for your time

Koushik.

HANA is for a fresher?

$
0
0

Hi,

 

Can someone please let me know how can a fresher enter in HANA.

1. And also if a fresher enter in HANA how should  or what things he should know

2. What role a fresher will get in a HANA Project

 

 

Thanks,

SRK

SAP HANA CE Functions

$
0
0

Hi,

 

Can we use sub query using SAP HANA CE functions. I have below  scenario.

 

 

Select matnr from EKPO where matnr in( select matnr from MARA where attyp = '02' );

 

Regards,

Shivani

HANA Unique constraint Question

$
0
0

I'm trying to import data from a csv file. While I know I cannot have duplicate data in the primary key. I am getting this error in a text column(ACTIVITYCATEGORYTEXT)  and have no idea why. I know I'm getting the error at this text column because all of my primary keys are unique and when I import the data without this column it comes in fine. I need the data in the ACTIVITYCATEGORYTEXT column to be able to be displayed repeatedly. The Previous data in there is repeated so I don't know why it won't let me upload from my csv. Is there somewhere in HANA where the settings for this column can be altered, or does anyone know why I am getting this error? I attached a screenshot. The longer activitytypeid values are sample csv, while the 400 and below is data I inserted via sql.

Unique Constraint error.JPG

standby node installation fail in distributed hana installation

$
0
0

Hi,

 

today i tried HANA distributed environment setup in our offic.

i want to introduce 3 servers: 1 master, 1 slace and 1 standby o test.

1. i set up a master hana in server A, and startup it

2. i set up a slave in server B through command ./hdbaddhost, which can succesfully communicate with server A.

     through hana studio, i find out these 2 nodes succesfully set up a distributed environment

3. last step, i want to create standby node in the same way just like that in server B setup. But it fails and display this errror message

 

         

Enter SAP HANA system ID [DS9]:

Enter Shared Installation Path [/hanamnt]:

Enter System Administrator (ds9adm) Password:

Options:

  IndexServer role | Description

  -------------------------------------------------------------

  worker           | host is used for database processing

  standby          | host is idle and available for HA failover

Enter IndexServer role [worker]: standby

  add host failed

    AddHost not possible. Start SAP HANA Database on master host and run addHost again.

 

 

i have double checked that the nameserver in master actually is running and server B also can communicate with server A

it is very appreciate any comments and tips, thanks

SAP HANA Update Query

$
0
0

Hello Everyone,

 

We just got an SAP HANA Appliance from SAP with SP04 installed.  We have not installed SAP Instance yet.  We are just wanting to update SAP HANA first and then do the SAP Install.   I am pretty new to SAP HANA and was wondering if someone can just guide me through the basic update from SAP HANA SP04 to SP06. 

 

I see that SP04 does not have HLM installed (no HLM sub directory under /hana/shared/<SID>/ folder)  but was installed using SUM (So how do I update SUM to SP05?). What should be the procedure to update?

 

Also wondering what the sequence should be for the  update: Here is what we think it should be..

 

SAP HANA STUDIO Rev 66

SAP SUM to SP05

Install HLM SP06

Update from SP04 to SP05

Update from SP05 to SP06

 

Please correct me if I am wrong..

 

Thanks

Unit of Conversion Issues in HANA

$
0
0

Hello Experts,

Can you please let me know what are the pre-requisites of doing a Unit of Conversion in HANA ?

I've replicated T006, T006A, T006D and still the Quantity conversion doesnt work in SPS6.

 

Can you please let me know if there is any other table which needs to be replicated ?

 

Thanks & regards,

Jomy


how sap hana is better than sap bo

$
0
0

Hi,

 

Any one can please provide any doc or ppt how sap hana is better than sap bo?

Filter Predicate Inside Outer-Join Predicate

$
0
0

Hello experts,

 

I am trying to garner some SQL performance tuning tips out of the document 'SAP HANA Database - Development Guide' and one tip is as the following:

 

"The column engine does not native support filter predicates inside outer-join predicates. Filter predicates over the right hand side of a left outer join and filter predicates over the left hand side of a right outer join are exceptions because shifting those predicates to the selections invoked by the join operation produces the same results"

 

I have doubts on the statement marked black. In my understanding the statement seems to claim that the following 2 queries produce the same results

 

SELECT ...

    FROM t1 LEFT OUTER JOIN t2 on t1.c1 = t2.c1 and t2.c2 = 'A'

 

SELECT ...

    FROM t1 LEFT OUTER JOIN t2 on t1.c1 = t2.c1

WHERE t2.c2 = 'A'

 

Well, the above 2 sql statements look similar and the difference is subtle. But actually they DO NOT produce the same results. The first sql does produce a larger result set.

 

Can anyone of you maybe shed some light on this tip from the document?

 

Thanks and kind regards,

James

query in hana on query manager

$
0
0

Hi,

I want to load a query in hana to the query manager.

Does anyone know if this is possible?

How can I load the query?

 

Regards,

Rafael Fernández

SAP Note 1736976 - Sizing Report for BW on HANA - Interpreting "incl. dyn" ?

$
0
0

Hi,

 

what's behind the "incl. dyn" Column of the Sizeing Report  /SDF/HANA_BW_SIZING

 

(see bellow) ?

What does dyn. dynamic mean within this ? What dynamic is adressed with the figure

 

...

SIZING DETAILS                                                               

==============                                                               

                                                                             

(For 1024 GB node)     data [GB]     total [GB]     total [GB]              

                                                     incl. dyn.     (non-act.)              

MASTER:                                                                     

-------                                                                     

                                                                             

  Row Store                   195            295            295              

  Master Column Store   270            540            540              

  Caches / Services         50             50             50              

  TOTAL (MASTER)       515            885            885              

                                                                             

SLAVES:                                                                     

-------                                                                     

                                                                             

  Slave  Column Store        1890           3729              3678              

  Caches / Services             250            250               250              

  TOTAL (SLAVES)             2140           3979            3928              

--------------------------------------------------------------------------------             

  TOTAL (All Servers)        2655           4864           4813              

...

 

SAP_BW_on_HANA_Sizing_Report_V1_4.pdf isn't to clear with this:

"

Minimum amount of required memory and disk space for HANA
server (including runtime memory, memory for additional services, etc.),

considering different hardware configurations

"

Thank You

Best

Martin

Hardware Decision: GPFS vs. XFS

$
0
0

Hi guys,

 

compared to all other hardware vendors. IBM is providing GPFS as file system for their HANA appliance. Whats the big difference, advantage or disadvantage compared to XFS?

 

Cheers, Christoph.

Load distribution between HANA engines

$
0
0

Hi,

 

I need help in understanding how processing is distributed between various engines (Join Engine, OLAP Engine, Calculation Engine, SQL Engine). Lets assume that there are two Calculation Views (one graphical and one SQL based). Each having the same set of attribute and analytic views. The SQL based Calc View will have some SQL queries as well.

 

Pl help me in understanding how the processing will be distributed between (if there is any parallel processing) various engines in both these cases.

 

Also, in case of SQL based Calc Views, does the system process SQL statements in serial or there is some mechanism to parallelise the execution.

 

Besides, is there a mechanism to control this distribution. 

 

Pl assist. Thanks.

Queries for Used and Resident memory and comparison with Overview tab numbers

$
0
0

Hi,

 

I look at the overview tab of the HANA studio for DB used memory and DB resident memory.

 

When I use the queries 1 ,2 and unix command below, the results match with the numbers displayed in the overview tab.

 

SQL Query 1 for DB used memory: (Available in HANA documents)

SELECT ROUND(SUM(TOTAL_MEMORY_USED_SIZE/1024/1024/1024), 2) AS
"Used Memory GB" FROM SYS.M_SERVICE_MEMORY;

 

SQL Query 2 for DB Resident memory: (I created this by observing the table contents)

SELECT ROUND(SUM(PHYSICAL_MEMORY_SIZE/1024/1024/1024), 2) AS
"DB RESIDENT Memory GB" FROM SYS.M_SERVICE_MEMORY;

 

Unix command: Provides same value as SQL query 2.

cat `ps h -U qp4adm -o "/proc/%p/status" | tr -d ' '` | awk '/VmSize/ {v+=$2} /VmPeak/ {vp+=$2} /VmRSS/ {r+=$2;} /VmHWM/ {rp+=$2} END {printf("Virtual Size = %.2f GB (peak = %.2f), Resident size = %.2f GB (peak = %.2f)\n", v/1024/1024, vp/1024/1024, r/1024/1024, rp/1024/1024)}'

 

My Questions:

 

Question 1:Now when I use the query 3 below(just getting the above 2 together with the process name), I observe that used memory is more than the resident memory for some services.

I believe that this is wrong based on the below explanation which is in the official HANA docs.

 

Can anybody in this forum throw more light on this observation?

 

SQL Query 3:

SELECT SERVICE_NAME,ROUND(SUM(TOTAL_MEMORY_USED_SIZE/1024/1024/1024), 2) AS
"Used Memory GB", ROUND(SUM(PHYSICAL_MEMORY_SIZE/1024/1024/1024), 2) AS
"DB RESIDENT Memory GB" FROM SYS.M_SERVICE_MEMORY GROUP BY SERVICE_NAME

 

Explanation on Resident from HANA doc:

"

When memory is required for table growth or for temporary computations, the SAP HANA code obtains it from the existing memory pool. When the pool cannot satisfy the request, the HANA memory manager will request and reserve more memory from the operating system. At this point, the virtual memory size of the HANA processes grows.

Once a temporary computation completes or a table is dropped, the freed memory is returned to the memory manager, who recycles it to its pool, without informing Linux. Thus, from SAP HANA‟s perspective, the amount of Used Memory shrinks, but the process‟ virtual and resident sizes are not affected. This creates a situation where the Used Memory may even shrink to below the size of SAP HANA‟s resident memory, which is perfectly normal."

 

Question 2:

SQL Query 5: This query doesn't match with the resident memory value in overview tab. Should it? I mean if it doesn't then is it an issue in the studio?

 

SELECT ROUND((USED_PHYSICAL_MEMORY + FREE_PHYSICAL_MEMORY)/1024/1024/1024, 2) AS "Physical Memory GB", ROUND(USED_PHYSICAL_MEMORY/1024/1024/1024, 2) AS "Resident GB" FROM PUBLIC.M_HOST_RESOURCE_UTILIZATION

 

Question 3:

 

In some Studios(meaning different versions) I have used the result of SQL query 1 doesn't match with the studio number. Can we consider this as an issue in the studio?

 

Question 4:

 

From the explanation above, can we understand that the Resident size increases since the freed memory is not released to the OS but to the HANA memory pool?

How do we differentiate between DB used and DB Resident memory?

The definition for both are same-> Physical memory in use by the process.

 

Used memory=" Code+stack+HANA memory pool(Tables,temporary computations)

Resident memory=?

 

Regards,

Sandeep


installing HANA

$
0
0

HANA is great but is working only in a very narrow context.

outside the SAP recommended context it is rather fragile.

the father you deviate from recommended hard and software requirements the more trouble you can expect.

just updating a library (in my case libssl) can break your hana installation.

i can probably not give you advice on your error, because i don't know your context in which the error occured.

all i can give you is a configuration which is working for me.

 

said that. here is what i'm going to use:

name of the virtual maschine: hanaVm

password for all acounts: Penguin7

hostname: penguin11

SID: HAN

instanceNr: 13

installation softare directory: /i

the hana installation is done as user root.

 

VirtualBox 4.2.16

- Linux openSUSE (64 bit)

-  2 CPU (PAX/NX aktiviert)

- 12 GB memory

- 128 GB Disk

- networkbridge - PCNet Fast III

- SLES 11 sp 2

- HANA Platform Edition 10 SP05

 

you need the CMPXCHG16B cpu instraction set

before you start your VirtualBox the first time set 

VBoxManage setextradata hanaVm VBoxInternal/CPUM/CMPXCHG16B 1

 

start your virtual mascjine

VBoxManage startvm hanaVm

 

 

install SLES 11 sp 2  with 42 GB swap

install additional software

zypper install java-1_6_0-ibm gcc kernel-default-devel

install the Guest addition

Devices -> install guest additions

VBoxLinuxAdditions.run ( if it does not start automatically )

 

check for CMPXCHG16B support

grep cx16 /proc/cpuinfo

 

get the software from the marketplace

extract the software to /i

cd /i

unrar x /i/51046016_part1.exe

 

next we have to define the filesystem layout

/tmp/setuphana.slmodel

 

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<DeclarativeModuleSerialization>

   <ManagedObject class="com.sap.lm.hana.hana.HANAPlatformProduct" id="0">

       <Child class="com.sap.lm.hana.hana.HANAPlatformSystem" id="4" name="hanaSystem">

           <StringParameter name="dataPath" value="/hana/shared/data"/>

           <StringParameter name="logPath" value="/hana/shared/log"/>

           <StringParameter name="sapmntPath" value="/hana/shared"/>

           <StringParameter name="instanceNumber" value="13"/>

           <StringParameter name="sid" value="HAN"/>

           <StringParameter name="hdbHost" value="penguin11"/>

           <StringParameter name="timezone" value="UTC"/>

               <Child class="com.sap.lm.decl.hana.DistributedHDBServer" id="5" name="hdbserver">

                               <Child class="com.sap.lm.decl.hana.AdditionalHosts" id="6" name="additionalHostsContainer">

                               </Child>

               </Child>

       </Child>

               <Reference name="centralComputerSystem" refid="1"/>

   </ManagedObject>

   <ManagedObject class="com.sap.lm.decl.os.ComputerSystem" id="1"/>

</DeclarativeModuleSerialization>

 

create the directories (mount points)

mkdir -p /sapinst /hana/shared/{log,data}

 

we have to make sure that it will pass the hardware test.

to prevent a division by zero error change /i/51046016/DATA_UNITS/HDB_SERVER_LINUX_X86_64/server/HanaHwCheck.py

replace: self.HWInfo['CPU Sockets']=len(lines)-1       

with   : self.HWInfo['CPU Sockets']=2 (or your number of cpus)

 

the other HW tests we can skip with setting an environment variable

export IDSPISPOPD=1

now start the instalation and wait untill it aborts. (if you have more than 24 GB it will not abort.)

/i/51046016/DATA_UNITS/HANA_IM_LINUX__X86_64/setup.sh /sapinst/hanainst /tmp/setuphana.slmodel

if it is aborting with language problems set LC_ALL and start again

export LC_ALL=en_US.UTF-8

 

when it is aborting with "[  36% completed] Working on: 'SAP HANA DB (penguin11.admin.org)' ...  --> ERROR"

you find in the error log a memory problem.

from now we continue manualy

 

server software

/i/51046016/DATA_UNITS/HDB_SERVER_LINUX_X86_64/hdbinst -s HAN -n 13 -H penguin11  --datapath=/hana/shared/data --logpath=/hana/shared/log --sapmnt=/hana/shared --ignore=check_min_mem

enter password for hanadm and SYSTEM and accept for the rest default values.

(if it looks that it hangs in the set importing delivery units - press enter every 10 minutes until the prompt returns. happens sometimes)

 

install the hdbstudio

export TEMP=/usr/sap/HAN/setup/logs_$(date +%Y%m%d%H%M%S)

mkdir $TEMP /hana/shared/HAN/hdbstudio_update

/i/51046016/DATA_UNITS/HDB_STUDIO_LINUX_X86_64/hdbinst -a studio --copy_repository=/hana/shared/HAN/hdbstudio_update

/i/51046016/DATA_UNITS/HDB_STUDIO_LINUX_X86_64/hdbinst -a studio --batch --path=/hana/shared/HAN/hdbstudio --vm=/usr/lib64/jvm/java-1_6_0-ibm-1.6.0/jre/bin/java

 

 

 

let's do a backup as <sid>adm

hdbsql -n penguin11 -i 13 -u SYSTEM -p Penguin7 BACKUP DATA USING "FILE('BACKUP_AFTER_INSTALL')"

 

start hdbstudio

/hana/shared/HAN/hdbstudio/hdbstudio

add some additional packages.

Help -> Install New Software

      Add -> Local... ->  /hana/shared/HAN/hdbstudio_update/repository -> OK -> OK

      X Show only Software aoolicable to target environment

      X Hide items that are already installed

      Select All -> Next -> Finish

 

some additional hana commands you find in my sap pocket card: http://oelkers.de/tips/pocketCardSAP.pdf

Importing Package for SHINE is not succesful

$
0
0

Dear Friend,

 

We are working on HANA client 1.0.55 and tried to import packages as per step provided in SHINE ( SAP HANA Interactive Education(SHINE) - SAP Help Portal ) but it is not working although everything looks green at the time import :

Modeler -  - SAP HANA Studio_2013-09-19_20-03-32.png

 

Could you please let me know if you have experienced similar kind of problem and possible solution?

 

Thanks in advance.

 

Regards,

Krish

Which is the correct procedure to add new columns to a table with one or more FKs

$
0
0

When I add a column on a table that has the foreign key constraint with istruction

ALTER TABLE REGOLA_ELISIONE ADD (FLAG_PERIODICO SMALLINT DEFAULT 0);

I get the following error: 

“Could not execute 'ALTER TABLE REGOLA_ELISIONE4 ADD (FLAG_PERIODICO SMALLINT DEFAULT 0)' in 49 ms 502 µs .

SAP DBTech JDBC: [7]: feature not supported: cannot add column of referencing row table”

 

If I delete a foreign key from a table, add a new column and then I try to ecreate the FK just deleted, I get the following error 

“Could not execute 'ALTER TABLE DATI_CAUSALI ADD CONSTRAINT FK_DATI_CAUSALI_002 FOREIGN KEY (COD_ELISIONE) REFERENCES ...' in 49 ms 516 µs .

SAP DBTech JDBC: [7]: feature not supported: cannot create foreign key constraint on referenced table having added column”

  Could you please help us with Issue? Which is the correct procedure to add new columns to a table with one or more FKs?

 

Thanks Paola

Unable to view HANA view(analytical) in IE browser via xsodata service

$
0
0

Hi,

I am unable to view my analytical view data on IE browser when exposed via XSODATA. The browser is just showing Horizontal lines as it appear in snapshot attached.

 

18-09-2013 03-53-03 PM.jpg

 

I was able to display metadata in xml as shown below.

metadata.jpg

Can you help me in identifying the reason for this!

 

Thanks

Lokesh

Which module has a good scope in future either SAP HANA or SAP BW?

$
0
0

Hi,

 

I am SAP BO consultant.Currently in the market SAP BI-BO has good demand, but in future( May be after 2 years) SAP HANA has a good demand.

 

In SAP HANA  SAP R/3 data directly replicate to HANA using Sybase replicate server and  SAP BI sources & Non SAP Data sources  should be transformed to SAP HANA using  BODS.

 

In BW 7.3 the DS 4.0 was tightly integrated.

 

Please guide me which module should i learn,  SAP BW 7.3 with BO 4.0 or SAP HANA with BO DS 4.0 & BO 4.0.

 

Thanks & Regards,

Rajesh.

Viewing all 5653 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>