Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Enabling T-SQL ?

Author  Topic 

Johnny1985
Starting Member

26 Posts

Posted - 2007-06-02 : 06:57:27
Is there any special actions to enable T-SQL queries on my SQL 2005 Server DB ?

I keep getting the an unknown statement next to my BULK INSERT command.

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-06-02 : 06:59:35
no. T-SQL query is always enabled. What is the error you are getting ? post our query here also


KH

Go to Top of Page

Johnny1985
Starting Member

26 Posts

Posted - 2007-06-02 : 08:19:42
Error: "BULK INSERT SQL construct or statement not supported."
Query:
BULK INSERT dbo.TestInsert
FROM 'C:\10000Lines.txt'
WITH (LINETERMINATOR='|')
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-06-02 : 09:14:07
Is this the exact error message ?

How and where do you run the BULK INSERT query ?

BULK INSERT required bulkadmin role. If the user running the query does not have the access you will get "You do not have permission to use the bulk load statement.".



KH

Go to Top of Page

Johnny1985
Starting Member

26 Posts

Posted - 2007-06-02 : 09:25:13
Yes, this is the EXACT error message. I'm not getting any permission error.

I've created a DB table with two columns: Names (VarChar of 20), Priority (Smallint).
I'm trying to load it up with a file of thousands of lines with the BULK INSERT - no success.

My user is the NT Authority\SYSTEM, which has bulkadmin permissions.
However, it doesn't matter if I create another user with similar or even better permissions (everything from everything).

Have SQL Server 2005 SP2.

How can I know for sure T-SQL is enabled ? any other T-SQL, somewhat simple ones, commands that I could try ?
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-06-02 : 09:27:04
try running the query in the Query Window of SSMS. Login using sa or user with bulkadmin permission


KH

Go to Top of Page

Johnny1985
Starting Member

26 Posts

Posted - 2007-06-02 : 09:30:55
I am using SSMS ...
sa and own-created user - the same .. :(
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-06-02 : 09:34:12
This is strange. Try google for that error and see what can you find.


KH

Go to Top of Page

Johnny1985
Starting Member

26 Posts

Posted - 2007-06-02 : 09:35:03
Ok.,
Thanks for trying to help out ! :)
Go to Top of Page

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2007-06-02 : 10:37:54
what do you see if you run this:

select @@version


www.elsasoft.org
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-06-03 : 01:23:52
this is a continuation of this thread http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=84063


KH

Go to Top of Page
   

- Advertisement -