You need to restart the SQL Service for the change to be visible from Query Analyzer it seems (sql2000). As you say, EM seems to pick it up straight away. Looking at the registry whilst making the change via EM it definately changes the registry straight away which is where EM is picking it up from .Looking in Profiler I can see that EM calls xp_instance_regread to get the default data and log directories (from the updated registry) and formats a create database statement likeCREATE DATABASE [t2] ON PRIMARY (NAME = N't2_Data', FILENAME = N'C:\1\t2_Data.MDF' ,SIZE = 1, FILEGROWTH = 10%) LOG ON (NAME = N't2_Log', FILENAME = N'C:\2\t2_Log.LDF',SIZE = 1, FILEGROWTH = 10%)
wheras when just run in Query Analyzer the trace shows CREATE DATABASE t2
I can only presume that the default locations are somehow cached on server startup.Edited by - jasper_smith on 09/13/2002 11:30:29