dbachecks icon indicating copy to clipboard operation
dbachecks copied to clipboard

New Check - Default File Paths

Open SQLDBAWithABeard opened this issue 6 years ago • 5 comments

I was certain that I had added these tests but no

Was just showing someone dbachecks and they need checks and configs for backup path, data directory and log directory

SQLDBAWithABeard avatar Feb 28 '18 15:02 SQLDBAWithABeard

How do you define default directory paths?

wsmelton avatar Mar 04 '18 01:03 wsmelton

Are you saying a config for each so you can run a check to find databases that are not in those paths? That does not make much sense to me except to verify potentially they are not on system drive (C:).

wsmelton avatar Mar 04 '18 01:03 wsmelton

In my org we have standard

E.g.

For data files, we use mount points 1-8 For log files, we have 1 mount point For systemdb, we have 1-4 mount points

Thus can be useful in my case if i see dbs not in any of those.

TheRockStarDBA avatar Mar 04 '18 02:03 TheRockStarDBA

@TheRockStarDBA so you are referring to a standard drive letter being mapped to your mount point across all servers in order to check the path of data files?

If we add a configuration for default data file paths, it will be one path...it would be difficult to come up with a way to handle multiple unless our configs can handle hash tables (which I'm not aware it can). Otherwise all we can validate is a single path in use for data files, which in cases where they are spread across multiple volumes or mount points will be difficult to not provide false positives...just in general thought of how this would possibly work.

wsmelton avatar Mar 04 '18 06:03 wsmelton

Two possible solutions or tests.

Check that the default path settings are set to the correct path instead of the defaults

Check that the databases are not on the C Drive ( This was the particular scenario that the person was talking to me about) They had set up some new instances and created new databases but all the data files ended up on the C drive because they hadnt noticed they hadnt set the default file paths

If they had had a test for the default path settings they could have checked after SQL installation and config

If they had had a test for datafiles on C drive they could have identified the solution much earlier.

SQLDBAWithABeard avatar Mar 04 '18 13:03 SQLDBAWithABeard