SQL Server Performance

Best way to download DBs to laptop

Discussion in 'SQL Server 2005 General Developer Questions' started by bryan42, Mar 27, 2007.

  1. bryan42 New Member

    What's a good way to download five SQL Server 2005 databases from production to my laptop for development work with Visual Studio?

    Our application code is under source control, but to have a current development environment I must keep downloading these databases. Four databases are small, but one will need to be trimmed to about 10% of actual size to fit on my laptop's hard drive.

    Looking at options in the Management Studio by right-clicking on each database, I see options to export the data, create a backup. Or, am I making this too hard and the easiest way would be to download some backups of the database created by the maintenance plan and use those to restore them on my laptop?
  2. thomas New Member

    Backup and restore is the easiest way.

    For the databas eyou need ot make smaller, you'll need to use SSIS or some kind of selective export.

    Or you could restore another copy on a server, delete some of the data, shrink the database, then back it up and restore it on to your laptop.

    Backup and restore is a very easy, reliable and self-contained way of doing this kind of thing.
  3. Luis Martin Moderator

    I would backup, copy to your laptop and restore.
    Also begin with bigger one. After restore, shrink. After that backup and restore the others.



    Luis Martin
    Moderator
    SQL-Server-Performance.com

    All in Love is Fair
    Stevie Wonder


    All postings are provided “AS IS” with no warranties for accuracy.



  4. joechang New Member

    consider bringing the statistics only database to your notebook,
    depending on how tight you are for space
  5. Luis Martin Moderator

    BTW Joe, is sqlclone ready for 2005?



    Luis Martin
    Moderator
    SQL-Server-Performance.com

    All in Love is Fair
    Stevie Wonder


    All postings are provided “AS IS” with no warranties for accuracy.



  6. MohammedU New Member

    Is there any way to copy the statistics from one server to another?
    In sql 2000 statistics information stored STATBLOB column in sysindexes tables...any idea where it stores in SQL 2005?

    MohammedU.
    Moderator
    SQL-Server-Performance.com
  7. Luis Martin Moderator

    "Is there any way to copy the statistics from one server to another?"

    Joe development sqlclone to create one database from other database (sql 2000) transferring statistics not rows.
    Very useful to see execution plan, etc., in small database.

    http://www.sql-server-performance.com/qdpma/SQLClone.zip

    Luis Martin
    Moderator
    SQL-Server-Performance.com

    All in Love is Fair
    Stevie Wonder


    All postings are provided “AS IS” with no warranties for accuracy.



  8. joechang New Member

  9. MohammedU New Member

    Got it... thank Joe....
    It is Statistics with Histogram option....


    MohammedU.
    Moderator
    SQL-Server-Performance.com
  10. joechang New Member

    if you want to look at the true system tables in 2005, just look at the low id's in sysindexes

    SELECT id, name, object_name(id) , rowcnt, dpages
    FROM sysindexes WHERE id < 10000 AND indid IN (0,1)

    you can query these directly
    if you backup a small database, look at the backup with a binary editor
    you can see that these are there

    you can also match the row count of the above with the row count of the "legacy" views,
    sysobjects, etc

Share This Page