Connecting SQL Server Management Studio to the Replicated Database

Everpure Cloud Dedicated for AWS

Audience
Public
Technology Integrations
Amazon Web Services (AWS)
Source Type
Documentation

Launch SQL Server Management Studio in the SQL Server EC2 instance. Select the default Server name, and click on Connect:

In Object Explorer, right-click on Databases, and select Attach:

Click Add on the next screen:

Expand the drive letter that contains the database files (drive F: in this case), and select the DATA folder. You should see the CBSDatabase.mdf file that was replicated from the on-prem SQL Server. Select the CBSDatabase.mdf file, and click OK:

The following screen will appear, which shows that both the database file and the log file are located in the F: drive. Since the logs for this database are located in a separate volume, which is attached as drive G:, the location of the log files needs to be changed. Under "CBSDatabse" database details, click on the menu icon to the right of Log in the File Type column:

Expand the G: drive, and select the Data folder. You should see the CBSDatabase_log.ldf file in the box on the right. Select this file, and click OK:

After selecting the database file and the log file, click OK to attach the CBSDatabase database to SQL Server Management Studio:

Next, expand the Databases folder, and expand CBSDatabase:

Expand Tables, and right-click on dbo.Contacts:

Select Edit Top 200 Rows, or Select Top 1000 Rows:

You should see the rows that were created on the SQL Server in the on-prem data center: