Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Truncate not working

Status
Not open for further replies.

enak

Programmer
Jul 2, 2002
412
US
I need to update a DTS package. One of the processes that it uses is deleting all of the data from a table. I have copied this from the production server onto a test server.

I can not get the process of deleting the data to work. The DTS uses the following statement:

truncate table [dbo].[tblCaseInfoAll]

If I run this on the test server I get a message that the user does not have permission to perform this action...or something like that. However, I can execute the following:

delete tblCaseInfoAll

and this works. I have checked the permissions of the user and they look good to me.

What am I missing?

Thanks,
enak
 
Do you have any constraints on the table?

Krickles | 1.6180

 
Nothing. I just dropped the table and recreated it but still can not truncate.
 
You must have dbo rights to the database in order to trunate.

Denny
MCSA (2003) / MCDBA (SQL 2000)

--Anything is possible. All it takes is a little research. (Me)

[noevil]
(Not quite so old any more.)
 
Thanks, the user id that I am using does not have dbo rights.
 
I made the userid a dbo. everything is fine now.
 
no problem.

Denny
MCSA (2003) / MCDBA (SQL 2000)

--Anything is possible. All it takes is a little research. (Me)

[noevil]
(Not quite so old any more.)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top