Skip to Content
1

HANA XSA Import Privileges to import Data from CSV

Jan 03, 2017 at 03:18 PM

254

avatar image
Former Member

Hi Experts,

I am trying to import data from a CSV in HANA HDO container.

Altered the indexserver also by enabling the import_export parameter.

I use the same old sql statement as used in HANA XSC:

import from '/mnt/share/data.ctl';

It drops an error saying:

Insufficient Privileges: Not authorized

The CTL is file is correctly built, since whenever i change the schema inside the CTL file it drops an error.

It seems to be some privilege issue since i am running this from SYSTEM user in HANA studio.

Can someone guide how to solve this.

Thanks,

Abhishek.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Florian Pfeffer
Jan 04, 2017 at 07:35 AM
-1

By default no user has any privileges for the HDI generated schema or objects, even not the generated technical user used to access the db artifacts. For the technical user a "default_access_role.hdbrole" can be defined in the src/defaults folder.

For your case I would define a role in the XSA application db module (for which it is required) which gives the required object or schema privileges. After building the module the role can be assigned to the required user using a user with the User Mgmt system privilege (consider that the user SYSTEM cannot be used to assign privileges/roles to himself, for that another user has to be used - in a "dirty world" for instance XSA_ADMIN could be used, but a dedicated user management user is recommended).

Following is a role described which provides different schema privileges. Details about your required privileges can be found in the authorization trace (when you activate it):

{
	"role": {
		"name": "xsa_misc.db.roles::dummy_access_role",
		"schema_privileges": [{
			"privileges": [
			        "CREATE ANY",
					"SELECT",
					"INSERT",
					"UPDATE",
					"DELETE",
					"ALTER",
					"DROP",
					"EXECUTE"
				]
			}
		]
	}
}

Regards,
Florian

Show 3 Share
10 |10000 characters needed characters left characters exceeded
IMPORT 

is a system privilege which can not be assigned to a role in HDI module .hdbrole file.

At least on SPS03 it will through

Error: com.sap.hana.di.role: Database error 258: : insufficient privilege: Not authorized [8201003]

during Build process.

0

Hm, you are saying that it is not possible, but on the other hand you are asking here how this is possible. Because of that I do not really understand your comment here, especially because my answer is not related to system privileges!

0

Hi Florian! Original question was about IMPORT FROM CSV and INSERT schema_privileges is required but not enough.

0