dbcc | compiler using the mpc parser combinator library
kandi X-RAY | dbcc Summary
kandi X-RAY | dbcc Summary
dbcc is a program for converting a DBC file primarily into into C code that can serialize and deserialize CAN messages into structures that represent those messages and signals. It is also possible to print out the information contained in a structure.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of dbcc
dbcc Key Features
dbcc Examples and Code Snippets
Community Discussions
Trending Discussions on dbcc
QUESTION
I have a stored procedure retrieving a large amount of data (two hundred thousand records). The SP works fine in SSMS with a run time at around 12 seconds. I am running an SSRS report with the SP, which works fine in SSRS preview, it takes around 30 seconds. When I run the SSRS Report via the SSRS URL access it hangs for about half an hour before crashing with a
Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500
Although the SP crunches a lot of data it only returns a small amount to the report (circa 200 rows max).
I have ensured that my SP has local parameters and all input parameters are passed through these for use (which I believe helps with parameter sniffing?).
I have checked that the SSRS preview is not retrieving cached data by clearing down the cache.
I have tried DBCC DROPCLEANBUFFERS;
and DBCC FREEPROCCACHE
to see if that makes a difference.
I checked log using Select * From Executionlog2
and found that the TimeDataRetrival = 32550
, TimeProcessing = 29
and TimeRendering = 1798778
.
It looks to me like the report is taking ages to render rather than retrieving data, which given the low number of rows passed to the renderer is strange.
Has anyone got any ideas what my next course of action/investigation should be?
...ANSWER
Answered 2022-Feb-05 at 17:30After a long and procrastinated investigation I could find no reason for the report rendering taking ages. In the end I created a new report and added items incrementally, continually testing to narrow down what was causing the render issues. In the end I had recreated the report in its entirety and the 'new' report runs fine. The only thing I can take from this is that there is something slightly 'off' on the original that is tripping the renderer and causing some sort of delay.
QUESTION
I need to TRUNCATE
or DELETE
all tables in schema.
I found this code:
...ANSWER
Answered 2022-Feb-04 at 03:46You simply need to wrap your "delete from all the tables" script with a "drop all foreign keys" script at the beginning, and "re-create all foreign keys" script at the end. I show one way to do that here:
However, I would argue that it is much cleaner to just script out the database and empty objects from source control than spend all this time and effort deleting data from one table at a time.
Anyway an attempt at what you're doing (if you truncate you don't also need to checkident, I'm not sure I would ever use undocumented and unsupported procedures like sp_msforeachtable
, and I also stay the heck away from INFORMATION_SCHEMA
). Please try this on a test database.
QUESTION
I used the following query to view the database log file.
...ANSWER
Answered 2021-Dec-31 at 12:42As I informed in the main post, after a while, the size of our database file log reached about 25 gigs and we could no longer even compress the database files. After some searching, I came to the conclusion that I should back up the log file and then compress the log file. For this purpose, I defined a job that prepares a file from a log backup file almost every 30 minutes, and the size of these files usually does not exceed 150 MB. Then, after each backup of the log file, I run the log compression command once. With this method, the size of the log file is greatly reduced and now we have about 500 MB of log file. Of course, due to the large number of transactions on the database, the mentioned job must always be active. If the job is not active, I will increase the log volume again.
QUESTION
I am trying to write a stored procedure to search through text fields of a table as follows:
TABLE: [User]
...ANSWER
Answered 2021-Nov-28 at 23:42Question 1
I think the problem is around the OR
predicates inside the parenthesis in each condition, I believe it should be an AND
predicate like shown below:
QUESTION
I have a cursor in order to separate rows based on a required quantity for each item, this works kind of fine, with the exception that it doesn't return the first rows and instead, if the row for example has a value of quantity 3, it adds it to the last row. My code is the following:
...ANSWER
Answered 2021-Sep-23 at 18:23The problem is that you fetch a row just after you open the cursor, but don't do anything with the fetched values. So you end up missing the first row. To correct that, reorganize your code this way:
QUESTION
I have two SQL queries.
First query:
...ANSWER
Answered 2021-Sep-20 at 10:33Normally, aggregation is much slower than not aggregating. However, moving the final result set out of the database also takes time.
The time spent returning 1,450,000 rows is clearly much greater than returning 24 rows. I would speculate that this accounts for much of the difference in your case. In fact, it probably accounts for more of the difference, because the aggregation should be slower.
Aggregation can make use of indexes on the tables, so your database might also have indexes that optimize the aggregation.
QUESTION
I have a Table called Person
, this table is non-empty and it's filled with records ( more than 1000 rows )
How can I reset the identity seed of this table?
Id PersonName 154 Alice 155 JohnThe query was executed, but the table still has the identity
...ANSWER
Answered 2021-Sep-16 at 11:41The problem is your understanding; the code is very likely working exactly as it is supposed to, and as I demonstrated.. RESEED
resets the value of the next IDENTITY
generated, it doesn't change any of the existing values.
Take SQL similar to what I gave in the comments:
QUESTION
I am using a powershell code https://dba.stackexchange.com/a/254401/92058 that is looping through each database on an instance and checking for corruption using DBCC CheckDB
sql command.
If a corruption detected (like in this case a page is corrupted on DB 50Ways), the DBCC CheckDB command will output a message (not an error!).
As you can see, processing database 50Ways
the message popped up below, indicating that it found a corrupted page.
So how can I capture only this message (if any) and save it to a variable, so then, I can shoot an email notification to myself.
...ANSWER
Answered 2021-Sep-15 at 04:39These are just standard exception errors that you can capture using the CommonParameter -ErrorVariable
or by using the automatic variable $Error
.
Below is an example of using ErrorVariable. We tell Invoke-SqlCmd
to store any errors encountered in a variable called 'dbCheckErrors'. We later check if this variable $dbCheckErrors
contains any ErrorRecords and if it does we collect all the Exception messages into our $errorCollection
array for later access. Once done with our db checks we can either view the messages, save the messages into file, both, or whatever else.
QUESTION
We are using version of SQL Server following and version update not allowed at my work:
Microsoft SQL Server 2017 (RTM-GDR) (KB4583456) - 14.0.2037.2 (X64)
I'm trying to clone a database but I get "'VERIFY_CLONEDB' is not a recognized option"
error.
DBCC CLONEDATABASE (AdventureWorks, AdventureWorks_Clone) WITH VERIFY_CLONEDB; GO
What can i use instead of this method:
...ANSWER
Answered 2021-Aug-05 at 13:29VERIFY_CLONEDB
isn't supported in the version you are using. From the documentation:
VERIFY_CLONEDB
Verifies the consistency of the new database. This option is required if the cloned database is intended for production use. Enabling VERIFY_CLONEDB also disables statistics and query store collection, thus it is equivalent to running WITH VERIFY_CLONEDB, NO_STATISTICS, NO_QUERYSTORE. This option is available starting with SQL Server 2014 (12.x) SP3, SQL Server 2016 (13.x) SP2, and SQL Server 2017 (14.x) CU8.
You need to install at least CU8 to take advantage of this feature (we're on CU25 at the moment).
QUESTION
I'm trying to get the MessageText field from DBCC output, but this returns syntax error
...ANSWER
Answered 2021-Jul-17 at 10:07To get back, directly in your program, the results of a DBCC command you need to subscribe to the InfoMessage event of the SqlConnection class.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install dbcc
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page