SQL Server blocked access to procedure
sys.sp_OACreate
of component 'Ole Automation Procedures' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'Ole Automation Procedures' by using sp_configure. For more information about enabling 'Ole Automation Procedures', see "Surface Area Configuration" in SQL Server Books Online.
I tried to enable Ole Automation Procedures as:
sp_configure 'show advanced options', 1 GO RECONFIGURE; GO sp_configure 'Ole Automation Procedures', 1 GO RECONFIGURE; GO sp_configure 'show advanced options', 1 GO RECONFIGURE;
When I am executing query, I'm successfully getting output. But when trying through windows forms, I'm getting this error. Please help me
By default, SQL Server blocks access to OLE Automation stored procedures because this component is turned off as part of the security configuration for this server. A system administrator can enable access to OLE Automation procedures by using sp_configure.
To determine if "Ole Automation Procedures" option is enabled, execute the following query: EXEC SP_CONFIGURE 'show advanced options', '1'; RECONFIGURE WITH OVERRIDE; EXEC SP_CONFIGURE 'Ole Automation Procedures';
SQL Server “OLE Automation Procedures” enables the SQL Server to leverage OLE to interact with other COM objects. Data security-wise, this increases the attack surface. There are excellent examples out there for leveraging COM objects to perform lateral movement.
No version seems to list either "OLE Automation" or "sp_OA", so it would appear that the feature is not officially deprecated. Yes, you heard correctly that the OLE Automation stored procedures are buggy and leaky (or at least have been at various times / service pack levels).
The following example shows how to view the current setting of OLE Automation procedures.
EXEC sp_configure 'Ole Automation Procedures'; GO
The following example shows how to enable OLE Automation procedures.
sp_configure 'show advanced options', 1; GO RECONFIGURE; GO sp_configure 'Ole Automation Procedures', 1; GO RECONFIGURE; GO
Try to run this 3
sp_configure 'show advanced options', 1 GO RECONFIGURE; GO sp_configure 'Ole Automation Procedures', 1 GO RECONFIGURE; GO sp_configure 'show advanced options', 1 GO RECONFIGURE;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With