on 01-15-2015 12:06 AM
Hi Folks,
This might be a strange requirement,
hdbsql -i 01 -u system
Password:
Welcome to the SAP HANA Database interactive terminal.
Type: \h for help with commands
\q to quit
If i run like this then password is invisible,
But if i run like this i dont get prompted for a password screen where i can enter
hdbsql -i 01 -u system -I temp.sql
* -10709: Connection failed (RTE: Kerberos error. Major: "unspecified ", minor: "No credentials cache found"
I dont want to use it like this : hdbsql -i 02 -u system -I temp.sql -p *******
Also i dont want to use the existing hdbsuserstore key.
Is there a way to achieve this?
Message was edited by: Tom Flanagan
Hello,
this depends on what you want to achieve - do you want to run one time manually from command line set of SQL scripts from file? if yes then you can use following approach:
sidadm@hanahost:/usr/sap/SID/HDB10> hdbsql
Welcome to the SAP HANA Database interactive terminal.
Type: \h for help with commands
\q to quit
hdbsql=> \c -i 10 -d SYSTEMDB -u SYSTEM
Password:
Connected to SID@hanahost:31013
hdbsql SYSTEMDB=> \i temp.sql
OBJECT_CATEGORY,SCHEMA_NAME,OBJECT_NAME,OBJECT_TYPE,OBJECT_OID
0 rows selected (overall time 168.104 msec; server time 21.650 msec)
if you want to use script to call this on regular basis then you should define new user store entry or use existing one and then use -U parameter
sidadm@hanahost:/usr/sap/SID/HDB10> hdbsql -i 10 -d SYSTEMDB -U HDBUSER -I FILE.EXT
Tomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Tomas,
Guten Tag!
is there no way to achieve using this : hdbsql -i 01 -u system -I temp.sql
everytime do i need to go into hdbsql and then connect?
I dont want to use hdbuserstore key at the moment since there is a risk if my key is added anybody logging as sidadm user can use the key and login into the database.
I want to hide the password using this : hdbsql -i 01 -u system -I temp.sql
will it be possible ?
The problem here is that you seem to be sharing a O/S user account.
The hdbuserstore information are saved in an encrypted file in your O/S user home directory.
To protect the logon data from being used by someone else, simply don't share the same O/S user account then.
Providing the logon data in the command line and/or storing it in a .sql file are really bad ideas security wise.
- Lars
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.