Unable To Use T-SQL BULK INSERT

Discussion in 'Databases' started by sbower1, Aug 8, 2010.

  1. sbower1

    sbower1 VZW

    I am trying to import a zip code file into my SQL database. The file that I am importing is of type .txt to a zip code table that I have already created within the database. The T-SQL statements below should import the data to the table, but if you look at the error message below I do not have permission to run BULK INSERT.

    BULK INSERT ZipCode
    FROM "C:\temp\zipcodes.txt"
    WITH
    (
    FIELDTERMINATOR = ',',
    ROWTERMINATOR = '\n'
    )
    GO

    The error that I am receiving is:
    Msg 4834, Level 16, State 4, Line 7
    You do not have permission to use the bulk load statement.

    I'm thinking that I may need to be logged in as the sa for this statement to work is this correct?

    If so can someone walk me through the steps to connect with management studio as a sa user.

    Thanks

    Shawn
     
  2. You can't use BULK INSERT. Most shared hosts don't allow those kinds of operations for performance and/or security reasons.
     
  3. sbower1

    sbower1 VZW

    Thank for the feedback Hank.

    Do you have any ideas on how to upload a text file to a SQL table without using BULK INSERT?
     
  4. sbower1

    sbower1 VZW

    I was able to accomplish this table import to your SQL database by using the example you published back in Aug 2009 within the Site Programming, Development and Design forum:

    "Publishing your SQL 2008 database to the Winhost SQL 2008 Server"

    Thanks
     
    Last edited by a moderator: Oct 14, 2015
  5. Cool deal, glad you worked it out.
     

Share This Page