Syntax is as follows:
select top 50 m_tables.* from sys.m_tables
This blog is all about database technologies, including Oracle, SAP HANA and other stuff
June 08, 2012
Connect from jruby to SAP HANA 1.0 using JDBC
You can easily connect to SAP HANA 1.0 through jdbc installed with your HANA Studio on SAP HANA Client.
In case on jruby programming language it will look something like this:
require 'rubygems'
require 'java'
require 'ngdbc.jar'
driver = Java::com.sap.db.jdbc.Driver.new
props = java.util.Properties.new
props.setProperty("user", "<username>")
props.setProperty("password", "<yourS0oPaCo0lPWD>")
props.setProperty("autocommit", "false")
props.setProperty("reconnect", "false")
url = 'jdbc:sap://<hostname>:<port>/?'
conn = driver.connect(url, props)
statement = conn.create_statement
q = "SELECT 'hello from SAP HANA database' as name FROM dummy"
rs = statement.execute_query(q)
while (rs.next) do
puts rs.getObject('name')
end
statement.close
conn.close
Check out more at experiencesaphana and Official SAP HANA help.
o7_dictionary_accesibility in SAP HANA
sap hana for oracle administrators, in a nutshell :)
grant catalog read to <username>
as like as in Oracle <ALL|DBA|USER>_table SAP HANA you can do the following:
column store tables list: select * from m_cs_tables
row store tables list: select * from m_rs_tables
grant catalog read to <username>
as like as in Oracle <ALL|DBA|USER>_table SAP HANA you can do the following:
select * from m_tables
June 07, 2012
How to check SAP HANA table type
Type the following SQL in the SAP HANA Studio:
select tables.table_name, tables.table_type from sys.tables where tables.table_name = UCASE ('dummy')to get a list of tables with their types (row, column)
Subscribe to:
Comments (Atom)
-
Syntax is as follows: select top 50 m_tables.* from sys.m_tables
-
Type the following SQL in the SAP HANA Studio: select tables.table_name, tables.table_type from sys.tables where tables.table_name = UCASE...
-
see guide at x220.mcdonnelltech.com + update clover + remove old backlight kext, install RehabMan-IntelBacklight-2015-0918.zip for backlig...