Command line import of Access db to SQL Server

  • Hi,

    I am trying to figure out a way to import a .mdb file into SQLServer database. I have used SSIS and SSMA for Access. That is not what I am looking for. I am looking to build a script to import the file, the script which can be passed on to someone who can run it on his machine and do the import.

    Thanks,

    Suhas.

  • You can export the mdb to a text file and then use BCP from Command line

    Thanks..

    The_SQL_DBA
    MCTS

    "Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives."

  • If this is a one time event - have you considered using the upsizing wizard available in Access - very, very simple to use and no work writing a script

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • One possiblity - not for 64 bit though - is to use a linked server based on the Access database.

    Decidedly mucky. You need to be able to put the .mdb file where the SQL server can get to it and know the relevant filenames.

    Create linked server. Create tables on SQL side. Copy data from linked server. Drop linked server.

  • I'd go with the Access upsizing wizard - BUT, there is a gotcha with it. I don't know about the latest versions of Access but the XP version can only export 65,536 records.

    I have some VBA script to dump large Access tables to text file if you want it.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply