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

Missing table in SqlNexus database tbl_PERF_STATS_SCRIPT_RUNTIMES #55

Closed
seansensus opened this issue Nov 9, 2017 · 4 comments
Closed
Assignees
Labels

Comments

@seansensus
Copy link

I locally fixed the database connection strings in my previous reported issue and ran into this:

image

@nnerson
Copy link

nnerson commented Jan 10, 2018

Hello,

I faced a similar Issue. The problem was related to Collation. If the model database is not CI then you may need to manually create the database using those commands:

Use [master]
Go
Drop Database [sqlnexus]
Go
Create Database [sqlnexus]
Go
Alter Database [sqlnexus] Collate Latin1_General_CI_AI
Go

In this case, don't drop the current DB before importing.

I hope it is useful
Nicolas.

@mrittberg
Copy link

Hello,

I am also facing this problem, unfortunately, the workaround (new creation of the table) didn't work.

I am grateful for any help.

@seansensus
Copy link
Author

seansensus commented Jul 24, 2018 via email

@prmadhes-msft prmadhes-msft self-assigned this Jul 22, 2020
@PiJoCoder PiJoCoder added bug wave 1 - complete consider this issue for next wave of fixes labels Apr 21, 2022
@gambit9009
Copy link
Contributor

Double sided issue here.
#1. Check the table to make sure it exists before blindly doing a.
fmImport.cs line 1128

cmd.CommandText = "select count (distinct runtime) 'NumberOfRuntimes' from tbl_PERF_STATS_SCRIPT_RUNTIMES";

cmd.CommandText = "select count (distinct runtime) 'NumberOfRuntimes' from tbl_PERF_STATS_SCRIPT_RUNTIMES";

#2. Why was the table not there? Looking in code can see how it is possible. We create that table from tbl_OS_WAIT_STATS without checking to see if that data is blank.

IF OBJECT_ID ('tbl_PERF_STATS_SCRIPT_RUNTIMES') IS NOT NULL DROP TABLE tbl_PERF_STATS_SCRIPT_RUNTIMES
GO
--it used to use tbl_requests. but that table wont' get much data if server is idel. wait stats is gauranteed to generate
SELECT DISTINCT runtime INTO tbl_PERF_STATS_SCRIPT_RUNTIMES FROM tbl_OS_WAIT_STATS ORDER BY runtime
GO

Worst case. Create blank table. Insert into it.

PiJoCoder added a commit that referenced this issue Aug 17, 2022
Co-Authored-By: Todd <22751647+gambit9009@users.noreply.github.com>
@PiJoCoder PiJoCoder removed the wave 1 - complete consider this issue for next wave of fixes label Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants