Viewing 15 posts - 2,596 through 2,610 (of 7,191 total)
Sergiy (5/25/2016)
And from looking at the overall design I can conclude the clustered index on ReportItem must be(report_id, flow_name, report_item) INCLUDE (source)
Do you mean (report_id, flow_name, report_item, source)? ...
May 26, 2016 at 4:30 am
onlo (5/26/2016)
I have to run sp_change_users_login, otherwise, I can't add the db_owner right to the user: "user already existed ...."
But the user is dbo already, so you don't need to...
May 26, 2016 at 4:24 am
Yes, you need to reinstall as Standard (or build a new server and install on there) and then restore the databases on it, including the system databases. First, though,...
May 26, 2016 at 3:53 am
If userabc has just restored the database, then it's going to be the database owner (dbo), so you shouldn't need to run sp_change_users_login. Unless I've missed something, that is....
May 26, 2016 at 2:59 am
You didn't answer the question about the clustered index. But assuming that 's not possible (or not desirable), don't just blindly accept index recommendations from the execution plan. ...
May 25, 2016 at 9:27 am
All of the columns? Are you sure you need them all in the index? If you do, have you considered making this index the clustered index?
John
May 25, 2016 at 8:47 am
Try experimenting in dev with the SORT_IN_TEMPDB option, but be aware of the consequences for the size of tempdb. If you have Enterprise Edition, consider using the ONLINE option....
May 25, 2016 at 5:59 am
RonKyle (5/23/2016)
May 23, 2016 at 6:42 am
Partial solution. Will only work if all elements are four characters long (which they are in your sample data).
SELECT
SUBSTRING(Diagnoses_For_Spell,1,4)
,SUBSTRING(Diagnoses_For_Spell,6,4)
,SUBSTRING(Diagnoses_For_Spell,11,4)
,SUBSTRING(Diagnoses_For_Spell,16,4)
,SUBSTRING(Diagnoses_For_Spell,21,4)
,SUBSTRING(Diagnoses_For_Spell,26,4)
,SUBSTRING(Diagnoses_For_Spell,31,4)
,SUBSTRING(Diagnoses_For_Spell,36,4)
,SUBSTRING(Diagnoses_For_Spell,41,4)
,SUBSTRING(Diagnoses_For_Spell,46,4)
FROM #temptable
John
May 20, 2016 at 5:23 am
So you want to choose the first BL Number in your list for each combination of Port and Vessel? But how do you decide which is the first? ...
May 19, 2016 at 9:35 am
No, I don't think so - only if you're connected in Object Explorer or a query window. But try it if you're not sure.
John
May 19, 2016 at 1:57 am
Yes. Use the Registered Servers window.
John
May 18, 2016 at 9:45 am
Use [font="Courier New"]RESTORE HEADERONLY FROM DISK = '...'[/font] to get size information for the backup(s) in your file (a file can contain more than one backup). Use [font="Courier New"]RESTORE...
May 18, 2016 at 9:33 am
That'll depend on a number of things, such as the transaction isolation level. But you can find the answer for yourself by putting a few strategically-placed [font="Courier New"]EXEC sp_lock[/font]...
May 18, 2016 at 5:03 am
I'm sorry - I'm out of my depth here. I don't know why you're seeing this behaviour.
John
May 18, 2016 at 3:06 am
Viewing 15 posts - 2,596 through 2,610 (of 7,191 total)