I use SQL Server 2012.
How can select from sql server system base table such as below tables.
When I get query from base system table such as below query. get following error.
select * from sys.sysschobjs
Msg 208, Level 16, State 1, Line 1
Invalid object name 'sys.sysschobjs'.
It is doable if you used a "Database Engine Query", and an administrator user. To do so, after you open the SQL Management Studio: Click File Menu, "New" sub menu, and select "Database Engine Query". In the server name, write "Admin:" before your server name (eg., if your server name is "localhost", then the full server name to be written is "admin:localhost") Then write your credentials (for administrative account).
N.B.: Make sure that there are no other administrator logged in to the Database Engine Query other than you (I believe it is a single access point)
For more information:
http://technet.microsoft.com/en-us/library/ms178068(v=sql.105).aspx
http://zarez.net/?p=774
To query this system base tables needs a Dedicated Administrator Console (DAC).
First, connect to your database using the DAC. To do this from SQL Server Management Studio, go to File -> New -> Database Engine Query. Put ADMIN: in front of your instance name and click Connect.
Change to the your database using the USE [mydb]
Now you can query
select * from sys.sysschobjs
See this post for further info on this:
http://www.hackingsqlserver.com/
https://sqlblog.org/2011/11/08/t-sql-tuesday-24-dude-wheres-the-rest-of-my-procedure
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With