|
Posted by Roy Harvey on 11/21/06 22:40
I believe this will do the job, though I suggest some small-scale
tests first.
1) Script out all the procs as CREATEs, but do not include the DROP
option.
2) Edit the script.
- Change CREATE PROC to ALTER PROC for all procedures.
- Change all the SET ANSI_NULLS ( and possibly the SET
QUOTED_IDENTIFIER) commands as you want them.
3) Run the script.
Roy Harvey
Beacon Falls, CT
On 21 Nov 2006 14:17:38 -0800, "balaji" <mailbalajijagan@gmail.com>
wrote:
>I have a database which contains more than 20000 stored procedures
>which were created with
>ansi nulls off. This i found out using the query
>SELECT name,AnsiNullsOn FROM
>(
>SELECT name, OBJECTPROPERTY(id, 'ExecIsAnsiNullsOn') AS AnsiNullsOn
>FROM sysobjects WHERE type = 'P' ) A WHERE AnsiNullsOn=0
>
>Is there any way that i can set this property to 1 for all the stored
>procedures i have??
>
>I know the alternate method is to drop the procedure and execute the
>scripts again with AnsiNullsOn = 1.
>
>Is there any other simple ways?? It will be very helpful for me..
Navigation:
[Reply to this message]
|