From the course: Complete Guide to Advanced SQL Server

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

Move existing data into a ledger table

Move existing data into a ledger table - SQL Server Tutorial

From the course: Complete Guide to Advanced SQL Server

Move existing data into a ledger table

If you have a lot of existing data that would benefit from being stored in ledger tables, then you have a few options. The problem is, existing data tables cannot simply be converted into ledger tables. You'll need to create an empty ledger table first and then migrate your existing data into it. Any Transact-SQL commands, external utilities, or scripts that move SQL data around can help you out in the migration process, and there's lots of options available. Depending on the scale of your database, some options may work better than others. So consider the trade-offs in downtime, the potential effects of file locks on normal operations, and the resource loads that will be placed on your system before undertaking the migration. With that said, here's a couple of options for you to consider. If you'd like to avoid writing any code at all, you can take advantage of the SQL Server Import and Export Wizard that's built into Management Studio. You'll find it by right-clicking on the…

Contents