Results 1 to 4 of 4

Thread: Transferring SQL 2005 Database

  1. #1
    Join Date
    Jun 2005
    Posts
    1,080
    Thanks
    4
    Thanked 15 Times in 15 Posts

    Default Transferring SQL 2005 Database

    (EDIT: Please rate this thread if you use the information contained as I hope to post more guides like this and having them rated will allow me to improve upon them).

    Transferring SQL 2005 database (from another SQL 2k5 DB) is kinda a pain in the butt. For those of you whose familiar w/ SQL 2000, you would expect that SQL Import / Export wizard in SQL 2k5 will do the job. BUT that's not the case.

    SQL 2k5's Import/Export wizard do not transfer all database objects, it will only transfer Table, Views and data but not Stored Procs, UDF, relationships, etc.

    Method 1. Transferring with SQL Server Management Studio

    1) Log into the SQL Server where the source database resides with SQL Management Studio

    2) Right-Click on the database, Select Tasks, and Select Generate Scripts. The Script Wizard will pop up.

    3) Highlight the database your want to transfer in the next screen. Click Next button

    4) Choose Script Options Box will appear - Leave Defaults and change

    “Generate Script for Dependent Objects” = TRUE
    "Script Collation"= TRUE
    "Script USE DATABASE" = TRUE

    NOTE *** if you have full text indexes in your database, change "Script Full-Text Indexes" = TRUE

    Click Next

    5) In the Choose Object Types - Select all except "Users" - Click Next Button

    Note *** you will be ask to select what "Database Roles, Defaults, Rules, Store Procedures, Tables, User-defined data types" you want to script - Select All or check on the box of the objects you want to script and then click the Next button for each object you are asked to Script

    6) Select Next and on the Output Option Box Wizard - select method to save script.

    - if Script to file = select location and leave Unicode text *** Recommended
    - if Script to Clipboard - open Notepad.exe and paste the script after it is successful ***Not Recommended
    - if Script to New Query Windows - it will open a new query windows in SSMS

    7) Open another connection to the remote SQL 2005 database.

    Either open or copy the query and run against your SQL2005 database at RFH

    ***Note If the database you are copying from had objects owned by user other dbo, you will need to create a schema with the same of the user owning the object

    Once the script completes, you should have all the database objects on the remote server.

    8) To transfer database data, you can use the SQL Import/Export wizard.


    For those off you that don't have SSManagement Studio you can download an Express version of the management interface at
    http://www.microsoft.com/downloads/d...displaylang=en

    (note: this is a CTP release as the final has not yet been announced.)


    Method 2. Backup Database

    (Note: RFH do not offer SQL 2005 yet, and hence this method won't work yet, once available I'll try and put up a generic database backup script that those without a Management Stuido can use).

    1). You will need to create a backup of your MS SQL Database (if you have the SQL Server Management Stuido you simply navigate to the database, right click and select backup.)

    2). Open a ticket with RFH and arrange for them to restore the database. The RFH team will load the database and assign your database login as the 'dbo' (database owner). If you have any other logins or security requirements then you will need to re-apply these using scripts.


    Method 3. Upsizing Tool

    (this is not released yet and I'll update this when released and if made available by RFH, in the meantime here is a link to some information: http://weblogs.asp.net/scottgu/archi...15/427581.aspx).
    Last edited by Sol; 19th January 2006 at 02:24 PM.

  2. #2
    Join Date
    Jun 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default SQL Import/Export wizard.

    Where can this be found in SQL 2005 Tools. I cant find it anywhere. I used to use DTS but cant find that in SQL 2005 anymore.

    am having to use access with linked tables 1. Source and 2. Dest but it takes ages, to sort as I have to turn Identity columns off then import then on again.

    If some one has used SQL Import/Export wizard. can they tell me where it is.

    Cheers
    Mark

  3. #3
    Join Date
    Jun 2005
    Posts
    1,080
    Thanks
    4
    Thanked 15 Times in 15 Posts

    Default

    Using MS SQL Management Studio expand the Object Browser to either source or destination database. Right click on the database and select Import / Export data (depening on whether source or destination). This should open a DTS wizard.

  4. #4
    Join Date
    Jun 2008
    Posts
    12
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Try the Microsoft Database Publishing Wizard

    It can transfer objects and data from one server to another or even script your entire DB into a single .sql file. Highly recommended.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 9
    Last Post: 20th February 2007, 09:17 PM
  2. Sql 2005
    By cswd in forum MSSQL
    Replies: 2
    Last Post: 3rd February 2006, 04:39 PM
  3. SQL 2005 Express
    By DavidJenkins in forum MSSQL
    Replies: 2
    Last Post: 5th January 2006, 07:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •