Ottenere i permessi per la stored procedure in Sybase
-
28-09-2019 - |
Domanda
Come faccio ad avere le autorizzazioni concesse per una stored procedure in Sybase?
Soluzione
Dipende dal modulo che si desidera che informazioni in.
- Se si sta scrivendo SQL per qualche scopo interno, ed hai bisogno di queste informazioni come dati per esso, la risposta di Kolchanov è corretta.
- Se si limita a svolgere funzioni di DBA, allora un qualsiasi numero di strumenti DBA GUI (SybaseCentral viene fornito con il CD; DBArtisan è molto meglio) forniscono queste informazioni tramite una finestra di explorer e clic
- Se avete solo l'accesso in base carattere, l'uso
sp_helprotect proc_name
- Se avete solo l'accesso in base carattere, l'uso
Poi vai a: Adaptive Server Enterprise 15.5 / Manuale di riferimento:. Procedure, nd seguire l'esploratore
Altri suggerimenti
Se ho voluto verificare le autorizzazioni per oggetto "whatever_ [table | procedimento]", vorrei eseguire la seguente query:
Esempio di "qualunque" essere un tavolo
Displaying result for:
---------------------
select permission = a.name
from master.dbo.spt_values a
, master.dbo.spt_values b
, sysprotects p
, sysobjects o
where a.type = "T"
and a.number = p.action
and b.type = "T"
and b.number = (p.protecttype + 204)
and o.id = p.id
and o.name = 'whatever_table'
permission
----------------------------
References
Select
Insert
Delete
Update
5 Row(s) affected
Esempio di "qualunque" essere una stored procedure
Displaying result for:
---------------------
select permission = a.name
from master.dbo.spt_values a
, master.dbo.spt_values b
, sysprotects p
, sysobjects o
where a.type = "T"
and a.number = p.action
and b.type = "T"
and b.number = (p.protecttype + 204)
and o.id = p.id
and o.name = 'whatever_procedure'
permission
----------------------------
Execute
1 Row(s) affected
Adaptive Server Enterprise 15.5> Manuale di riferimento: Tabelle> Tabelle di sistema
sysprotects
sysprotects contiene informazioni sulle autorizzazioni che sono state concesse a, o revocati da, utenti, gruppi e ruoli.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow