Monday, February 9, 2015

SQL Server -- Different BACKUP Methods

If you know SQL Server, you probably know there are different types of backups that you can perform.  In this post I will briefly reference each backup type, and show you how to perform each backup using tSQL.

These are the different backups that I will cover:
  • Full
  • Differential
  • Transaction log
  • File 
  • Filegroup
  • Partial
  • Copy-Only

Full Backup - I think it's safe to say that this is the most common backup type.  The Full backup creates a complete backup of your database, to include all files and filegroups. This can be used for complete database restoration.   This is the tSQL statement you will use:

       BACKUP DATABASE DBName
       TO DISK = 'C:\MSSQL\Backup\DBName.BAK'
       GO

Differential Backup - This differential, or 'diff' as is commonly said, is a backup of changes that have occured since the last full backup was created.  This is the tSQL statement that you will use:

      BACKUP DATABASE DBName 
      TO DISK = 'C:\MSSQL\Backup\DBName.DIF' WITH DIFFERENTIAL
      GO

Transaction Log Backup - This is only applicable if your database is set to Full or Bulk-Logged Recovery Model. Using the Transaction Log backup with the Full backup will allow you to create a point in time restore. This is the tSQL statement that you will use:
     BACKUP LOG DBName 
     TO DISK = 'C:\MSSQL\Backup\DBName.TRN'
     GO
File Backup - This backup type allows you to backup each database file independently. This only applies if you have multiple data files, which is commonly done to allow for better performance, by spreading your database objects across multiple filegroups, which exist on different disk allocations. In this example, our DBName database has two data files, and this is the tSQL statement that you will use:

    BACKUP DATABASE DBName 
    FILE = 'DataFile1' 
    TO DISK = 'C:\MSSQL\Backup\DBName_DataFile1.FIL'
    GO
    BACKUP DATABASE DBName 
    FILE = 'DataFile2' 
    TO DISK = 'C:\MSSQL\Backup\DBName_DataFile2.FIL'
    GO

FileGroup Backup - Similar to the File level backup, we can also do FileGroup backups. Only applicable, of course, if you have multiple filegroups, but this allows you to target all objects on the given filegroup.  I, personally, have used this before in a horizontally partitioned database. We had a handful of Read-Only filegroups, containing historical data that never changed. These were ignored in the backup routine, which helped preserve resources by targeting only the Read-Write filegroups. This is the tSQL statement that you will use:

    BACKUP DATABASE DBName
    FILEGROUP = 'DBName_HistoricalData' 
    TO DISK = 'C:\MSSQL\Backup\DBName_HistoricalData.FLG'
    GO

Partial Backup - The Partial backups can also be used to ignore Read-Only filegroups.  As the name implies, this will allow you to partially backup the database.  This is the tSQL statement that you will use:

    BACKUP DATABASE DBName READ_WRITE_FILEGROUPS
    TO DISK = 'C:\MSSQL\Backup\DBName_Partial.bak'
    GO

Copy-Only Backup - A Copy-Only backup is very much like creating a 'snapshot' of your database.  It is completely independent of, and will not impact your backup strategy. This is the tSQL statment that you will use:

    BACKUP DATABASE DBName
    TO DISK = 'C:\MSSQL\Backup\DBName_CopyOnly.bak'   
    WITH COPY_ONLY
    GO

That's about it.  Please take a look at my other post for the different RESTORE methods.

SQL Server Reporting Services -- Report Permissions

One of my customers called me this morning with some questions regarding SSRS security. Specifically, he was having problems privileging his end users for reports he had created. He wasn't sure what to check, but this was the error the user was receiving:

  An error has occurred during report processing.
  Cannot create a connection to data source 'DATASOURCENAME'.
  For more information about this error navigate to the report   
  server on the local server machine, or enable remote errors

The user in question was able to launch Report Manager, but any attempt to open a report failed with the above message. After review, we confirmed the user was not privileged in the appropriate database. At this point, I explained the Role-based security model, and the different levels of SQL Server object privileges that are necessary. The problem was resolved when we enabled the correct database permissions for the user.

