Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1. Open Viev/SQL Server Object Explorer (sql_server_explorer.png)
- 2. Click NewQuery
- 2.1 Copy TSQL query from "create viperMvcTest from file.sql"
- 2.2 Change pathes for yours and run. For example mine(viper - is extracted folder from archive):
- use master;
- go
- RESTORE DATABASE [viperMvcTest] FROM DISK = N'C:\Users\Sasha\Desktop\viper\database\viperMvcTest.bak'
- WITH MOVE N'VIPER2_PROD' TO N'C:\Users\Sasha\Desktop\viper\ViperMVC\App_Data\viperMvcTest.mdf',
- MOVE N'VIPER2_PROD_log' TO N'C:\Users\Sasha\Desktop\viper\ViperMVC\App_Data\viperMvcTest.ldf';
- go
- 2.3 Refresh Sql Server in SQL Server Object Explorer and in database folder viperMvcTest Db apear(sql_server_explorer2.png)
- 3. Copy TSQL query from "create guest user.sql", change like in example and run
- USE [master]
- GO
- CREATE LOGIN [sasha] WITH PASSWORD='sasha123', DEFAULT_DATABASE=[viperMvcTest], DEFAULT_LANGUAGE=[us_english], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF
- GO
- 4. Open Web.config and modified line 15
- <add name="ViperContext" connectionString="Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=viperMvcTest;User=sasha;Password=sasha123" providerName="System.Data.SqlClient" />
- 4. Open Viev/Server Explorer
- 4.1 ViperContext -> Modify connection
- 4.2 Server Name = (localdb)\MSSQLLocalDB, username = sasha, pass = sasha123(server.png)
- 5. Run(F5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement