Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all 6412 articles
Browse latest View live

Hana Multi-Tenant registration to SLD/LMDB

$
0
0

Dear Experts

 

I am trying to register a multi-tenant hana with the SLD.

 

We have a logical hostname for each of the tenants (for example DB<SID>)

 

The current situation: (edit:we have HANA SPS9)

 

Hana Instance is in the sld with software component version: SAPHANA DATABASE 1.00

The tenants (with logical hostname) are in the sld but without any component version attached.

 

Is there any way to register the tenants with the sld?

We need to have them registered so we can complete the managed system setup of our hana based systems.

 

Kind regards

Lucas


Is the Update and Delete working in XSODATA CRUD SP6 or above?

$
0
0

Hi All,

 

I have been experimenting with the web-based development workbench for SAP Hana based on the following and the youtube video of Thomas Jung:

 

"Develop Your First SAP HANA Native Application

on SAP HANA Platform Using the SAP HANA

Web-based Development Workbench

Version 1.1 | March 2014 | Bertram Ganz, Jens Glander | SAP AG"

 

I then wanted to extend it to try the "Update" and "Deletion" extension of the XSODATA.

 

Thus, my data model:

 

namespace dev.devuser00.perslist.data;

@Schema: 'devuser00_perslist'

context mymodel {

type SString: String(60);

@Catalog.tableType: #COLUMN

Entity person {

key ID: String(10); // element modifier 'key' defines that ID is primary key

FIRSTNAME: SString;

LASTNAME: SString;

};

 

context procedures{

    type pers {

        ID: String(10);

        FIRSTNAME: SString;

        LASTNAME: SString;

    };

 

    type persNames {

        FIRSTNAME: SString;

        LASTNAME: SString;

    };

 

    type errors {

        HTTP_STATUS_CODE : Integer;

        ERROR_MESSAGE : String(100);

        DETAIL : String(100);

        };

    };

 

 

};

 

My XSODATA: person.xsodata

 

service {

"dev.devuser00.perslist.data::mymodel.person" as "Persons"

create using "dev.devuser00.perslist.procedures::createPerson";

update using "dev.devuser00.perslist.procedures::updatePerson"

delete using "dev.devuser00.perslist.procedures::deletePerson";

          }

 

The service is not activated because of the update procedure (Even when bypassing the update, the delete does not work):

Error while activating:

Invalid procedure or parameter list in procedure "dev.devuser00.perslist.procedures::updatePerson".


Here is the update procedure:


PROCEDURE

    "devuser00_perslist"."dev.devuser00.perslist.procedures::updatePerson" (

        IN intab "devuser00_perslist"."dev.devuser00.perslist.data::mymodel.procedures.persNames",

        OUT outtab "devuser00_perslist"."dev.devuser00.perslist.data::mymodel.procedures.errors"

    )

    LANGUAGE SQLSCRIPT

    SQL SECURITY INVOKER

    DEFAULT SCHEMA "devuser00_perslist"

    --READS SQL DATA AS

    AS

begin

 

 

declare lv_firstname string;

declare lv_lastname string;

 

 

select FIRSTNAME, LASTNAME into lv_firstname, lv_lastname from :intab;

 

 

if :lv_lastname = '' then

    outtab = select 500 as http_status_code,

        'Invalid last name ' || lv_firstname as error_message,

            'No Way! Last name field must not be empty' as detail from dummy;

else

    update "dev.devuser00.perslist.data::mymodel.person"

        set FIRSTNAME = lv_firstname, LASTNAME = lv_lastname

        where LASTNAME = lv_lastname;

end if;

 

 

end;

 

I have also attached the perslist.controller.js, the perslist.view.js and the index.html.

 

I am in SP 7.

 

Can anyone plase have any clue ?

 

Many thanks in advance.

Can xsjob start automatically w/o activating in XS Administration Tool?

$
0
0

Hi all!

 

  O develped a job following this tutorial:

 

http://help.sap.com/saphelp_hanaplatform/helpdata/en/62/15446213334d9fa96c662c18fb66f7/content.htm

 

  And I noticed I have to go to XS Administration Tool to actually activate this job and make it run based on a cron. My question is, for every job I creat I need to go to XS Administration Tool to activate it? Is there a way of making every job run based on a cron w/o needing to activate in XS Administration Tool?

 

  In my project in the future we will develop several jobs and not always we will be able to access the XS Administration Tool to activate them. Thanks in advance!!!

ABAP ON HANA : AMDP : SQL Script : Convert LRAW to Charecter or string

$
0
0

Hello,

         i am fetching field CLUSTD from table STXL and its datatype is LRAW. My requirement is to convert RAW datatype to character or String. Please help me to get any SQL Script Function.

HANA GeoSpatial - how to build a polygon

$
0
0

i am wondering if any one has done this. i am trying to build a polygon based on a ST_Point and adding a distance, for example I have a Long and Lat point and i want to build an area of the St_point plus 50 km around my st_point.

 

I have seen how people calculate distances between two points or map a point, etc... which is fine.. my requirement, however, is to see if i can build a polygon based on a point and a given distance.

 

thank you in advance.

Disk_Size of dropped table (Removing table from Harddisk)

$
0
0

Hi Everyone!

 

Im facing following problem with SAP HANA Studio SPS9. I´ve tried some CSV-Import via ctl-File into some dummy table. I was loading 8 GB CSV into HANA. When i noticed that the "Size on Disk" from my dummy table only gets bigger and bigger after every import. I drop the dummy table everytime before  I import a new one. Even if i drop my dummy table, the size on the Disk wont change. Its only raising after each import. I allready tried to delete the entries with truncate and then merge the delta manually.

Here is a screenshot of the table with only 1 entry.

size.png

Is there any way I can get my Disk space back?

 

Thanks

 

 

Regards

Johann

Any documentation on base64_encode/base64_decode?

$
0
0

Hi benevolent HANA experts,

 

I am looking for examples for the SQL functions base64_encode and base64_decode.  Specifically, I am wondering if they can be used to insert a blob field from a SQL script, where the blob value is a base64-encoded string. Can someone point me in the right direction?

 

thanks!

Creating custom extraction rule *.hdbtextrulert object

$
0
0

Hi

 

I created custom extraction rules for text analysis in HANA in accordance to the documentation namely the rule itself is defined in a file with the *.hdbtextrule suffix and it is referenced in a custom configuration. The extraction itself works fine. What is puzzling me a bit is that upon activation of the *.hdbtextrule-file a new file gets created automatically which has the same name as the rule file but has the suffix *.hdbtextrulert

 

Textrule.png

 

As you can see from the screenshot it is inactive. As it does not harm the extraction process it is not an issue, but I am curious where this file comes from. I would guess that this is somewhat the runtime artefact (which would explain the rt-ending) but I could not find anything in help.sap.com and the corresponding guides on text analysis development  

 

Any hints appreciated :-)

 

BR

Christian

 

 

P.S. I am working an a HANA system with revision 96 and I create the artefacts in the Web-based development Workbench


Issue with creation of custom dictionary configurations for text analysis over HANA Trial Instance

$
0
0

Hi

 

I have got a chance to learn text analysis using HANA and have been practicing it over HANA trial instance(with user id: p1941461809trial) with help of several available tutorials.

 

I am looking forward to create a custom configuration file to enable custom Named-entity Recognition(NER) and POS tagging, in order to learn this, I have followed this link:

 

https://youtu.be/-CJaMqwvPoU?list=PLkzo92owKnVxJydpCHfOeHQmUsL2aRrgR

 

The tutorial describes the folder structureRepositories tab of SAP HANA Development perspective as:

 

Capture1.PNG

 

But my HANA trial instance gives the following folder structure:

 

Capture2.PNG

 

As a result of this, I am not able to access the configuration files while creating an index for a table i am using the following statement:

 

CREATE FULLTEXT INDEX myindex_mytable ON "xyz"."MYTABLE" ("STRING")

CONFIGURATION 'p1941461809trial.hana.helloworld::LINGANALYSIS_TEMP'

TEXT ANALYSIS ON;

 

The output received after executing this query is as follows:

 

Statement 'CREATE FULLTEXT INDEX myindex_mytable ON "xyz"."MYTABLE" ("STRING") ...'

