Staff,
Good evening.
Today I will teach you how to enable OLE Automation features in SQL Server. For those unfamiliar with this feature, it allows the DBA or Developer to perform a series of actions on the database using OLE DB, such as read / write / move / copy / delete files, Excel spreadsheet creation and more stuff. The syntax is somewhat similar to VBA and uses the Windows API for these operations.
However, DBA, keep in mind that this can be a very useful and powerful tool for IT staff, but at the same time, a major risk to your database security, as users who will have access to these resources will be able to , for example, undetectably viewing or removing files from the database server itself or even from other machines on the network.
To enable this feature, we use the following commands:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
sp_configure 'show advanced options', 1; GO RECONFIGURE; GO sp_configure 'Ole Automation Procedures', 1; GO RECONFIGURE; GO sp_configure 'Agent XPs', 1; GO RECONFIGURE; GO sp_configure 'show advanced options', 1; GO RECONFIGURE; GO |
Learn more:
That's it folks!
Soon I will post a post with some cool functions using OLE Automation. (Edit: Access the created post)
My system: Windows server 2019, with sql server 2016 express, already disabled the firewall and the return is the same. I await answer