本文介紹了Amazon RDS SQL Server:如何檢測它是否是 RDS?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
限時送ChatGPT賬號..
我正在嘗試將我的數(shù)據(jù)庫移植到 RDS.由于限制,需要做一些更改.
I am trying to port my database to RDS. Need to do some changes because of restrictions.
是否可以檢測當前數(shù)據(jù)庫在 RDS 中的內部腳本(存儲過程等)?
Is it possible to detect inside script (stored procedure etc) that current database is in RDS?
更新.我在我的函數(shù)中使用這種方式進行測試:
Upd. I use for the testing this way in my function:
if CHARINDEX(N'EC2AMAZ',(cast(serverproperty('ServerName') as nvarchar(256))))>0
return 1
else
return 0
推薦答案
我在我的函數(shù)中使用這種方式:
I use this way in my function:
if CHARINDEX(N'EC2AMAZ',(cast(serverproperty('ServerName') as nvarchar(256))))>0
return 1
else
return 0
現(xiàn)在可以了.
這篇關于Amazon RDS SQL Server:如何檢測它是否是 RDS?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!
【網(wǎng)站聲明】本站部分內容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯(lián)系我們刪除處理,感謝您的支持!