3
I executed the following commands in the Sql Server database:
comando 1:
SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'vendas'
resultado 1:
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE
---------------- --------------- -------------- -------------
Empresa 1 dbo vendas VIEW
comando 2:
SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'vendas'
resultado 2:
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE
---------------- --------------- -------------- ------------------ --------------- ---------------
Empresa 1 dbo vendas (null) NONE NO
comando 3:
SELECT definition FROM sys.objects O JOIN sys.sql_modules M ON M.object_id = O.object_id WHERE O.object_id = object_id( 'dbo.vendas') AND O.type = 'V'
resultado 3:
definition
-------------
(null)
My doubts are
The table is really a
view
, or this is just a description for some other kind of tableMaterial
How to get more information about this table if it is a
view
, which tables build it ?The lack of definition information could be lack of user privilege, how to discover this ?
Edited:
To documentation of Microsoft shows that the column sys.sql_modules.definition
may be encrypted.
I ran the trial but the return was
>[Error] Script lines: 1-1 There is no text for object 'vendas'.
– Tiago Oliveira de Freitas
Could be any number of things. See the documentation here.
– Leonel Sanches da Silva
It is, it can be an encrypted definition: sys.sql_modules - "definition - NULL = Encrypted", I think I’ll have to wait for the return of the responsible for the bank, thanks for the help.
– Tiago Oliveira de Freitas