Sunday, February 19, 2012

Accessing System Tables (books online)

I have taken this comment from the SQL Server 2005 Books Online documentation but am having problems accessing the system tables (elsewhere it is stated that there is NO modification of system views, etc)

"to privileged users that can either access system tables over the DAC port or directly access database files"

How does one access the system tables over the DAC port? I have no issues connecting to the DAC port in admin mode? Is this an error within the documentation?
you can simply query the system tables over DAC connection which is otherwise not allowed. Here is one example:

select * from sys.sysprivs this succeeds on DAC but fails on non-DAC connection as

Msg 208, Level 16, State 1, Line 1

Invalid object name 'sys.sysprivs'.

Thanks

|||

But, I am still having problems accessing the obfuscated text of an encrypted stored procedure. Following comment is from Books Online for CREATE PROCEDURE statement:

“ENCRYPTION

Indicates that SQL Server will convert the original text of the CREATE PROCEDURE statement to an obfuscated format. The output of the obfuscation is not directly visible in any of the catalog views in SQL Server 2005. Users that have no access to system tables or database files cannot retrieve the obfuscated text. However, the text will be available to privileged users that can either access system tables over the DAC port or directly access database files.”

How could one retrieve the obfuscated text over the DAC port? In which system table is the text of the stored procedures stored? Could you please provide a query?

No comments:

Post a Comment