database - default schema name in netezza query log -


i looking default schema name using particular query has been executed(if table name not qualified).in netezza logged queries stored in histdb, can find out default database logged queries, not able default database against queries. can default schema database in '_v_database' meta data view.but user can change default schema before executing query using 'set schema command'. want know information default schema under query has been run.

if system configured use schemas and history database of proper version (v2 or v3) support recording schema, can find schema given query connected when ran.

look schemaname column in $hist_query_prolog_n (e.g. version 3, $hist_query_prolog_3 )table in history database. this documented thoroughly here.

remember need quote history table names in queries.

select schemaname "$hist_query_prolog_3"  querytext 'select count(1)%';  schemaname  ------------  schema_a  schema_b  schema_a  schema_a (4 rows) 

Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -