Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copying database
Message
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Titre:
Copying database
Versions des environnements
SQL Server:
SQL Server 2008 R2
Application:
Desktop
Divers
Thread ID:
01608387
Message ID:
01608387
Vues:
46
I created a procedure to copy a SQL database to another database in the same instance. It works pretty simple by first creating the database schema with all tables, indexes etc. in a new database and then inserting the rows from the original database tables using INSERT INTO NewDatabase.dbo.Tablename (field1, field2...) SELECT field1, field2... FROM OriginalDatabase.dbo.Tablename.

That works pretty well, however when looking the database size the new database is much smaller in disk size than the original database. I counted all records in all tables and they all are the same, so the data is all the same. Only the size difference concerned me, at first it looks like a loss of information. Maybe somebody has some insight what SQL Server stores besides of the actual data and for what purpose, and should I be concerned about the size difference of the database copy?
Christian Isberner
Software Consultant
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform