May 13, 2004 at 2:51 am
Hello,
Trying to tun the following in query analyzer.....
DECLARE @xx AS nvarChar(128)
SET @xx = (SELECT DB_NAME()) --Pick up current dbname
ALTER DATABASE @xx
SET RECURSIVE_TRIGGERS ON
GO
But get's error....
Server: Msg 170, Level 15, State 1, Line 3
Line 3: Incorrect syntax near '@xx'.
Server: Msg 195, Level 15, State 1, Line 5
'RECURSIVE_TRIGGERS' is not a recognized option.
As if is does not recoqnize @xx as valid name. The variable is set correctly (try "SELECT @xx after setting it)
Any idea's ????
Thanks,
Lars
May 13, 2004 at 3:04 am
Tried it.....
DECLARE @xx AS nvarChar(128)
SET @xx = (SELECT DB_NAME()) --Pick up current dbname
exec ('ALTER DATABASE '+@xx+'SET RECURSIVE_TRIGGERS ON')
GO
Gives
Server: Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'ON'.
Also tried (adding space before SET)
DECLARE @xx AS nvarChar(128)
SET @xx = (SELECT DB_NAME()) --Pick up current dbname
exec ('ALTER DATABASE '+@xx+' SET RECURSIVE_TRIGGERS ON')
GO
Gives
Server: Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'SET'.
Server: Msg 195, Level 15, State 1, Line 1
'RECURSIVE_TRIGGERS' is not a recognized optio
??? What is going on ???
Thanks Lars
May 17, 2004 at 8:13 am
Lars:
Sincerely,
Allen Shannon
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply