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

Re: Books/ practice problems/Practice website for SQL

$
0
0

Ok, let's just say you did not mean to ask for any copyright protected material to be "shared" with you...

 

Learning SQL and database programming can be done with a gazillion books and websites out there. So, the search engine of your flavour is your best tool in this case.

 

Here however, are a some pointers to what I personally found very useful during my journey so far:

  • Lex de Haan and Toon Koppelaars, Applied Mathematics for Database Professionals,
  • Database in Depth, C.J. Date, O'Reilly (more theoretical approach)
  • Any book from Joe Celko on SQL - these are classics
  • Inmon - Building the Data Warehouse
  • Blogs, Articles and Books from Tom Kyte, Cary Millsap, Jonathan Lewis, Richard Foote (all Oracle related, but a lot is about general system design, analysis and SQL)
  • Many SAP notes, walk-throughs, presentations, chats from/with/of Martin Frauendorfer
  • Simple Talk: SQL Server and .Net articles, forums and blogs
  • As a try-out tool SQL Fiddle is my current favourite - would be great to get it to support HANA, too
  • http://code-fight.club/?language=sql more on the entertaining side 

 

Beyond that there are of course plenty of free online learning classes.

In my experience however, practice makes master, so try to solve certain tasks with SQL. The Celko books are just great for that.

 

