Protect SQL Server Database

Asked

Viewed 511 times

2

I have 2 SQL Server databases in my SQL Server Management Studio.

I would like to put password in one of the two, making it impossible to access it, is possible?

  • 2

    SQL Server Management Studio is just a tool to access your database. You have 2 databases in SQL Server and not in SSMS. On the question: basically, you cannot put a password in the database itself, you need to create a user, set a password for it and add it to the specific database permissions.

2 answers

5

In the database itself is not possible. What you can do is change which users have access to the database, remember that the user master (the one defined at the installation of the bank, usually named as sa) will always have access to all banks.

To change users who have access to database, just expand Security and then Users (Logins).

inserir a descrição da imagem aqui

  • and how do I not have access to windows authentication?

  • @Ronaldosantos You have to disable Windows authentication. It would be a good thing to open another question about this, don’t you think?

3

You must open the Object Explorer do Sql, expand the Server, Security -> Logins, there you can add a user, and in User Mapping check the databases you want to allow.

To allow Sql Authentication, right click on the server Security check up on Sql Server and Windows Authentication Mode.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.