cancel
Showing results for 
Search instead for 
Did you mean: 

ODBC drivers installation in HANA express

shail_verma
Explorer
0 Kudos

I have installed HANA express using team viewer method. I need to install the ODBC driver. However I am not sure of root password. I am using SUSE Linux 12 in VMWare. Can anyone guide ?

Accepted Solutions (1)

Accepted Solutions (1)

dvankempen
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

You can find the answer to this question (and many, many more) on the SAP HANA Academy playlist for SAP HANA, express edition: https://www.youtube.com/playlist?list=PLkzo92owKnVy6nOZMFZIZxcvBCoRdshsR

Just edit the /etc/passwd file and a login shell for the root user. Using the passwd command you can set it to the value you want.

https://www.youtube.com/watch?v=gZ6xS-PXn7g&index=13&list=PLkzo92owKnVy6nOZMFZIZxcvBCoRdshsR

shail_verma
Explorer
0 Kudos

Thanks a lot :)! I didn't see it earlier. I had one more question though no completely related.

I am able to run SELECT / UPDATE queries into HANA Express . However when I try to do an UPDATE with WHERE clause, I get the following error.

***********************************************************

OLE DB provider "MSDASQL" for linked server "hxehost" returned message "[SAP AG][LIBODBCHDB DLL][HDBODBC] General error;-10210 Invalid command state (No prepared SQL command)". OLE DB provider "MSDASQL" for linked server "hxehost" returned message "[SAP AG][LIBODBCHDB DLL][HDBODBC] Base table not found;259 invalid table name: Could not find table/view NME_T in schema SYSTEM: line 1 col 13 (at pos 12)". Msg 7345, Level 16, State 1, Line 33 The OLE DB provider "MSDASQL" for linked server "hxehost" could not delete from table ""STS"."NME_T"". There was a recoverable, provider-specific error, such as an RPC failure.

****************************************************************

Would you have any recommendation for me.

Answers (2)

Answers (2)

shail_verma
Explorer
0 Kudos

Thanks Denys. I was able to get this to work. It was related to default schema of HANA user.

Appreciate your help.

dvankempen
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

I am not familiar with the data set but from the log file it appears that table/view NME_T is looked for in the SYSTEM and STS schema.

Could not find table/view NME_T in schema SYSTEM

could not delete from table ""STS"."NME_T"".

Maybe the ODBC connection requires the STS user and not SYSTEM? Maybe the code needs to set the schema first?

shail_verma
Explorer
0 Kudos

Denys

On a saperate note I wanted to check whether replication server is available in HANA express VM installation. I am trying to load a sample database into HANA express and I am looking for a good way to do it. Any pointers in this direction would be very helpful.

Thanks once again.

dvankempen
Product and Topic Expert
Product and Topic Expert

Hi,

You are welcome. Express is like any other HANA system with some limitations, most of which make sense if you think of it as an enterprise system scaled down to a personal development box. Replication Server does log-based replication for real-time synchronisation, this might be a bit heavy for your purpose. To load a sample database, you do not really need an external tool. Here is a blog, for example how to load SFLIGHT sample data: https://blogs.sap.com/2013/05/16/howto-import-sflight-sample-data-into-hana-from-a-local-computer/

If you do need to do something more advanced, you might want to look into Data Services. See Bob's playlist on this topic: https://www.youtube.com/playlist?list=PLkzo92owKnVwoiZBGjZFpnmpVKO1OD7Sw

shail_verma
Explorer

Thanks. This was really very useful 🙂

shail_verma
Explorer
0 Kudos

Denys,

On a separate note. I was using .NET SAP HANA connection library (as below) for mass data loading. Is this supported for HANA Express? Sample code below/

///<summary>

/// Insert data in bulk from the DataTable provided

///</summary>

///<param name="str_TableName">Schema.TableName</param>

///<param name="tbl_Data"></param>

///<param name="columns"></param>

///<returns></returns>

publicbool MassInsert(string str_TableName, DataTable tbl_Data, string[] columns)

{

string[] name = str_TableName.Split('.');

HanaConnection connection = newHanaConnection(_connectionString);

connection.Open();

HanaCommand cmd_Schema = connection.CreateCommand();

cmd_Schema.CommandText = string.Format("SET FORMAT {0}", name[0]);

cmd_Schema.ExecuteNonQuery();

HanaBulkCopy cmd_Bulk = newHanaBulkCopy(connection);

cmd_Bulk.BulkCopyTimeout = 1000;

cmd_Bulk.DestinationTableName = name[1];

cmd_Bulk.BatchSize = 1000;

cmd_Bulk.WriteToServer(tbl_Data);

cmd_Bulk.Close();

cmd_Bulk.Dispose();

connection.Dispose();

returntrue;

}