Viewing 15 posts - 91 through 105 (of 7,191 total)
Have you tried getting the row count from the sys.partitions view?
John
In this case, I think that's a bad idea because that may not match the actual...
April 20, 2020 at 6:49 pm
Have you tried getting the row count from the sys.partitions view?
John
In this case, I think that's a bad idea because that may not match the actual number of...
April 20, 2020 at 3:58 pm
Have you tried getting the row count from the sys.partitions view?
John
April 20, 2020 at 2:46 pm
Your New-Object command is running before you've done any existence check. If the database already exists then you'll get an error.
John
April 20, 2020 at 10:57 am
What happens if you run the SELECT statement on its own? What number does it return? What happens if you run from EXEC to the end? Does it send an...
April 20, 2020 at 10:44 am
Create a temp table and insert the results of the EXEC statement into the temp table, then select from that table at the end.
John
April 20, 2020 at 10:30 am
I suppose you could try filtering like this
database_name = 'DatabaseName' OR sql_text LIKE '%DatabaseName.%' OR sql_text LIKE '%[[]DatabaseName].%'
.Forgive me if I haven't escaped those square brackets correctly!
John
April 17, 2020 at 3:49 pm
Have you tried a SQL Audit? You can control what you capture with very fine granularity.
John
April 16, 2020 at 3:26 pm
If you've got different execution plans, chances are something is different. It could be that the statistics are more up to date on one server than the other, or maybe...
April 16, 2020 at 10:17 am
You need either to manually delete the referencing rows after the referenced rows, or recreate the foreign key constraint with the ON DELETE CASCADE option.
John
April 16, 2020 at 9:59 am
Are you updating statistics with the same frequency on both servers? Please post the actual execution plan for the query on each server.
John
April 16, 2020 at 8:23 am
The datetimeoffset data type isn't as flexible in the range of string formats it supports as datetime is. Please see the documentation. I think you'll need to remove the...
April 15, 2020 at 10:46 am
Looks like your linked server object is set to connect with the login name suser, but that login doesn't exist on the remote server.
Help us to help you. We're not...
April 15, 2020 at 10:05 am
Use STUFF to replace the first five characters with a blank, or LEN and RIGHT to return all but the first five characters. Have a go and post back with...
April 15, 2020 at 9:08 am
Have you tried stripping the day name from the beginning of the string?
John
April 15, 2020 at 8:54 am
Viewing 15 posts - 91 through 105 (of 7,191 total)