How can you check if a Credential already exists in a SQL Server instance, so as to avoid an error when running a DROP CREDENTIAL
?
Normally I use the SCRIPT AS ...
and DROP And CREATE To
feature in SSMS to create the script, but the CREDENTIAL
doesn't have that option
if exists (select * from sys.credentials where name = 'CredName')
drop credential CredName
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