sp_dboption stored procedure

All temporary databases within a group must use the same dboptions.

If some of these options differ, then applications may not work correctly. For example, if a temporary database called mtdb1 in a group enables this option while another temporary database in the same group, called mtdb2, does not, then the following procedure, which creates a table and inserts a row leaving one field value out, does not work equivalently in the two temporary databases:

create procedure P1 as
    create table #t1 (c1 int, str char(250))
    insert #t1 values (1)
go

The insert statement in mtdb1 succeeds because NULLs are allowed, while the insert statement in mtdb2 fails because NULLs are not allowed.