Ok, this should get you started and busy for the rest of the year (given you've actually got a real life, too).

 

- Lars


Re: HDB stop - FAIL: Timeout

$
0
0

Hi,

 

 

I would not go 'Kill -9' on HANA services unless advised by SAP Support after deeper analysis.


SIGKILL will interrupt the process without giving it the chance to gracefully finish what is doing. This scenario oepn spaces for db inconsistencies as far as I can tell.

 

If you're trying to stop tenant dbs and that's getting stuck for some reason, try stopping the whole system from the SYSTEMDB tenant first. If you still face the issue I believe it's better to open a sap support incident to have a deeper analysis before going ahead and killing a process from the OS level.

 

btw: not sure if this is your case, but you might be seeing processes from the SYSTEMDB tenant in the OS level, which is of course totally fine. If you still see the hdbindexserver process belonging to your tenant after trying to stop it, then the approach above (system restart) should have an effect. However, restarting the system could erase the possibilities of having the root cause analyzed. Therefore, it is still better to create an SAP support incident. Take a few runtime dumps before doing so, and attach full system dump to the incident.

 

 

BRs,

 

Lucas de Oliveira

Re: Calculation View - comparing two tables and taking only whats different

$
0
0

So, if I understand correctly, then D-1 contains only yesterdays data and D-2 the data from the day before yesterday.

 

If that's true, one simple and efficient approach would be to perform a UNION of both tables, mapping the quantity information to a separate column each (with a constant 0 in the "missing" component).

Once this is done, an aggregation melts the records together and a calculated column can deliver the difference/delta value.

 

Let me know how you go with that.

Re: Calculation view slow when quering only dimension

$
0
0

For the cases where you don't need to show only "booked" values, it's typically better to use the attribute/dimension views directly as sources for the value lookup.

Prevent Objects Deletion from _SYS_BIC by Users only having SELECT privilege on _SYS_BIC

$
0
0

Hi Friends,

 

I know whenever we create a model in a Package and activate it, the runtime Column views are created and stored under Column Views section of _SYS_BIC schema.


By giving the SELECT Privilege on  _SYS_BIC to my USER(say Usr1), he is able see the all the Column Views created under _SYS_BIC,

for which he is able to see the definition as well as the corresponding Data Preview.


Now I have 2 requirements which are listed below:

 

  1. Even though Usr1 has only Select Permission on _SYS_BIC but still he is able to Right Click and Delete any object from _SYS_BIC how to restrict this.
  2. Also how do I prevent Usr1 from being able to Right Click and see the definition of Views using View Definition.

 

 

 

Thanks & Regards

 

Nagarjuna

Alter command for UPDATE CASCADE not changing the Table Definition

$
0
0

Hi Friends

 

 

 

When I open the DEFINTION of a Table which holds FOREIGN KEY it looks like this:

 

CREATE COLUMN TABLE "XXXXXX"."master_sample"

("ID" INTEGER CS_INT,"NAME" VARCHAR(20),"D_O_B" DAYDATE CS_DAYDATE,

  PRIMARY KEY ("ID")) UNLOAD PRIORITY 5 AUTO MERGE ;

 

ALTER TABLE "XXXXXX"."master_sample" ADD FOREIGN KEY ( "NAME" ) REFERENCES "XXXXXX"."age_sample" ("C_NAME")

ON UPDATE RESTRICT ON DELETE RESTRICT

 

 

I run an ALTER COMMAND to get CASCADE effect on UPDATE &  DELETE Operations with the following syntax.

 

 

ALTER TABLE "XXXXXX"."master_sample" ADD FOREIGN KEY ( "NAME" )

REFERENCES "XXXXXX"."age_sample" ("C_NAME") ON UPDATE CASCADE ON DELETE CASCADE;

 

 

 

I run it for Multiple times Successfully.

 

 

But again when I Open the Definition I still see the RESTRICT effect on UPDATE &  DELETE Operations..

 

 

So how do I change my Table Defintion from ON UPDATE RESTRICT ON DELETE RESTRICT

to    ON UPDATE CASCADE ON DELETE CASCADE ?????


Because of this i am not able to UPDATE the data in PRIMARY KEY Column holding Table(in the above example "age_sample")

 

 

 

Regards

 

Nagarjuna

 

 


Re: Calculation View - comparing two tables and taking only whats different

$
0
0

Lars,

 

There is one problem... I don´t need the difference... If the data has changed, I need to send the quantity present on D-1...

Do you think it would be possible with your approach?

 

Thanks!!

Cris

Re: Data Validation from External Web service

$
0
0

Hi Thomas,

Please excuse my ignorance on this subject as these security mechanisms aren't something I fully comprehend at this point. Your links have provided a good starting point for me to go on.

 

Thanks fo the help.

 

Cheers,

Shyam


Re: Calculation View - comparing two tables and taking only whats different

$
0
0

In that case, don't compute the difference :-)

 

To be honest, I only now understand that you want to filter out the records where no change happened and keep only those where there is a difference... *slow-thinking-today*...

 

I see the following approaches here:

  1. You do a scripted calc. view and use "the power of SQL" to select all the records in TAB-1 that are not in TAB-2. The seldom used EXCEPT operator would be a good choice here.
    or
  2. Instead of the difference, you calculate an indicator (changed? Yes/No) on which you filter

 

In fact I would probably do the whole thing in a plain SQL view anyhow - much less overhead from a design perspective and very expressive for this requirement.

So, my recommendation would be to do version 1.

 

- Lars

Re: Calculation View - comparing two tables and taking only whats different

$
0
0

This would be an example code for this problem (on anyDB, but works in HANA the same way):

SQL Fiddle

 

Note that the requirement to print out

StoreB                  MatB                    0


is not fulfilled with that.

And to be honest, I don't really see the reasoning behind that,

StoreB/MatB did't change. It simply doesn't occur in D-1...




Re: Calculation View - comparing two tables and taking only whats different

$
0
0

Thank you very much, Lars!!  This was really very helpfull and will definetely solve my problem!

 

Best Regards!

Cris

Re: HANA Live Models - Install CRM before CRM for Utilities?

$
0
0

Hi All,

 

It appears that HANA Live for CRM Utilities references HANA Live for CRM for common objects like Countries and Counties(Region,State,Province). Still have not got the views to work yest, but getting closer. Will report out final outcome.

 

John Hawk

SSO with SAP HANA and SAP Lumira server for HANA

$
0
0

Hi everybody,

I'm trying to setup SSO for SAP HANA SPS09 and Lumira server on top of HANA with usage of Windows Active Directory.

 

My question is related to maintenance of users and roles in SAP HANA and SAP Lumira server for HANA.

Is there possibility to map Roles to Active directory groups (similar like BO implementation of SSO) and in that case for users to maintained on AD only.

Example if User_A is added to AD group "Group1" which would be linked in SAP HANA to role "Role1" to be added by automatism to  "Role1" group in SAP HANA.

 

Is something like this possible?

Re: How to check constructed string is timestamp format or not in SQL Script?

$
0
0

Thank you Naoto !

I'll modify your UDF to ISDATE() and ISTIME() .

 

Thanks again,

JT

How do I expand my HANA Persistence Data disk/volume?

$
0
0

We have a SAP BW on HANA systems, our data disk/volume is almost full, the SAN storage limitation  do not allow to expand the size, is it possible to add another data disk/volume to existing nodes? It is a 3+1  node scale out installation.

 

Currently system have mnt00001, mnt00002 and mnt00003 , unable to expand these volumes from SAN, we are not using LVM also. I couldn't find any documentation where HANA can support more than one persistence disks/volumes on each node.

 

We are trying to avoid creating a larger disk/volume and copying existing volume to that,

 

Let me know if you have came across the same or what will be the ideal solution,

 

Appreciate your help

 

Santosh


Re: Calculation view slow when quering only dimension

$
0
0

Hello,

 

In addition to what Lars stated, I'd check if all your joins are using appropriate cardinality.

 

By the looks of your model I'd set left outer from data foundation to dimension CVs and if the cardinality is set correctly the optimization process that runs before execution could remove unwanted joins.

 

I believe that would work by default from SP09 on... at least that's what my test shows. Here's a snapshot of my test model and result for LOV query:

starjoin_dims_lovs.png

 

BRs,

Lucas de Oliveira

Information Steward access to SLT schema for temp tables

$
0
0

Hi folks,

 

I have a colleague working on an Information Steward proof of concept for pulling master data from HANA.  He asked me to setup a HANA user for Information Steward to connect and read from our default schema that contains all tables replicated from SAP via SLT.  Let's call this SAP_SCHEMA.  Let's call the Information Steward user and schema INFO_STEWARD.  The INFO_STEWARD user has full access to it's own INFO_STEWARD schema and I also gave him SELECT_USER role against the SLT schema named SAP_SCHEMA.  But when they run their job they get error that they can not CREATE temporary table against SAP_SCHEMA. 

 

Normally we never allow any user except SLT user to create tables in the SAP_SCHEMA.  All users have SELECT only.  But as a test I humored him and gave POWER_USER role against SAP_SCHEMA, had him run his load job and then I monitored M_TEMPORARY_TABLES.  Suddenly his job started working and I watched 500+ temporary tables fill up M_TEMPORARY_TABLES, however they all listed the temp table schema as INFO_STEWARD schema.  So I'm completely puzzled; if all the temp tables are created in it's own INFO_STEWARD schema then why does it need CREATE against SAP_SCHEMA??  My only theory is that it truly created a single temp table in SAP_SCHEMA but it happened and dropped so fast that I could not see it with my own eyes.  Whereas the other 500+ I could see sitting there for several minutes before they were dropped.

 

Are there any Information Steward users out there whom can explain to me why it would need CREATE against the SLT schema where our source tables live?  I'm hoping it's some sort of configuration problem on the Information Steward side as we do not want to doll out create access.  Other system users we have such as MicroStrategy only have read access to the SLT schema and create temp tables fine in their own MicroStrategy schema.

 

Thanks for any insight you can provide!

-Patrick

Re: How do I expand my HANA Persistence Data disk/volume?

$
0
0

Hi Santosh

 

the RAM-to-Disk ratio for SAP HANA systems is fixed and defined during the system setup.

There is no build-in command to grow or add data volumes.

If your instance should "grow" and your server allows for more RAM and CPU usage then you can take a backup of the existing system and restore it into a new system that had been set up with the larger data volume.

 

Alternatively, since scale-up is not all that often an option, you might use scale-out instead and add not just more disk, but also new nodes.

 

But the one-persistence-per-node is a core concept of the shared-nothing cluster of SAP HANA.

Stored procedures in sap hana

$
0
0

i want step by step process guide to learn stored procedures in sap hana

Thanks in advance

Re: Stored procedures in sap hana

$
0
0

check out the developer guide - there are two types design time (suggested) and run time.

design time stored procedures (.hdbprocedure) are easy to transport.

 

stored procedures are reusable database objects to perform CRUD operations against a database table or set of tables.

 

create a HANA or XS project - create a file .hdbprocedure and follow the developer guide.

there may be syntax issues you will encounter... check out the sql script guide.

 

good luck

Viewing all 8968 articles
Browse latest View live


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