1

We have developed our own SQL database connection utility within our .NET application, however we want it to behave differently if the SQL database that it has connected to is a PaaS database, such as Amazon RDS or Azure SQL. The reason being, we want to disable the ability to backup and restore a database via our utility in these instances.

What would be the best, fool-proof way to detect this?

Some other posts recommend using SELECT SERVERPROPERTY ('edition'), however it works OK for Azure SQL, but just returns "Express Edition (64-bit)" for an Amazon RDS database.

3
  • 2
    Does this answer your question? How to test if database is hosted on SQL Azure? Commented Sep 16, 2021 at 0:32
  • 1
    Its not where it is hosted that is your real issue, it is detecting if the connection string has sufficient privileges to perform the operation. For instance the database could be hosted in standard editions in a shared public cloud environment... Commented Sep 16, 2021 at 0:42
  • in addition: stackoverflow.com/questions/35915024/… Commented Sep 16, 2021 at 0:57

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.