large inserts

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Emin

    large inserts

    Dear Experts,

    What is the best way to do a large insert WITHOUT having direct access
    to the machine SQL Server is running on? For example, imagine I want
    to insert something like 20,000 records. If I were to have access to
    the server, I could BULK INSERT into a temp table and then insert into
    the destination table. But if I can't create a file on the server to
    use for BULK INSERT, what is the next best alternative to doing lots
    of 1 record insert statements?

    Thanks,
    -Emin

  • Roy Harvey

    #2
    Re: large inserts

    On Thu, 05 Jul 2007 17:34:42 -0000, Emin <emin.shopper@g mail.com>
    wrote:
    >Dear Experts,
    >
    >What is the best way to do a large insert WITHOUT having direct access
    >to the machine SQL Server is running on? For example, imagine I want
    >to insert something like 20,000 records. If I were to have access to
    >the server, I could BULK INSERT into a temp table and then insert into
    >the destination table. But if I can't create a file on the server to
    >use for BULK INSERT, what is the next best alternative to doing lots
    >of 1 record insert statements?
    >
    >Thanks,
    >-Emin
    The Bulk Copy command line utility BCP.EXE is one alternative, as are
    DTS (SQL Server 2000) and SSIS (2005) executing locally.

    Roy Harvey
    Beacon Falls, CT

    Comment

    • Emin

      #3
      Re: large inserts

      Doesn't the client need something like SQL Management studio installed
      to use DTS or SSIS? Ideally, I'd like something where the client can
      just connect to the database using odbc or ado and do the insert as
      opposed to requiring the client to have special software installed.

      Thanks,
      -Emin

      On Jul 5, 5:28 pm, Roy Harvey <roy_har...@sne t.netwrote:
      >
      The Bulk Copy command line utility BCP.EXE is one alternative, as are
      DTS (SQL Server 2000) and SSIS (2005) executing locally.
      >
      Roy Harvey
      Beacon Falls, CT

      Comment

      • Alex Kuznetsov

        #4
        Re: large inserts

        On Jul 5, 12:34 pm, Emin <emin.shop...@g mail.comwrote:
        Dear Experts,
        >
        What is the best way to do a large insert WITHOUT having direct access
        to the machine SQL Server is running on? For example, imagine I want
        to insert something like 20,000 records. If I were to have access to
        the server, I could BULK INSERT into a temp table and then insert into
        the destination table. But if I can't create a file on the server to
        use for BULK INSERT, what is the next best alternative to doing lots
        of 1 record insert statements?
        >
        Thanks,
        -Emin
        You can put your file in a shared folder - BULK INSERT can read it if
        it is accessible by the account SQL Server runs under.

        Alex Kuznetsov, SQL Server MVP


        Comment

        • Roy Harvey

          #5
          Re: large inserts

          You don't need the full set of client tools to run DTS packages, just
          the dtsrun.exe utility. And for SSIS packages there is the dtexec
          command line utility, though I have not used it. And as Erland said,
          for BCP you need bcp.exe.

          Roy Harvey
          Beacon Falls, CT

          On Thu, 05 Jul 2007 21:55:53 -0000, Emin <emin.shopper@g mail.com>
          wrote:
          >Doesn't the client need something like SQL Management studio installed
          >to use DTS or SSIS? Ideally, I'd like something where the client can
          >just connect to the database using odbc or ado and do the insert as
          >opposed to requiring the client to have special software installed.
          >
          >Thanks,
          >-Emin
          >
          >On Jul 5, 5:28 pm, Roy Harvey <roy_har...@sne t.netwrote:
          >>
          >The Bulk Copy command line utility BCP.EXE is one alternative, as are
          >DTS (SQL Server 2000) and SSIS (2005) executing locally.
          >>
          >Roy Harvey
          >Beacon Falls, CT
          >

          Comment

          Working...