可以读取但不能更新
问题:在 SQL Server 2008 R2 中,在经典 ASP 页面中使用 SQL 来更新数据库的任何尝试都会被拒绝。
简而言之,可以读取,但无法在 ASP 页面中使用 SQL 更新/写入数据库
错误消息:
适用于 SQL Server 的 Microsoft OLE DB 提供程序错误“80040e4d”
用户登录失败
我花了 6 个多小时来排除故障,但仍然没有答案
已检查内容
用户密码正确。双重检查。测试了错误的密码,导致我无法从数据库读取数据。
当用户密码正确时,可以从数据库中读取。可以使用SQL从DB中读取。只是无法使用 SQL 进行更新。
db_datareader
&检查用户的 db_datawriter检查了 SQL Server 日志 - 错误 18456 严重性 14 状态 8。这是密码不匹配。但我非常确定密码是正确的,因为我可以从数据库读取。仅当 SQL 尝试写入数据库时,才会被拒绝。
提示
dbo
是否需要拥有db_datareader
&db_datawriter
也检查了吗?我无法在 SQL Server Management studio 中检查有关我需要执行的架构的任何信息吗?
任何人都帮忙。非常感谢/
它在使用 SQL Server 2000 的另一个站点中完美且正确地工作。当我迁移到 SQL Server 2008 R2 时,这就是问题。
AA 贾兹
Problem: Any attempt to update the DB is denied in SQL Server 2008 R2 using SQL in classic ASP page.
In a nutshell, can read, but can't update/write to DB using SQL in ASP page
Error message:
Microsoft OLE DB Provider for SQL Server error '80040e4d'
Login failed for user
It has taken me more than 6 hours to troubleshoot, but still no answer
Things Checked
Password for user is correct. Double checked. Tested a wrong password and resulted that I can't read from DB.
When user password is correct, can read from database. Can use SQL to read from DB. Just cannot update using SQL.
db_datareader
& db_datawriter is checked for the userChecked the SQL Server log - error 18456 severity 14 state 8. This is the password mismatch. But I am very sure the password is correct, because I can read from DB. It is ONLY when the SQL attempt to write to DB, it is denied.
Hints
Is the
dbo
required to havedb_datareader
&db_datawriter
checked as well? I am not able to checklist that in SQL server Management studioAnything about the schema I need to do?
Anybody help. Thanks a lot/
It works perfectly and correctly in another site using SQL Server 2000. When I migrate to SQL Server 2008 R2, this is the problem.
AA Jaz
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看起来你登录到SQL Server只有数据库(/表/服务器)的读权限,并且没有写权限,dbwriter和dbreader是SQL Server 2000中的角色,在2008年这一切都改变了你已经添加您的登录角色。
请尝试给予登录所有权限,如下
Looks like your login to the SQL Server have only the read permissions on the database (/table / server) and it dont have the write permissions, the dbwriter and dbreader are the roles in SQL Server 2000, in 2008 it all changed you have add roles to your login.
Please try to give the login all the permissions, as below
请尝试从 sql server management studio 中使用此数据库,通过查询分析器中的查询更新任何表,如果它不起作用,则检查表权限或登录用户权限
please try this db from sql server management studio to update any table by query in query analyzer if it does not work then check table permission or login user permission