January 19, 2015 at 6:36 pm
I am a SQL newbie.
I have inherited a project that has a SQL Server 2008 R2 backend.
In SSMS (Microsoft SQL Server Management Studio) I see that in
'Databases' => 'System Databases' => 'master' => 'Tables'
the previous developer(s) put all of the applications data tables!!
I have created a new database in
'Databases' => 'mynewapp'
and am creating tables in there as required.
Why would you put an applications tables in
'Databases' => 'System Databases' => 'master' => 'Tables'
as this seems contrary to what I read about the 'master' database? These tables have no data rows.
I know they had a test and production environment most of which seems to no longer exist. Could this have been used to somehow keep a test and production environment synchronized?
GadgetGuy
GadgetGuy
January 19, 2015 at 7:50 pm
GadgetGuy (1/19/2015)
I am a SQL newbie.I have inherited a project that has a SQL Server 2008 R2 backend.
In SSMS (Microsoft SQL Server Management Studio) I see that in
'Databases' => 'System Databases' => 'master' => 'Tables'
the previous developer(s) put all of the applications data tables!!
I have created a new database in
'Databases' => 'mynewapp'
and am creating tables in there as required.
Why would you put an applications tables in
'Databases' => 'System Databases' => 'master' => 'Tables'
as this seems contrary to what I read about the 'master' database? These tables have no data rows.
I know they had a test and production environment most of which seems to no longer exist. Could this have been used to somehow keep a test and production environment synchronized?
GadgetGuy
As a general rule, I never (deliberately) create any objects in the master database. Occasionally, I will create a new query window and not notice that it is pointing at the Master database and create objects...when I notice this, I delete them. Perhaps your predecessor did something like this and failed to notice.
As for using this to keep test and production synchronized - I would hope that this is not the case. If, for some reason, these 2 environments are on the same server, they should be in different user databases.
January 19, 2015 at 8:24 pm
The previous developer(s) were developing offsite and bringing in updates so certainly were developing on a different machine.
GadgetGuy
January 19, 2015 at 11:44 pm
The previous developer probably made a mistake and left out the USE statement when he deployed once. User tables should not be created in master in general, definitely not tables that an application uses.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply