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.
| Author |
Topic |
|
sparrow37
Posting Yak Master
148 Posts |
Posted - 2009-12-20 : 05:39:38
|
| Hi all,I have following stored procedure :CREATE procedure [dbo].[USStats]asexec sp_fulltext_database 'enable'Declare @rand intSet @rand = Rand()Declare @Stores intSet @Stores = Round(( Select Count (grStoreID) from USgrStore )*9 + (Round(Rand()*2,0)) ,0)Declare @Groups intSet @Groups = ( Select Count (grGroupID) from USgrGroup )Declare @Type intSet @Type = Round(( Select Count (grTypeID) from USgrType )*2 ,0)Declare @gr intSet @gr = Round(( Select Count (grID) from USgr )*21.34 ,0)Declare @Prices intSet @Prices = Round(( Select Count (grPriceID) from USgrPrice )*134+ (Round(Rand()*2,0)) ,0)Declare @User intSet @User = (Select max(grUserID) from USstatsTable) + Round(Rand()*1,0)Insert into USstatsTable (grStore , grGroup , grTypeID, grID, grPriceID, grUSerID, time)Values (@Stores, @Groups, @Type, @gr, @Prices, @User, getdate())Select top 1 grStore , grGroup , grTypeID, grID, grPriceID, grUSerID, time from USstatsTable order by USstatsTable.time descGOIt gives error on following line after 'as' wordexec sp_fulltext_database 'enable'I get following error:User does not have permission to perform this action. if i comment this line, it works fine. Is there any harm in commenting this line. What is alternative to this statement that I can use in my stored procedure. I am testing it on database server. I cant change user permissions to I will have to change stored procedure. On my local system, It works fine because I have enough user permissions.Please help me on this.Regards,Asif Hameed |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-12-20 : 06:02:16
|
| what you're doing by that line is enabling full text index on database. you can comment that and ask anybody with admin rights to do that for you. it needs to be done once. |
 |
|
|
|
|
|
|
|