Viewing 15 posts - 586 through 600 (of 7,191 total)
I don't know whether automatic failback is even a thing. But even if it were, how would you want it to work - for failback to occur immediately the primary...
November 14, 2018 at 7:09 am
Why are you doing this row by row instead of as a set.
When you insert a NULL value, it doesn't have inverted commas round it in the INSERT...
November 14, 2018 at 4:52 am
Yes, or create the temp table before you start, instead of doing a SELECT INTO. I always think that's safer.
John
November 14, 2018 at 4:49 am
Do you have an actual execution plan from a long-running delete that you could post here, please?
John
November 14, 2018 at 4:47 am
No backup and restore is necessary - Availability Groups are a high availability technology. When your primary site is no longer available, your databases will automatically fail over to the...
November 14, 2018 at 1:55 am
If your database is read-only then your log file is not going to be used much and you're not going to need point-in-time recovery, so there's no harm in having...
November 9, 2018 at 2:21 am
Have a look at the index usage stats DMV. Any index that is being written to often and read from rarely is a potential performance harmer. Even then, it's going...
November 8, 2018 at 10:11 am
You could try something like this.
John
November 8, 2018 at 9:50 am
It depends. Usually the second index would be sufficient for both queries. However, if it's a requirement that both queries run in the absolute minimum time possible, you may want...
November 8, 2018 at 8:40 am
Just put the minus sign in the dynamic SQL, like this:... DATEADD(HOUR, -'+CONVERT(CHAR(2),@timeoffset)+ ...
I've got to ask, though - why do you need dynamic SQL...
November 8, 2018 at 7:47 am
It won't affect indexing, no, but Eddie is right - it does affect memory grants, which in turn affects performance. I overlooked that in my first reply.
LEN() returns...
November 8, 2018 at 1:50 am
Probably not, although it may affect data integrity. If the maximum length of any value in the column is going to be 50, then you don't want varchar(300) for that...
November 7, 2018 at 1:52 am
No, do transaction logs hourly if, for example, you can only afford to lose an hour of data in the event of a disaster.
Checkpoints occur automatically every minute...
November 2, 2018 at 11:11 am
You don't even have consistent table names in there. Sometimes you have 10032018 in the table name and sometimes you don't. If you don't care about your code, nobody else...
November 1, 2018 at 9:57 am
Viewing 15 posts - 586 through 600 (of 7,191 total)