Advertisement
MagnusArias

SBO | Kolejne funkcje SQL

Nov 16th, 2019
514
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.56 KB | None | 0 0
  1. -- ALTER DATABASE BazaRelacyjna SET TRUSTWORTHY ON
  2.  
  3. DROP FUNCTION ReadEventLog
  4. GO
  5. DROP ASSEMBLY Funkcja_tab
  6. GO
  7. CREATE ASSEMBLY Funkcja_tab
  8. AUTHORIZATION [dbo]
  9. FROM 'C:\e740\repos\Funkcje\Funkcje_tab\Funkcje_tab\bin\Debug\funkcje_tab.dll'
  10. WITH PERMISSION_SET = EXTERNAL_ACCESS
  11. --Lub = UNSAFE
  12. GO
  13. CREATE FUNCTION ReadEventLog(@logname nvarchar(100))
  14. RETURNS TABLE
  15. (logTime datetime,Message nvarchar(MAX),Category nvarchar(MAX),InstanceId BIGINT)
  16. AS
  17. EXTERNAL NAME Funkcja_tab.Wynik.InitMethod
  18. GO
  19.  
  20. SELECT TOP(100) * FROM ReadEventLog(N'Application')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement