Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.6k views
in Technique[技术] by (71.8m points)

sql - Azure - Enable/Disable database setting for security purposes

We have certain security requirements in order for our app to go live within our orgainisation.

We are using the Microsoft azure platform to host the application along with a Azure SQL server and database. To meet these security requirements, we need to configure settings on the server/database.

However we are running into issues using the default azure SQL server/database. Here is an example. We need to "Disable 'clr enabled' option". We have tried the following:

EXECUTE sp_configure 'show advanced options', 1;
RECONFIGURE;
EXECUTE sp_configure 'clr enabled', 0;
RECONFIGURE;
GO
EXECUTE sp_configure 'show advanced options', 0;
RECONFIGURE;

We run this in the T-SQL editor on the Azure platform, and receive the following:

Failed to execute query. Error: Statement 'CONFIG' is not supported in this version of SQL Server.

When we run the following, we see that is enabled.

SELECT name,
CAST(value as int) as value_configured,
CAST(value_in_use as int) as value_in_use
FROM sys.configurations
WHERE name = 'clr enabled';

enter image description here

How to we update these settings?

thanks.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

sp_configure (Transact-SQL) is not supported in Azure SQL database: enter image description here

We can not run the sp_configure statements. But sys.configurations (Transact-SQL) table is supported. enter image description here

We can see the default value is 1 for clr enabled.

And like @Larnu said, CLR is also not supported: Resolving Transact-SQL differences during migration to SQL Database.

Ref this question: Does or does not SQL Azure support CLR assemblies?

Just for now, we can not change this settings in Azure SQL database.

HTH.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...