successfully executed in 209 ms 761 µs  (server processing time: 29 ms 94 µs) - Rows Affected: 0

 

Question 1. Can someone please determine if we can create a custom configuration file as with HANA Trial Instance?

Question 2. If yes then, what mistake am I making in accessing the configuration file?

 

Thanks

Vikram

Handling exception in a for loop

$
0
0

Hi,

 

I want to write exception block inside a for loop like oracle as below.

 

for i in c1 loop

    begin

      insert into table values (i.id, i...);

 

    commit;

 

   exception when others then

     insert into erro_log values (i.id, i...);

 

   end;

end loop;


I want to handle same thing in hana. Is it possible in hana?


Does anybody knows how to handle exception in a for loop statement  or has an other solution to solve my problem described above?

 

Best regards,

Kishore



imdbworker02 indexserver not starting.

$
0
0

Sap Hana 96

Linux SUSE 11 sp 3

 

After redistribution after adding 2 hosts (imdbworker01 and imdbworker02)

 

after hana restart (soft)

 

imdbworker02 index server is not starting..

 

[37802]{-1}[-1/-1] 2015-07-01 19:22:20.993448 i PersistenceManag PersistenceManagerImpl.cpp(01373) : Garbage collection of history files running: 0 cleanup files of 0 done

 

this is filling the bottom of indexserver_imdbworker02_3003.000.trc

 

I have restarted with sapcontrol nr 00 -function StopSystem HDB

 

I have stopped HANA then run as

hdbadm

cleanipc 00 remove


df -h

is not showing signs of any near capacity volumes.

 

Your expertise is advised.

 

Thank you for your diligence,

Zachary

Multiple Rows using Json Input from PostMaster

$
0
0

Hi,

 

New to SAP HANA Odata servicess, I am trying to insert multiple rows using POST method from POSTMASTER in below formats

 

1. Json

2. XML

 

When I Insert multiple rows using Json object, i get below error

 

{

    "Odata": [

        {

            "MY_COL1": "Sadsad124511",

            "MY_COL2": 124511

        },

        {

            "MY_COL1": "Sadsad124512",

            "MY_COL2": 124512

        }

    ]

}

 

Error:  <message xml:lang="en-US">Resource not found for the segment &#x0027;Odata$batch&#x0027; at position 0.</message>

 

I can insert single entries using Json

        {

            "MY_COL1": "Sadsad124511",

            "MY_COL2": 124511

        }

 

 

I have exposed table ZTRANS with two columns MY_COL1(String) MY_COL2(Int) as ODATA service, my service definition is as below

 

 

