Viewing 15 posts - 871 through 885 (of 1,219 total)
A solution composed just before bedtime, and it could serve from further testing:
;WITH CTE AS (
SELECT legacyid, field1, newid,
...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
August 14, 2013 at 4:22 pm
ztoddw (8/14/2013)
So is there a way to tell SQL Server to close the file handles after it's done validating all the databases, until someone actually logs in?
You can set...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
August 14, 2013 at 4:07 pm
GRANT SELECT and DENY VIEW DEFINITION on the object:
CREATE USER nisse WITHOUT LOGIN
go
CREATE TABLE pelle (a int NOT NULL)
GRANT SELECT ON pelle TO nisse
DENY VIEW DEFINITION ON pelle TO nisse
go
EXECUTE...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
August 14, 2013 at 4:00 pm
Write a small program in C#/VBScript/Perl/whatever that runs the query, and then invokes SQLCMD once for each database. Or just simply run the script directly. (Running a script file is...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
August 14, 2013 at 3:38 pm
dgutie02 (8/14/2013)
Ah, okay, I was afraid so. How does this sound then?
1) Restore the Database on the new machine
2) Increase the filesize
3) Backup the new database
4) Restore the backup of...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
August 14, 2013 at 3:34 pm
Are the database that fail on different disks than the database for which DBCC works?
What is the file system for the F disk?
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
August 14, 2013 at 3:30 pm
Stefan Krzywicki (8/14/2013)
Is there a way to use the listed query_hash or query_plan_hash so I can see the plan?
The hashes are just hashes.
To see the plan for a specific statement...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
August 14, 2013 at 1:58 pm
Stefan Krzywicki (8/14/2013)
This only shows the data from the most recent run. I'll have to run it after the problem, but before the next run.
The data you see is not...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
August 14, 2013 at 1:39 pm
This is something you should do client-side, not in SQL Server. SQL Server serves the data. Formatting is best done elsewhere. I assume that this for some export purpose. There...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
August 14, 2013 at 6:33 am
Ah, so you have a stored procedure. In that case, there is a somewhat simpler query:
with cte as (
select substring(est.text, (qs.statement_start_offset + 2)/2,
...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
August 14, 2013 at 6:28 am
I will have to admit that I did not look at the deadlock chain. My experience of serializable was enough.
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
August 14, 2013 at 1:15 am
Do you have a paritioned table or a partitioned view? Can you post the scripts for what you have, so that we can understand what you are talking about?
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
August 13, 2013 at 4:10 pm
I think you shold take out the HOLDLOCK. HOLDLOCK is the same as SERIALIZABLE, that is protection against "phantom reads", that is rows that were inserted since you read the...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
August 13, 2013 at 4:07 pm
I think you should invest whether the query plan at the problematic point in time is a fresh one or a new one. You can use this query to search...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
August 13, 2013 at 4:01 pm
Yes, that works, since the dynamic SQL is a scope of its own. But it is hardly a realistic workaround.
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
August 13, 2013 at 3:48 pm
Viewing 15 posts - 871 through 885 (of 1,219 total)