Viewing 15 posts - 1,426 through 1,440 (of 7,619 total)
Don't know, since we can't see the code. Just adding ROW_NUMBER() to a query should not increase the number of rows.
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
July 12, 2021 at 2:07 pm
Best would be to create the proc so that it runs as "OWNER", if SQL allows you to do that. Then the auditors wouldn't need separate permissions of their own.
Otherwise,...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
July 11, 2021 at 7:22 pm
Columnstores perform better because they compress data extremely well.
If you a rowstore that's totally uncompressed, the difference will be massive. If the rowstore is page compressed, at least it has...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
July 9, 2021 at 8:55 pm
Hi ScottPletcher, I have not seriously considered page compression instead of (N)CCI's as not using any columnstores would require us creating B-Tree indexes to keep query performance sane. In...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
July 9, 2021 at 7:07 pm
Thank you for your answers.
The EXEC command returns the same error, I had already tried this.
I don't want to create the object on the second database, cause my query...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
July 9, 2021 at 3:18 pm
EXEC('SELECT * INTO [SecondDatabase].[dbo].[object_name] FROM [FirstServer].FirstDatabase.dbo.object_name') AT [SecondServer]
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
July 9, 2021 at 2:58 pm
Don't forget about views: if you prefer that some people see a combined result as a table, you can use a view so they can see it as table, without...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
July 8, 2021 at 9:47 pm
Have you tried PAGE compression rather than going all the way to a columnstore format?
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
July 8, 2021 at 9:38 pm
Agreed, you don't need nor want a separate table.
If you're having performance issues with the existing table generating your result using the PIVOT, then let's fix that issue, not create...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
July 8, 2021 at 8:34 pm
I'm with Phil. Whenever I've seen this error it relates to the DEFAULT db specific for the user (or group).
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
July 8, 2021 at 8:24 pm
The indexes could be critical. Would you be able to post the DDL for the tables and the SQL queries?
SQL 2016 could be a big help in another way, it...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
July 8, 2021 at 3:26 pm
Exactly. Just this:
SELECT MIN(StartDate) AS MinDate
FROM Schedule
WHERE WorkCenterID = 'LAY-W' AND ScheduleID = '5'
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
July 7, 2021 at 8:56 pm
If there are potential index(es) on col_a and/or col_b, then I'd stick with the first style. If not, the second is ok too.
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
July 7, 2021 at 2:58 pm
OK. By default you'll always read the last committed value, using standard READ COMMITTED (hence the name, I guess :-)).
...or you will be blocked if RCSI is not enabled.
Your...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
July 6, 2021 at 10:31 pm
Yes, if userB uses WITH (NOLOCK) on the table(s), or READ UNCOMMITTED isolation level
But Scott, "IT Researcher" asked "is it possible for userB to read last committed values" and...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
July 6, 2021 at 6:24 pm
Viewing 15 posts - 1,426 through 1,440 (of 7,619 total)