This post is just a quick query that you can use to see what roles and permissions are assigned to different report server objects.

     USE ReportServer;

     SELECT 
          u.UserName [User], 
           r.RoleName [Role], 
          r.Description [PrivilegeDescription], 
          c.Path [ObjectPath], 
          c.Name [ObjectType] 
     FROM
          dbo.PolicyUserRole pur INNER JOIN dbo.Policies p
             ON pur.PolicyID = p.PolicyID INNER JOIN dbo.Users u 
                ON pur.UserID = u.UserID INNER JOIN dbo.Roles r 
                  ON pur.RoleID = r.RoleID INNER JOIN dbo.Catalog c 
                     ON pur.PolicyID = c.PolicyID
     ORDER BY
          u.UserName   


This is an example of the output you will receive:

  User                 Role        PrivilegeDescription                                                  ObjectPath         ObjectType
  DOMAIN\login  Browser   May view folders, reports and subscribe to reports.    /Data Sources     Data Sources
  DOMAIN\login  Report Builder    May view report definitions                               /FolderName/rptname   Report


Please look here for more detail regarding the SSRS object security assignment for reports, report models and resources, and the report data sources.  

Wednesday, February 4, 2015

SQL Server Database Mirroring... Error Msg 1412

I had the craziest problem happen recently.  Not that it shouldn't have happened, but the error return that I received from SQL Server did not indicate the problem very clearly at all.  I spent two days reading and researching... only to find a very obvious problem, that never should have happened.

A little background.... A customer of mine had a v2008 R2 SQL Server where 5 databases were mirrored, using Database Mirroring.  The server was old and over-used, so they bought a new server, dedicated for the mirror, high performance, no witness.  To implement, I needed to break the current mirroring session for each of the 5 databases, and build it back up on the new server.  I have listed my steps here briefly, and then provided further detail for each following the list.
  1. Turn off mirroring on PRINCIPAL
  2. Drop Endpoint on Mirror
  3. Drop Database on Mirror (Won't do this until after the new mirrored instance is defined)
  4. Create FULL backups of databases and logs, copy to MIRROR server
  5. On MIRROR restore database xxx WITH NORECOVERY
  6. On MIRROR restore database log xxx WITH NORECOVERY 
  7. Re-use endpoint on PRINCIPAL  (Not dropping/recreating it, just re-using the same endpoint)
  8. Create new endpoint on MIRROR (mimicking the PRINCIPAL endpoint) 
  9. On MIRROR, create partnership to PRINCIPAL
  10. On PRINCIPAL, create partnership to MIRROR
  11. On PRINCIPAL, set partner safety off (Thus, High Performance mode)

-- #1. Turn off mirroring on PRINCIPAL
ALTER DATABASE xxx SET PARTNER OFF;

-- #2. Drop Endpoint on MIRROR 
DROP ENDPOINT endpointname;

-- #3. Drop Database on Mirror (It's a placeholder. Do not do this until new mirror is good.)
DROP DATABASE xxx

-- #4. Create FULL backups of databases and logs (I backed up to the Mirror Server via UNC)
-- full db backup
BACKUP DATABASE xxx
TO DISK = '\\MirrorServer\E$\TEMP\xxx.bak' 
WITH FORMAT
GO
-- full log backup
BACKUP LOG xxx
TO DISK =  '\\MirrorServer\E$\TEMP\xxx_Log.bak'  
WITH FORMAT
GO                                 

-- #5. On MIRROR restore database xxx WITH NORECOVERY
RESTORE DATABASE xxx
FROM DISK = 'E:\temp\xxx.bak'
WITH 
MOVE 'xxx_dat' TO 'E:\MSSQL\DATA\xxx_Data.mdf', 
MOVE 'xxx_log' TO 'F:\MSSQL\Log\xxx_Log.ldf',
NORECOVERY;

-- #6. On MIRROR restore database log xxx WITH NORECOVERY
RESTORE LOG xxx
FROM DISK = 'E:\temp\xxx_Log.bak' 
WITH NORECOVERY;  

-- #7. Re-use endpoint on PRINCIPAL
CREATE ENDPOINT endpointname
AUTHORIZATION [DOMAIN\sqlservice]
STATE = STARTED
AS TCP (LISTENER_PORT= 5023, LISTENER_IP = ALL)
FOR DATA_MIRRORING (ROLE = PARTNER, AUTHENTICATION = WINDOWS NEGOTIATE,
ENCRYPTION = REQUIRED ALGORITHM RC4)        

-- #8. Create new endpoint on MIRROR
CREATE ENDPOINT endpointname
AUTHORIZATION [DOMAIN\sqlservice]
STATE = STARTED
AS TCP (LISTENER_PORT= 5023, LISTENER_IP = ALL)
FOR DATA_MIRRORING (ROLE = PARTNER, AUTHENTICATION = WINDOWS NEGOTIATE,
ENCRYPTION = REQUIRED ALGORITHM RC4)

-- #9. On MIRROR, create partnership to PRINCIPAL
ALTER DATABASE xxx SET PARTNER = N'TCP://PrincipalSrvName.DOMAIN.Local:5023' 

-- #10. On PRINCIPAL, create partnership to MIRROR
ALTER DATABASE xxx SET PARTNER = N'TCP://MirrorSrvName.DOMAIN.Local:5023'

-- #11. On PRINCIPAL, set partner safety off 
ALTER DATABASE xxx SET PARTNER SAFETY OFF;


Basically, that's it. I tested the process successfully twice in my own environment, but with two KEY differences.  First, my Principal and Mirror were two named instances on the same physical SQL Server, whereas the Customer had two physically separate SQL Servers.  Secondly, I used the MOVE statement in the RESTORE in step #5.  I used this in my own testing successfully, so I didn't think that I needed to avoid the MOVE when actually doing it in production. *WRONG*WRONG*WRONG* If I could type bells and whistles here, I would.  I used the MOVE for two reasons:  

1. Because I built a new server for the Customer, with a completely different directory path structure.
2. Because step #4 of the example in this reference does not say we 'MUST USE IDENTICAL PATHS'.  Rather, the reference says that 'IF the paths differ....'.  For that statement alone, I thought that the effort could be done with different directory paths on the Principal and Mirror.  At least in my implementation, that was definitely not the case.  

This became clear to me at step #9.  All steps completed successfully to that point, but step #9 failed immediately with this error:

Msg 1412, Level 16, State 0, Line 1
The remote copy of database "xxx" has not been rolled forward to a point in time that is encompassed in the local copy of the database log.

This is what I meant by the unclear error return.  Not just the less than intuitive return, but BOL's instructions for preparing the database(s) for Mirroring actually gives an example using the MOVE statement. It was not until several days later, and an assist from one of my SQL buddy gurus, that I realized this failure was being caused by different directory paths on the Principal vs the Mirror.  

I very humbly explained the problem to the Customer;  The Server Team rebuilt the box, and I repeated all of the above efforts WITHOUT the MOVE statement in Step #5.  The directory path structure on the Mirror mimicked the Principal, and I completed the new mirror deployment successfully.

Tuesday, February 3, 2015

Msg 3241, The media family on device 'XXXX' is incorrectly formed.

I was restoring some databases recently, and ran into an error I wanted to share with my readers. I had backed up both Report Server databases, and copied the bak files to the DR server, where I intended to restore both as a redundancy. The backups worked just fine, but the RESTORE failed with the error in the post title.  This is the statement and the error:



Odd. I had just created the bak file myself. Haven't had any problem writing TO the disk, so how could it be corrupt? I decided to create another backup and attempted the restore again -- same error. Off to Google.... surprising how many posts I find on the same error, but the causes just did not fit mine --

So I backed out of everything and reviewed my logic, and recognized that my backup type was wrong. As you know, we do the RESTORE from different backup file types.  I was attempting to RESTORE from a .bak, but had the 2 in my statement, which is for the trn. 

After I corrected the backup file type to 1, for database backup, I was able to RESTORE from ReportServerTempDBLog.bak without error.  Same statement, just a correct file type.



SQL Server EXISTS vs IN

There are many different opinions on the use of EXISTS vs the IN list.  While they are logically different, many people say that they are identical in terms of performance.  I know they may seem very close to the same, but they are not.  In this post, I am going to demonstrate the performance difference of a very simple SELECT;  first done with EXISTS, then with the IN list.  I have included two quick tables and the population thereof.  Then we've got the retrieval using EXISTS and IN, along with the statistics generated by each of the statements.

-- TableA
IF OBJECT_ID('TableA','U') <> 0
DROP TABLE dbo.TableA
GO
CREATE TABLE dbo.TableA (
 ColumnA INT
) ON dba_data  -- rename as needed
GO

-- TableB
IF OBJECT_ID('TableB','U') <> 0
DROP TABLE dbo.TableB
GO
CREATE TABLE dbo.TableB (
 ColumnB INT
) ON dba_data -- rename as needed
GO

Ok.  Now let's load some data into both test tables.  This is just a very simple method that I use when I'm stress testing, and I need test data sets.  I am auto-incrementing the data while inserting, to generate unique values.

-- Load both tables
DECLARE @a INT
SET @a = 1
WHILE @a <= 200000
BEGIN
  INSERT dbo.TableA VALUES (@a)
  SET @a = @a + 1
END;

DECLARE @b INT
SET @b = 20
WHILE @b <= 120
BEGIN
  INSERT dbo.TableB VALUES (@b)
  SET @b = @b + 1
END;

-- check your rowcounts
SELECT COUNT(*) FROM dbo.TableA
SELECT COUNT(*) FROM dbo.TableB

And now for our retrieval.  We are looking for everything in TableA that does not exist in TableB. In this first SELECT we are using EXISTS.  Please also note that I am using STATISTICS IO ON/OFF to gather the statistics generated by the statement.

/* USING EXISTS */
SET NOCOUNT ON; -- just getting the rowcounts out of the test
SET STATISTICS IO ON;

SELECT * FROM dbo.TableA a 
WHERE NOT EXISTS(
  SELECT 1 FROM dbo.TableB b 
  WHERE a.ColumnA = b.ColumnB)

SET NOCOUNT OFF;
SET STATISTICS IO OFF;

Same same on the SELECT here, but now we are using the IN list.

/* USING THE IN LIST */
SET NOCOUNT ON;
SET STATISTICS IO ON;

SELECT * FROM dbo.TableA a 
WHERE a.ColumnA NOT IN(
  SELECT ColumnB b FROM dbo.TableB)

SET NOCOUNT OFF;
SET STATISTICS IO OFF;

These are our collected statistics -- first for the EXISTS, then for the IN list:

Table 'Worktable'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'TableA'. Scan count 1, logical reads 338, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'TableB'. Scan count 1, logical reads 1, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.

Table 'TableB'.Scan count 9, logical reads 200005,physical reads 0,read-ahead reads 0,lob logical reads 0,lob physical reads 0, lob read-ahead reads 0.
Table 'TableA'. Scan count 5, logical reads 338, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'Worktable'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'Worktable'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.

Look at those scan counts, and the logic reads!  I realize this is just a small example, but the difference is very clear, both logically and physically.



Thursday, January 29, 2015

SQL query to return multiple SUMs in a single line result

Another good question from one of my customers today --

"... how to take two or more records and summarize them into one record. "  


I can't tell you how many times I've done this when reporting traded volumes.  Daily, weekly or monthly, grouped by symbol, or trader, or even trading desk.... This new customer's data is a little different, but the approach is the same.  This is just a quick post, providing a method to bring your data counts back in single line result-sets.

USE DBA; -- change to your dbname

DECLARE @input TABLE (UserID INT, FiscalYear INT, GiftAmt DECIMAL(5,2))
INSERT @input (UserID,FiscalYear,GiftAmt)
VALUES (1,2012,100.00),
  (1,2012,50.00),
  (1,2013,110.00),
  (1,2014,50.00),
  (1,2014,50.00),
  (1,2014,75.00),
  (2,2012,65.00),
  (2,2014,55.00),
  (2,2014,55.00),
  (2,2014,75.00),
  (3,2012,10.00),
  (5,2011,20.00),
  (5,2013,55.00),
  (5,2014,55.00);

-- Look at your data, see you've got 14 records
-- SELECT * FROM @input

-- Now bring it back out in 4 lines, one for each UserID
SELECT 
UserID,
   ISNULL(SUM(FY1Amt),0.00) [FY1Amt],
   ISNULL(SUM(FY2Amt),0.00) [FY2Amt],
   ISNULL(SUM(FY3Amt),0.00) [FY3Amt],
   ISNULL(SUM(FY4Amt),0.00) [FY4Amt]
FROM
(
SELECT 
UserID,
FiscalYear,
CASE WHEN FiscalYear = 2011 THEN SUM(GiftAmt) END [FY1Amt],
CASE WHEN FiscalYear = 2012 THEN SUM(GiftAmt) END [FY2Amt],
CASE WHEN FiscalYear = 2013 THEN SUM(GiftAmt) END [FY3Amt],
CASE WHEN FiscalYear = 2014 THEN SUM(GiftAmt) END [FY4Amt]
FROM
@input a
GROUP BY
UserID,
FiscalYear 
) x
GROUP BY 
x.UserID

Your results will look like this:

   UserID   FY1Amt  FY2Amt  FY3Amt    FY4Amt
      1          0.00       150.00     110.00       175.00
      2          0.00         65.00       0.00       185.00
      3          0.00        10.00        0.00          0.00
      5        20.00          0.00      55.00         55.00

Now that I think about it, I believe I did a similar post once before, for the single-line result sets. A different method, maybe a bit older.. but the single line output is achieved the same.  If you haven't seen that one already, take a look at it here.

I will warn as I did on that first post.  SQL Server is used to store and manage the data, not to make it pretty. There are many very clever things you can do to manipulate your output, but you've got to be wary of the performance implications. Here's a little information from MSFT on the same thing.  See the the 'Logic separation' section, about keeping the business logic separate from the data manipulation.


Wednesday, January 28, 2015

SQL Server -- Daily DBA Checklist

" If you were running a DB area - What key items would you check / monitor every morning? "

I received that question from one of my customers recently.  A very good question, in my opinion, and one that should be asked of any potential DBA candidate.   

Best case, the DBA would have automated checks in place that run 24/7, proactively notifying, or alerting of any problems BEFORE they occur.  There are many different was to define these type of alerts - SQL Server Agent, SMO, Windows, WMI, and more.  Regardless, if an automated routine is in place, the daily DBA checklist becomes fairly minimal.  One cannot, however, just assume the alerts are running… and the checklist still exists.  I've provided three different groups of checks.  

Group 1    
This 1st group must be done every day.  Each of these items are perfectly alert-able, but the alerts may not be setup yet, so I suggest that each of these checks must occur daily, via automated routine or manually: 
        
          Backups
               a. All backups completed successfully?
               b. Capacity concerns on backup drive?
               c. Backup durations very long?
         Security
               a. Review SQL Server log AND Windows Security Event Log
        Capacity
               a. Data and Log file space -- file sizes, growth?
               b. Disk space - ALL drives -- available disk space?
        
        OS Event Logs/SQL Server Logs
               a. Review for any abnormal events
        Scheduled jobs - (Agent, Windows Scheduled tasks, etc.)
               a. Confirm all scheduled jobs ran successfully
               b. Even check job step duration, make sure nothing is taking too long


Group 2
This 2nd group is also extremely valuable, but it only provides an immediate state, UNLESS the DBA has setup an automated collection.  This can be done using the Data Collector, to capture statistics for Server Activity, Disk Usage and Query Statistics.  These collections can be run every day, creating moving metrics that grow and change as your business activity does.  When certain events or conditions are detected, the DBA can be notified/alerted.  This is not available out of the box with SQL Server.  It’s got to be setup, and managed regularly (see here).  If it is not in place, the checking should still occur, at least on a weekly basis.  Even just the current state is very valuable.

               Review blocking issues
                   a. SQL Server performance counters
              Review table/index fragmentation statistics
                   a. See my query here, using sys.dm_db_index_physical_stats, sys.indexes
              Review performance statistics
                   a. See sp_blitz from Brent Ozar’s team


Group 3
Lastly, this check should be done at least once monthly.  It can be completely automated, but given that it only occurs monthly, the manual invocation is acceptable, too.  Don't just look at the success/fail status of the backup job.  You've got to restore a .bak file and confirm the integrity of the data.  The last thing you want is to be doing an audit, and find your .bak files are unusable.

Restore a backup at least weekly, to validate backup solution

One last thing that I would note is that if the DBA is logging ALL changes that are made everywhere, as is recommended, then he/she should take time to review these metrics on a regular basis, too.  One server or 100, one DBA or a Team -- it's just a very good thing to keep an eye on.

Wednesday, January 21, 2015

When was your SQL Server database last restored?

Just a real quick post... I took on a new project very recently, and I was doing an assessment of their farm.  Last DBCC's, last backups... even last restores.   I had several different statements, but I returned multiple restore dates, when the database data and log file were restored in separate operations.  This statement takes that into account, and just gives you back a single entry, for the most recent restore date for your databases.  It also tells you from what file they were restored.  Check it out.  Let me know what you think.

  /*  
When was your database last restored? 
From what file?                                                              */

     WITH LastRestored AS
     (
    SELECT
            rh.destination_database_name [DatabaseName],
            rh.restore_date [Restored],
            bmf.physical_device_name [SourceFile],
            RowNum = ROW_NUMBER() OVER (PARTITION BY bs.database_name 
                  ORDER BY rh.restore_date DESC )
     FROM
           msdb..restorehistory rh INNER JOIN msdb..backupset bs 
               ON rh.backup_set_id = bs.backup_set_id INNER JOIN msdb..backupmediafamily bmf 
   ON bs.media_set_id = bmf.media_set_id
     )
     SELECT DatabaseName,Restored,SourceFile
     FROM LastRestored
     WHERE RowNum = 1


Your results will look a little something like this:

   DatabaseName                Restored                               SourceFile
   AdventureWorks2012      2015-01-20 21:59:41.130     C:\Backups\AdventureWorks2012_Backup.bak
   ReportServer              2015-01-20 11:39:33.853     C:\SSRS\ReportServerLog.bak
   ReportServerTempDB      2015-01-20 11:39:43.433     C:\SSRS\ReportServerTempDBLog.bak


Here are a couple of references with greater detail on the tables I am targeting:

RestoreHistory                 https://msdn.microsoft.com/en-us/library/ms187408(v=sql.110).aspx
BackupSet                       https://msdn.microsoft.com/en-us/library/ms186299.aspx
BackupMediaFamily     https://msdn.microsoft.com/en-us/library/ms190284(v=sql.110).aspx


Friday, January 2, 2015

Find all user-created objects in your system databases

System databases are for system objects.  Pretty simple.  If user objects are created within the system databases, then we also need to include these databases in our DR plans.  For this and countless other reasons, it really is not a good practice to allow user-defined objects within your SQL Server system databases.

In this post I've just given a couple of quick statements you can use to identify user created objects in any of your system databases.


/*  Use this to find any user-defined objects in the system databases, if exists.  
    As-is, it targets the master database, but works the same in any system db.
To target model or msdb, change the database name in the USE line.            */

USE master;  -- << use master, model or msdb
SELECT
o.name [ObjectName],
        s.name [Schema/Owner],
o.type_desc [ObjectType]
FROM
sys.all_objects o INNER JOIN sys.schemas s
          ON o.schema_id = s.schema_id LEFT OUTER JOIN sys.database_principals po
            ON o.principal_id = po.principal_id LEFT OUTER JOIN sys.database_principals ps
              ON s.principal_id = ps.principal_ID
WHERE
o.is_ms_shipped <> 1; -- 'is_ms_shipped' means it was shipped by MSFT on the cd.  
      -- If is_ms_shipped = 0, that means it is user-created.


In cases of upgraded databases, or database diagramming, I have heard that is_ms_shipped is not always 100% reliable.  I have never actually seen that, but to be safe, you could use this approach, which is a combination of is_ms_shipped and the 'sys' schema name.

SELECT * FROM sys.objects 
WHERE SCHEMA_NAME(schema_id) <> 'sys'  
AND is_ms_shipped = 0  
AND parent_object_id NOT IN (
SELECT object_id  
FROM sys.objects  
WHERE SCHEMA_NAME(schema_id) = 'sys'  
        OR is_ms_shipped = 1); 


These are additional references to the different system catalog views: