How to modify the server user and folder in Sqlserver 2014

Asked

Viewed 279 times

0

I would like to know how to modify the server’s user and password and to modify the location where the server is saved after installing SQL server 2014 in windows 10. I’ve searched several sites but I can’t find a solution.

1 answer

0

To change the password, you can do:

ALTER USER WITH password = "".

Or use SQL Management Studio to select the user you want to change, click on properties and change the password by form.

To change the place datafile:

1) Check where the datafile you want is located.

Propriedades do Database

2) Stop the SQL Server service. It is very important that SQL Server is stopped so as not to corrupt your data. By SQL Management Studio you can do with the user sa.

Parar o servidor

Do not confuse the default SQL folder with the location where the datafiles are actually. The path described below is the default path where SQL Server will create the database if you do not specify the location.

Propriedades do Banco de Dados

3) Copy the datafile(s) that will have moved to the new place. Choose to copy and not move, for security. After migrated you can delete.

4) Start SQL Server.

5) Put your database offline.

inserir a descrição da imagem aqui

6) Detach the SQL Server database.

inserir a descrição da imagem aqui

7) Attach database to SQL Server

inserir a descrição da imagem aqui

8) Click the add button and select the MDF file referring to your datafile. It is very important that the new datafile location has privileges so you can do this.

inserir a descrição da imagem aqui

9) Check the database property to see if Datafile is correct.

inserir a descrição da imagem aqui

Indication of Study

If you want to enjoy the study even more and in each step before clicking the OK button, click the Script button of the Task Bar, the command that will be executed with the OK button will be displayed to you, so you can assemble a script for the next migration.

Browser other questions tagged

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