Posts by Fausto Branco • 186 points
3 posts
-
1
votes1
answer66
viewsA: BKP Sqlserver does not run when executed by a trigger(Trigger)
Jeterson, you need to know what the backup_DB_WebAdministration does, what is its behavior performed outside of Rigger’s context and also with which user it is running. More information.
-
2
votes1
answer476
viewsA: Return a CURSOR from a Sqlserver using dynamic sql (sp_executesql)
Jeterson, you will be combining the worst of both worlds, a cursor and a dynamic query, but you must know the need.. Look at this example: declare @sSQL nvarchar(4000) Declare @des_Name VarChar(200)…
-
4
votes2
answers323
viewsA: Show command executed when SQL error occurs
Jhonathan, it’s usually not a conventional error exit, but this bit can help you: BEGIN TRY -- Generate a divide-by-zero error. SELECT 1 / 0; END TRY BEGIN CATCH SELECT [qt].text FROM…