1

I have a jdbc properties file with

database.username=mfuser
database.password=mfuser

If I changed this to user/pass --> sa/pass then my web application works perfectly but with mfuser it does. I have create a user in SQL Server Security with name mfsuer and password mfuser but it still not working....

How I need to create the user mfuser so that it works? Any special privileges I need to provide for this user? I want it same like sa

Here is the error I am getting with mfuser

org.springframework.dao.PermissionDeniedDataAccessException: PreparedStatementCallback; SQL [select lm.login_id,lm.login_name,lm.login_password,lm.full_name, lm.email_address,lm.phone,lm.notes,lm.delete_status,lm.create_date,lm.create_by,lm.modify_date,lm.modify_by FROM Login_Master lm where lm.login_id=(select lm1.login_id from Login_master lm1 where lm1.login_name=? and lm1.login_password =?) ]; The SELECT permission was denied on the object 'Login_Master', database 'MCData', schema 'dbo'.; nested exception is java.sql.SQLException: The SELECT permission was denied on the object 'Login_Master', database 'MCData', schema 'dbo'.
coure2011
  • 40,286
  • 83
  • 216
  • 349
  • Did you create the database objects (tables, indices, etc) for the `mfuser` user too? If not, you should reference your table using the owner user name like this: `...FROM sa.Login_Master lm WHERE ...` – ppeterka Oct 17 '12 at 06:41

2 Answers2

2

Looks like that the user mfuser doesn't have access on table your application needs to access.

If you created the database schema using sa user you have to give access to mfuser.

mkhelif
  • 1,551
  • 10
  • 18
2

The user mfuser doesn't have enough privileges to alter data in your tables, schema or database. You should access to your SQL Server 2008 using the sa user and grant enough privileges to the mfuser.

Follow the steps in this post to get your problem solved.

Community
  • 1
  • 1
Luiggi Mendoza
  • 85,076
  • 16
  • 154
  • 332