Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2003
    Location
    Colombia
    Posts
    9

    Exclamation Unanswered: ¡¡Need Help with Permissions!!

    Hi!, I have a problem with SQLServer 2000, I have a Database named Combustible, and in my Server I have an User wich login is PCS2, when I make a connection to the DB with the ODBC driver there's no problem it works pretty fine(;-) ) but I'm developing a Java Solution and using the JDBC driver I get an error message that says:

    [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]SELECT permission denied on object 'Ciudad', database 'Combustible', owner 'dbo'.

    Now, this is what I've tried to solve the issue: (in the SQLSERVER Enterprise Manager)
    1- gave the User a password to connect to the server with type standard.
    2- in the user properties I gave it the role of DatabaseCreator and gave it access to the dabases Combustible(this is mine) and Master, in both I permit all the database roles.
    3- In the users of the specific database I added the User PCS2 and checked all the permisions for each object(Manually!! there must be an easier way!!!)

    Pleaseeeee if u can help me out it would be great, and I'd thank u for the rest of my life!!

    PD: couldn't find a way to change the owner of a database. This would be the perfect solution!

  2. #2
    Join Date
    Feb 2003
    Location
    Brisbane, Australia
    Posts
    110

    Re: ¡¡Need Help with Permissions!!

    I can't explain the JDBC vs ODBC problem. I can only assume that they are not connecting to the db as the same user.

    If you want to grant all permissions on tables to a user try this:

    Code:
    SELECT 'GRANT ALL ON '+name+' TO user'
    FROM sysobjects
    WHERE TYPE = 'U' -- (or 'V' for views, 'P' for procedure etc.)
    Cut and paste your results etc...

    Next if you want to change the owner of a db have a look at sp_changedbowner in BOL.

    I know you have probably already done this but I would check default users in your connections, maybe something like that is taking precedence over the user you are attempting to connect with...

    Hope this helps

    Originally posted by juadagu
    Hi!, I have a problem with SQLServer 2000, I have a Database named Combustible, and in my Server I have an User wich login is PCS2, when I make a connection to the DB with the ODBC driver there's no problem it works pretty fine(;-) ) but I'm developing a Java Solution and using the JDBC driver I get an error message that says:

    [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]SELECT permission denied on object 'Ciudad', database 'Combustible', owner 'dbo'.

    Now, this is what I've tried to solve the issue: (in the SQLSERVER Enterprise Manager)
    1- gave the User a password to connect to the server with type standard.
    2- in the user properties I gave it the role of DatabaseCreator and gave it access to the dabases Combustible(this is mine) and Master, in both I permit all the database roles.
    3- In the users of the specific database I added the User PCS2 and checked all the permisions for each object(Manually!! there must be an easier way!!!)

    Pleaseeeee if u can help me out it would be great, and I'd thank u for the rest of my life!!

    PD: couldn't find a way to change the owner of a database. This would be the perfect solution!

  3. #3
    Join Date
    Jul 2003
    Location
    Colombia
    Posts
    9

    Talking Thank you!

    bmalar thanks for ur help it was very useful, I owe u one.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •