From the course: Designing Database Solutions for SQL Server 2016

Unlock the full course today

Join today to access over 23,300 courses taught by industry experts.

Upgrade a SQL Server database

Upgrade a SQL Server database

- [Teacher] A common approach to designing a SQL Server database is to do all the development and testing work on one set of hardware, and then move the completed project over to production level hardware when it's time to take the project live. This is means that at some point in the development, the database will need to get picked up in its entirety and moved over and migrated to a new home. One method of doing this is to detach and reattach the database to the new server. Let's go ahead and take a look at this by creating a new database, and I'll call it UpgradeDBExample. Then I'm going to run the SELECT statement in order to view the current location of the data and log files that were associated with that new database. Here, we can see in the physical_name column, if I expand this open a little bit, the full filename and path where these are currently located, and they're just in the standard SQL Server folder. Next, I'm going to detach this database from SQL Server. If I come…

Contents