Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Migrating a Database to a New Server

$
0
0

Good afternoon, all -

I have a question that is related to one I had yesterday on copying a database from one server to another. Now, please bear with me, because I am by no means a pro at SSMS. Pretty much everything I know is from trial and error.

Anyway, I'm almost done with migrating the databases I've been asked to move by using Import on the new server, selecting the old server as the source and the new server as the destination. When it gets to the part where you select the tables you want moved, I click the first box at the very top to select all the tables. Then, I go through and uncheck the few views that end up being selected; I'll handle those differently.

This has been working fine, except for a couple of databases that don't already have a presence on the new server. I was advised yesterday that I should use Backup/Restore to get those over, but there are permission issues that take this away as an option.

The hitch in my gitalong that I have now is that some of the databases have some functionality that was coded into the CREATE statements that initiated the table. For instance, a Load_Date value might be populated by default with GETDATE() and this is provided for in the CREATE, not as a part of an ETL process.

As a result, the import process I'm using is importing only the DATA, not any of these default coding shortcuts, so what it populates the new table with is not the code to create, say, a Load_Date, but the current Load_Date value in the table at the time of importing.

Now, I'm tasked to migrate about eight or so databases, but they have a few hundred tables among them. And, the tables that have these coded default values are very few among them, but no one knows exactly which tables they are, without searching through them.

As I understand the import process, if the table exists on the destination, it will maintain the table structure - including any default coding - and will just place the source data into the existing table without harming those defaults. So, I figure I need to determine which tables have the default scripts, right-click those to select Script Database as CREATE and use that to make the table in the destination database. Then, I use Import to move the data over from the source table to the newly made destination table to populate it, and the default code is maintained.

All well and good.

But, I don't want to slosh through all the hundreds of tables to search out the very few that have this default coding.

So, after all that, is there any fast way to find those few tables that have default code? Then, I can handle manually setting up that handful of tables and populating them separately, while using Import on the rest.

Thanx for any help, it is REALLY appreciated!


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>