没有用户语法,无法执行简单查询 [英] Cannot perform simple query without user syntax

查看:83
本文介绍了没有用户语法,无法执行简单查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿伙计们这可能真的很傻。我已经设置了自己的MSSQL服务器,并且已经从旧的托管数据库中加载了数据。

Hey guys this is probably really silly. I've setup my own MSSQL server and i've loaded data in from my old managed DB.

问题是:

旧的DB我能够做一些简单的查询,例如"select * from users";它会起作用。在它返回的新SQL服务器上:

On the old DB I was able to do simple queries like "select * from users" and it would work. On the new SQL server it returns:

消息208,级别16,状态1,行1

无效的对象名称'用户'。

但是,如果我将用户添加到查询中,请执行以下操作:" select *来自[user] .users"它有效。

BUT if I add the user to the query like this: "select * from [user].users" it works.

我认为它是权限的东西。我只是不知道在语法中实际调用的第一个[user]部分是什么来搜索答案。

I'm assuming it's a permissions thing. I just have no idea what the first [user] part is actually called in the syntax to search for an answer.

有谁知道如何避免需要查询语法的[user] .table部分?

Does anyone know how to avoid needing the [user].table part of the query syntax?

我有数百个现有的数据库调用要在Web服务中更新。

I have hundreds of existing DB calls to update in the Webservice otherwise.

谢谢,

Slixx

推荐答案

不,这不是权限问题。如果像表这样的对象与数据库用户的默认模式不同,则必须添加模式名称。
No, it's not a permission problem. If an object like a table is in a different Schema then the Default Schema of the database user, then you must add the schema Name.


这篇关于没有用户语法,无法执行简单查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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