service  {

 

   "P0_MAPPING"."ZTRANS" as "Ztranslation";   

 

HANA Multi-Node Migration AWS

$
0
0

Experts,
I am seeking advice on High Availability Data Migration to multi-host infrastructure..

 

A table that is about 44GB is taking a long time to distribute after adding hosts.  It locks a table that takes many writes per minute. I therefore cannot add hosts to the current production single host hana system.

 

The time between the Back Up of the Production Single Host Hana system and building a new multi host infrastructure; Recovering data to new instance, distributing, partitioning and distributing partitions,

IS IT POSSIBLE, Natively, I of course could write an application to do a consistency check,

to get the data that was being inserted into the production Single Host Hana system to the new multi host system?

 

How can I minimize down time as my data gets bigger the back up and data migration to new and bigger instances is taking longer and I am losing data?

 

I appreciate you input and diligence,

Zachary.

Running Explain Plan from within a Stored Procedure

$
0
0

I want to know if it is possible to run an "explain plan" from within a stored procedure? I have already seen posts about not being able to run an "explain plan" against a stored procedure despite the reference documentation not being clear on this: SAP HANA Reference: EXPLAIN PLAN

 

However, does anyone know if you can run an explain plan from a query being executed in a stored procedure call?

 

Thanks,

     Kevin

SQLBulkOperations not supported in SAP HANA

$
0
0

Hi,

When trying to perform bulk insert into HANA DB using SQLBulkOperations that new rows are not getting added.

 

The sample reference is from https://msdn.microsoft.com/en-us/library/ms712471%28v=vs.85%29.aspx.

But the above works for MS SQL Server 2008.

 

We need someone to help with same asap.

 

Details:

HANA DB Driver 1.0 Rev 90 (SP9) - 1.00.09.00

 

HANA DB Version

 


Calling a procedure via SDA

$
0
0

Hello Experts,

 

I have a user management application running on a HANA system. I also need to create the same user in a remote HANA system to enable SSO between both the HANA systems.

 

Is it possible to call a procedure in a remote system via smart data access? If I can not call the procedure directly, can I work with a procedure with result view and use that to write my "CREATE USER" statements?

 

Any input will be appreciated.

 

Thanks

Srini

Cyclic Dependency Error when calling a procedure from inside a procedure

$
0
0

I am working on a process that dynamically builds a list of sql statements, inserts them into a table, and then loops through that table executing the statements each of which inserts one or more records in another table.

 

Here is my 'inner' procedure, please pardon any typos/messiness, I can't cut and paste.

 

CREATE PROCEDURE BLD_TABLE

BEGIN

 

DECLARE CURSOR C_REC FOR

     SELECT statement FROM STMT_TBL;

 

DECLARE cmd varchar(511);

 

FOR cur_row as c_rec do

     cmd := cur_row.statement;

     exec cmd;

END FOR;

 

END;

 

If I call this procedure on its own, it works completely fine, however if I call it from within my other procedure I get a cyclic dependency error.

 

Another really interesting thing is that it doesn't say that the error is happening in my BLD_TABLE procedure, it says it's happening in the earlier BLD_STMT_TBL procedure.  But that part of the program works completely fine, as long as I don't call this BLD_TABLE procedure at the end.

 

Paraphrased for length etc, the error is something like this:

 

Could not execute call OUTER_PROCEDURE(params):transaction rolled back by an internal error:OUTER_PROCEDURE line 47 col 2:transaction rolled back by an internal error:transaction rolled back by an internal error: BLD_STMT_TBL line 36 col 1:transaction rolled back by an internal error: Cyclic dependency found in a runtime procedure:Not allowed to call/modify runtime procedure OUTER_PROCEDURE during it's execution.

 

As you can see from the above, I don't call or modify OUTER_PROCEDURE or BLD_STMT_TBL anywhere in this procedure.  Through process of elimination, it seems to be the cursor declaration statement that it doesn't like.

 

The only thing I can think of at all is that the STMT_TBL that is being used to make the cursor is being created and populated by the earlier BLD_STMT_TBL procedure.  But I don't see why it would see that as a cyclic dependency?

 

Does anyone have any idea what this error is actually trying to tell me?

Logout from SAPUI5 / XSJS page

$
0
0

Hello,

 

We have a built an SAPUI5 application on SAP HANA XS. In the shell there is a logout functionality in shell, but not sure on how to implement it. We are using the below code for the logout function (copied from online).

 

logout:function(){

    oShell.forceInvalidation();

    oShell.destroy();

    sap.ui.getCore().applyChanges();

    jQuery(document.body).html("<span>Logged out successfully.</span>");

},

 

But even though the page clears but on the browser refresh, it logs in automatically, which means it has not logged out really from the server / cookies.

 

Could you pls provide some pointers on how to implement this? whether the $ api's in XSJS provide any such functionality?

 

Thanks,

Chathia.

Change the display field name!!

$
0
0

Hi experts!!

 

 

   I have a query , my requirement is i need to change the display field of my out put.

 

my scenario is:

 

1.i have used TIMESTAMP in my attribute view in order to calculate the Quarter wise report.

 

2.my issue is in preview  the the quarter fields is displayed as 01 02 03 04

3.i need to change it as Q1Q2 Q3 Q4

 

what is method to change this so that the output shows Q1 Q2 Q3....

 

 

thanku

How to create two measures ???

$
0
0

Hi experts!!

 

i have a requirement  where i need to generate two measures for my reporting

is it possible to create two measures in one analytic view???

 

when i tried am not able to!!      getting error central table not unique!!!....i need two measures...so is it necessary to create calculation view for this??? how can i preceed with to get two measures togather??

 

Viewing all 6412 articles
Browse latest View live


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