Sql-server – BULK INSERT not supported

azure-sql-databasebulk-insertsql server

I have a text file, which I want to insert into a table in my database.

My query looks like this:

BULK INSERT myDepartment
FROM 'C:\myDepartment-c-t.txt'
WITH (
  DATAFILETYPE = 'char',
  FIELDTERMINATOR = '\t', -- default terminator
  ROWTERMINATOR = '\n'
);

On executing it, SQL Server Management Studio 2008 gives the following error:

'BULK' rowset provider not supported in this version of SQL Server.

I googled it and found that SQL Server 2008 does support BULK INSERT. Can anyone tell me what am I missing?

Best Answer

'BULK' rowset provider not supported in this version of SQL Server.

BULK INSERT is not supported on SQL Azure. You can use bcp or write something that wraps SqlBulkCopy to bulk insert into SQL Azure. There's other ways to bulk insert aside from these, too.

On executing it,my SQL management studio 2008,gives the following error :

Don't confuse SQL Server Management Studio with SQL Server Database Engine.