Viewing 15 posts - 316 through 330 (of 7,608 total)
Or make the value column a sql_variant data type.
November 2, 2023 at 5:15 pm
SQL may not evaluate things in the order you expect it to, so something like that could indeed be happening in certain circumstances.
November 2, 2023 at 3:14 pm
;WITH cte AS (
SELECT @@SERVERNAME AS ServerName,
b.database_name AS DatabaseName,
...
November 2, 2023 at 1:47 pm
Still, be sure you do not have some type of accidental join / cross join that will generate extra rows.
November 2, 2023 at 1:42 am
I'm not sure I understand correctly, nor what result you expect to see from the sample data, but maybe this(?), based on my reading of your requirements so far:
November 1, 2023 at 7:11 pm
I would think you would want to use "EXEC AS" on the proc itself rather than inside the proc.
Sadly, without giving IMPERSONATE to the users, I cannot let...
November 1, 2023 at 6:42 pm
Great, glad it helped. You might want to mark my comment as the solution, to potentially help future readers.
November 1, 2023 at 6:34 pm
Yeah, in the test environment, that's not surprising.
We're back to having to look at the query plans.
October 31, 2023 at 5:24 pm
I would think you would want to use "EXEC AS" on the proc itself rather than inside the proc.
October 31, 2023 at 5:20 pm
There should have been 2 result sets. Did the first query -- for missing indexes -- not return any rows?
October 30, 2023 at 6:31 pm
I would think so. If any objects have permissions set to "public", for example, I would think UserA could access them.
And naturally for contained dbs permissions would not require a...
October 26, 2023 at 2:13 pm
DELETE in batches rather than all at once, as long as each DELETE won't require (up to) a full scan of the table to find the rows to delete.
If you...
October 23, 2023 at 3:03 pm
Compress the data. Look at both page compression and COMPRESS/DECOMPRESS for large char columns.
October 20, 2023 at 1:45 pm
You might also look into data compression (both page compression and COMPRESS()/DECOMPRESS() for long text data).
October 19, 2023 at 6:22 pm
Agreed. Partition the data if you need to update stats on a very large table and you can separate active data from inactive data by partitioning.
October 19, 2023 at 3:21 pm
Viewing 15 posts - 316 through 330 (of 7,608 total)