New to Security, am I setting up user correctly to update one table?

  • I have a Excel spreadsheet that updates a table in SQL Server using ADO code. It works fine for me cause I am admin, but I developed for another user. That user does not have update permissions on the database and the update statement fails.

    I know I need to configure security for this person, but not sure if I am doing correctly.

    Do I need to add login to the Server, then the database and then configure permissions on the table? or can I just add login to database?

    I only want them to have update for table, how do I configure their login at the server and /or database level?

    How do I configure table?

    If someone could give me an algorythm to follow I would appreciate it. i.e., add login to database, set these permissions, add login to table set these permissions. The user is on our windows network.

    Thanks,

    MIke

  • computer.mike (1/31/2013)


    I have a Excel spreadsheet that updates a table in SQL Server using ADO code. It works fine for me cause I am admin, but I developed for another user. That user does not have update permissions on the database and the update statement fails.

    I know I need to configure security for this person, but not sure if I am doing correctly.

    Do I need to add login to the Server, then the database and then configure permissions on the table? or can I just add login to database?

    I only want them to have update for table, how do I configure their login at the server and /or database level?

    How do I configure table?

    If someone could give me an algorythm to follow I would appreciate it. i.e., add login to database, set these permissions, add login to table set these permissions. The user is on our windows network.

    Thanks,

    MIke

    How do you make your connection in Excel? Are you using sql authentication or windows authentication?

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • I beleive Windows. Here is my connection string from the ADO code.

    Provider=SQLOLEDB.1;" & _

    "" & _

    "Initial Catalog=Repors;" & _

    "Data Source=zzzzz;Trusted_Connection=Yes;"

  • What is the error message?

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • Only tried it once with the end user and can't remember error message. It didn't seem to matter at the time cause I knew they didnt have a login on the server or a user in the database. That is why I am posting this question. What are the steps I should take????

    Since I wrote this I have learned I have to add their Windows Login to the server. Then create a database user on the database based on the server login. Then give the user permissions?

    I am just asking for the basic steps. I will debug later.

    Please don't over analyze my question.

    Thanks for your response.

  • computer.mike (1/31/2013)


    Only tried it once with the end user and can't remember error message. It didn't seem to matter at the time cause I knew they didnt have a login on the server or a user in the database. That is why I am posting this question. What are the steps I should take????

    Since I wrote this I have learned I have to add their Windows Login to the server. Then create a database user on the database based on the server login. Then give the user permissions?

    I am just asking for the basic steps. I will debug later.

    Please don't over analyze my question.

    Thanks for your response.

    Not trying to over analyze your question. I am trying to help you figure out whatever it is you are trying to figure out.

    Other than creating a database users it sounds like you got it. Databases don't have users. The server has logins and those logins can gain access to a database.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply