SQL Azure架构问题 [英] SQL Azure Schema Issue

查看:88
本文介绍了SQL Azure架构问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在SQL Azure数据库上收到一封有关架构问题的电子邮件,其内容如下:

I'm getting an email regarding a Schema Issue on my SQL Azure Database and it reads something like this:

无效的列名'False'"错误代码:207

"Invalid column name 'False'" Error code : 207

但是似乎没有更多的信息,而且我什至都不知道从哪里开始,因为该架构是在我开始项目之前创建的,但是我怀疑这是从哪里来的存储过程或视图.

However it doesn't appear to have any more information and I wouldn't even know where to start because the schema was created before I started in the project, but I suspect this is coming from a Stored Procedure or View.

所有这些都已在Azure门户中报告,但是我不知道如何进行.还有其他方法可以在SSMS中的Azure门户上获得建议吗?我已经尝试过Tuning Advisor,但收到一个错误消息,指出不支持SQL Azure.

This is all being reported in Azure Portal, but I have no idea how to proceed. Is there any other way to get the suggestions on Azure Portal in SSMS? I already tried Tuning Advisor and I got an error that SQL Azure was not supported.

推荐答案

在这种情况下,我使用此查询来搜索对象.这将找到false的所有出现,并应帮助您找到有问题的列.这将查找每次将@searchName定义为的内容.

I use this query to to search objects in this scenario. This will find every occurrence of false and should help you find the offending column. This will find every occurrence of whatever you define @searchName as.

我在

I found this on Pinal Dave's blog, way back. This works in Azure SQL.

declare @searchName varchar(50) = 'false'
select  @searchName as SearchName,
        OBJECT_SCHEMA_NAME(OBJECT_ID) + '.' +  OBJECT_NAME(OBJECT_ID) as ObjectName,
        [definition]
from sys.sql_modules
where definition LIKE '%' + @searchName + '%'
order by OBJECT_SCHEMA_NAME(OBJECT_ID) + '.' +  OBJECT_NAME(OBJECT_ID)

这篇关于SQL Azure架构问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