Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inspector - Inspector.DatabaseGrowthsInsert does not handle FILESTREAM files #205

Closed
AlexGay opened this issue Jan 28, 2020 · 2 comments
Closed
Assignees

Comments

@AlexGay
Copy link

AlexGay commented Jan 28, 2020

Describe the bug
When run on a server with filestream files configured you get the error "Arithmetic overflow error for data type tinyint. value = 65537.

To Reproduce
Steps to reproduce the behavior:
Create a new database file of type FILESTREAM Data for any database on the server by following these steps.

  1. Right click on the database.
  2. Click on the files tab.
  3. Click on the Add button.
  4. Enter a value in the Logical name field, Change File Type to FILESTREAM Data.
  5. Enter a value for Size (MB).
  6. Click OK.
  7. Run Inspector.InspectorDataCollection, or the appropriate job.

Expected behavior
Updated data to be added to Inspector.DatabaseFileSizes.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome
  • Version [e.g. 22]: 79.0.3945.130

Additional context
This error is caused by the file_id value for FILESTREAM files which is 65537. This is set by Microsoft and so not changeable.

My local fix for this was:
ALTER TABLE [Inspector].[DatabaseFileSizes]
ALTER COLUMN [File_id] INT NOT NULL;
GO

@Adedba Adedba self-assigned this Jan 28, 2020
@Adedba
Copy link
Collaborator

Adedba commented Jan 28, 2020

Hi @AlexGay ,

Thank you for the bug report and thank you for the fix! I will get this update added to the January updates due in the next couple of days.

Adedba added a commit that referenced this issue Jan 28, 2020
#205 - increase data type for File_id column in [DatabaseFileSizes] and [DatabaseFileSizeHistory] tables
@Adedba
Copy link
Collaborator

Adedba commented Jan 28, 2020

included the DatabaseFileSizeHistory table as this too has the File_id column.

Adedba added a commit that referenced this issue Jan 29, 2020
#205  updated DatabaseGrowthsInsert replacing = 'ROWS' with != 'LOG' as this was looking at data files only , now it looks at all types except for LOG.
Adedba added a commit that referenced this issue Jan 29, 2020
#205 Updated DatabaseGrowthsReport as Size and Growth rate is not applicable to Filestream no point in trying to report on growths for that file type.
@Adedba Adedba closed this as completed Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants