0

trace_xe_action_map and trace_xe_event_map - what are those and where are they? I don't want to return those. How to change the parameters?

Currently I am using:

databaseMetadata.getTables(null, null, null, {"TABLE"} );
Qiu
  • 5,651
  • 10
  • 49
  • 56
Gigi
  • 31
  • 1
  • 1
  • 3
  • Did you Google before asking the question? Because the first Google result for trace_xe_action_map gives a hint... – Tom Jonckheere May 28 '15 at 05:39
  • Which DBMS are you using? If those are system tables, I'm pretty sure they are documented in the manual for your database. –  May 28 '15 at 05:58
  • MSDN says "Contains one row for each Extended Events action that is mapped to a SQL Trace column ID. This table is stored in the master database, in the sys schema." But I don't see it in the master database. – Gigi Jun 04 '15 at 06:27
  • I am using SQL Server 2012. I believes those are system tables. The problem is I don't want my java code return those. How to do that? – Gigi Jun 04 '15 at 06:27

2 Answers2

3

Assuming you're using MS SQL 2012 (or possibly later, but I haven't tried those). Try entering a schema name e.g:

ResultSet tableRS = dbMeta.getTables(null, "dbo", null, new String[] {"TABLE"});

as those tables have moved to sys.trace_xe...

0

By default all the tables in MS SQL are created in "dbo" default schema. So, to retrieve tables from meta data we have to mention the schema name. Note : if schema name is not mentioned all the tables will be returned.

ResultSet rs = connection.getMetaData().getTables(dbName, schemaName, null, new String[]{"TABLE"});
AKa
  • 11
  • 4