作者:ABAP之家

来源:ABAP之家 http://www.abap.cn

关键词:ABAP之家,Python链接SAP HANA数据库

Python链接SAP HANA数据库

import pyhdb


connection = pyhdb.connect(

host="www.abap.cn",

port=30015,

user="SYSTEM",

password="Chinaabap"

)


cursor = connection.cursor()


cursor.execute("SELECT SCHEMA_NAME, TABLE_NAME FROM TABLES")

#cursor.fetchone()


print(cursor.fetchall())


connection.close()