SQL Server Performance

Importing into Existing SQL Server2000 DB

Discussion in 'SQL Server DTS-Related Questions' started by jacobpressures, Apr 26, 2007.

  1. jacobpressures New Member

    I have info on my desktop computer i need to move to another computer. But my computers are not networked. If i use Access, I can just save the file to my thumb drive and move it the other computer. Or i could try to find a file for SQL Server that might make importing the data easier. I used DTS somehow to move the data the first time. Here are my issues/questions below.

    1) Is there an easy way to import data from Access to an already existing SQL Server2000 DB? In the past, if i remember right, i could only import the whole table and then rename it. But i want to import the information into an already existing and empty DB with a good structure.

    OR

    2) I also have a database from previously that is on my desktop in SQL Server2000, but my computers are not networked. Is there a way to insert this info into an existing database? Is there a file i can access to make this easier from SQL Server2000 to SQL Server2000?

  2. waqar Member

    Hi Jacob,

    You have 2 ways

    1-
    Backup database and restore.

    2-
    You can detach/attach database from SQL server and move to other server

    1- Detach desired database from your desktop. (there are 2 files required to copy at other server mdf & ldf, unless u have created more files).
    2- Copy these files to thumb drive and bring to other computer.
    3- Copy files to other machine.
    4- Attach files.



    ________________________________________________
    Be great in act, as you have been in thought.
  3. jacobpressures New Member

    I think it would be better to "detach/attach database from SQL server and move to other server"

    If i imported from Access, i would have to do a lot of datatype changes.

    So how do i do this??? I have no clue. I don't know what you mean by Detach and Attach. I'm thinking of copy and paste.

    Here is the code i wrote to create my database a few years ago. What do i do next? I don't need the Data2.ndf and and log2.ldf files?

    Use master
    GO

    CREATE DATABASE FAE
    ON PRIMARY
    (
    NAME = FAE_Data1,
    FILENAME = 'c:program filesmicrosoft sql servermssqldataFAE_Data1.mdf',
    MAXSIZE = 50GB,
    SIZE = 20MB,
    FILEGROWTH = 10%
    ),
    (
    NAME = FAE_Data2,
    FILENAME = 'c:program filesmicrosoft sql servermssqldataFAE_Data2.ndf',
    MAXSIZE = 50GB,
    SIZE = 20MB,
    FILEGROWTH = 10%
    )

    LOG ON
    (
    NAME = FAE_log1,
    FILENAME = 'c:program filesmicrosoft sql servermssqldataFAE_log1.ldf',
    MAXSIZE = 1GB,
    SIZE = 10MB,
    FILEGROWTH = 10%
    ),
    (
    NAME = FAE_log2,
    FILENAME = 'c:program filesmicrosoft sql servermssqldataFAE_log2.ldf',
    MAXSIZE = 1GB,
    SIZE = 10MB,
    FILEGROWTH = 10%
    )
    GO
  4. jacobpressures New Member

    I found this article that seems to address the subject but i'm trying to understand it though.

    http://support.microsoft.com/kb/314546/
  5. jacobpressures New Member

    If i detach a db file on the original will i still be able to use the original or must i attach it again to use it on the original machine?
  6. jacobpressures New Member

    This article was the most helpful.

    http://support.microsoft.com/kb/224071/

    I deleted the db on the destination computer. From what i read on BOL, if i didn't it would not have attached the new database unless i specified replace.

Share This Page