System tables are tables included behind the scenes by vendor RDBMS systems. For example, these are the tables found in master, msdb and model in sql server. They also appear when features such as cdc, merge replication, and other optional features are installed. This tag is for questions ...

learn more… | top users | synonyms

2
votes
2answers
42 views

List the underlying objects used in a SQL Server Function

I use the below to get a list of underlying objects in a View: SELECT view_name, Table_Name FROM INFORMATION_SCHEMA.VIEW_TABLE_USAGE WHERE View_Name IN ( 'View1', 'View2' ) ORDER BY ...
4
votes
1answer
87 views

Finding all joins required to programmatically join a table

Given a SourceTable and a TargetTable, I would like to programmatically create a string with all joins required. In short, I am trying to find a way to create a string like this: FROM SourceTable t ...
2
votes
2answers
319 views

Getting all databases which a sql logon can connect

I need to know all databases in a SQL Server on which a user can connect. With sys.databases I get all databases and with sys.server_principals or sys.syslogins I get all server logons. But I can't ...
0
votes
0answers
35 views

Forcing FK constraint to validated in system catalog

I have a big table (~60gigs, 35mill+ rows) that I need to add a FK to. Adding a FK directly to the table causes a validation which runs for about 30secs that I want avoid as it's a 30sec access ...
2
votes
1answer
53 views

Operator “~<~” uses varchar_pattern_ops index while normal ORDER BY clause doesn't?

Let's say I have a table with 1 000 000 records. Structure of table is: create table individual ( id serial primary key, surname varchar(128), "name" varchar(128), patronymic ...
0
votes
1answer
77 views

Is there are a way to restore System schema to it's original state?

I've installed Oracle 11g Database Enterprise Edition and my task was to import schemas. I'm totally new so I ran command: imp system/password file=path.dmp full=y And import everything (10 dumps, ...
0
votes
0answers
51 views

SQL utilization for processes and sessions

In Oracle you can check Utilization of processes and sessions with this select resource_name, current_utilization, max_utilization, limit_value from v$resource_limit where resource_name in ...
1
vote
2answers
143 views

How to find what frequent and/or large transaction have taken place in MS SQL Server?

Each day is experiencing about 1GB sum total of all the transaction log backups that day, while at the end of that week the Full DB backup is about 180MB. For a business database for buying/selling ...
3
votes
0answers
86 views

ASSIGN value for cmd in sysprocesses? What does it mean?

We're seeing some strange blocking behaviour in a production (SQL Server 2008 R2) system that we're investigating, and it seems to have one consistent and novel element: in the sysprocesses table, the ...
1
vote
0answers
74 views

SQL Server 2005 CHECKCATALOG fails

CHECKCATALOG is failing on a database that originated in SQL Server 2000. I am getting errors of the type: Msg 3853, Level 16, State 1, Line 1 Attribute (object_id=489156888) of row ...
1
vote
1answer
1k views

How list of netezza system tables/views?

Is ther a system table/view in Netezza wich permits to show the number of records for each table ? Thanks
0
votes
1answer
42 views

Possible Inconsistency Among System Tables

Is there a reason that there would be a significant difference in the number of records in the DBA_USERS table and the USER$ table?
0
votes
1answer
57 views

PHYSICAL_READ_BYTES_DELTA and PHYSICAL_READ_BYTES_TOTAL

What is the difference between PHYSICAL_READ_BYTES_DELTA column and PHYSICAL_READ_BYTES_TOTAL column in DBA_HIST_SQLSTAT table? Are they correlate? Please provide also an example.
0
votes
1answer
31 views

SQL Server 2005 Whole-Migration, which databases should I recreate?

In relation to my question about SQL Server 2005 migration procedure, I am re-creating the databases on the new server. I noted that the old server has the following databases (outside of System ...
2
votes
4answers
629 views

Oracle How to find Debug Compiled Stored Procedures/Functions

How can I get list of stored procedures/Function which are compiled for debug? I do not see relevant column in following tables. DBA_PROCEDURES DBA_OBJECTS
1
vote
2answers
272 views

Table not dropped correctly in SQL Server Express 2008

I've dropped a table but it is still listed in sys.tables. What's more confusing is that I can create the table again as one user, but if I log in as another user with the same permissions, I can't (I ...
1
vote
2answers
1k views

How to get columns from system tables or views like sys.database_files (SQL Server 2012)

How can I write a query to return all columns of, for example, the sys.database_files table? I see many suggestions for using information_schema.columns for getting table names for user ...
1
vote
1answer
2k views

Is there a way to determine automatic storage table spaces?

First off, we are on both Windows and AIX and are using DB2 ESE 9.7 FP 4. I am trying to determine dynamically whether or not table spaces are set up via automatic storage or not (so we can ...
0
votes
1answer
2k views

Oracle: list user-created tables in the SYS schema

I need to delete all tables (hundreds) in the SYS schema that someone accidentally created with sqlplus. Looking in dba_tables and dba_objects, I don't see a way to distinguish these tables from ...
16
votes
7answers
8k views

How to query a database for empty tables

Due to some 'developers' we had working on our system we have had issues with empty tables. We have found that during the transfer to the cloud several tables were copied, but the data in them ...
2
votes
2answers
350 views

Adding an index to a system catalog in Postgres

I'm having a situation very similar to the one described here: I've got a SaaS situation where I'm using 1000+ schemas in a single database (each schema contains the same tables, just different ...
4
votes
3answers
5k views

DBCC SHRINKFILE works with file_id but not with logical name

I am trying to shrink a database file but am running into errors. Using the file_id from sys.database_files works, but using the logical file name yields an error. The logical file name is the same ...
5
votes
1answer
1k views

Referencing system views in SSDT?

I've imported a database into SSDT containing a reference to a system view (specifically, sys.columns). The problem is, that I then get warnings about unresolved references when I build the project ...
3
votes
1answer
902 views

Different Results From sys.databases As Different Users

We have a SQL Agent job that is configured to run as user "dbo". This job gets a list of databases defined in sys.databases that match a naming scheme. The job then performs some dynamic SQL to ...
7
votes
2answers
774 views

Capturing datetime of change in SQL Server CDC

So we've started exploring using change data capture on one of our production databases. We'd like to know the datetime of each change. Reading through walkthrough's and tutorials etc it seems that ...