Abdel Ougnou

228 posts

Abdel Ougnou

Abdel Ougnou

@aougnou

I have been playing around with SQL Server since version 6.5. I can make your SQL Server faster and a lot better than it is today.

Washington, DC Katılım Şubat 2011
177 Takip Edilen25 Takipçiler
Abdel Ougnou
Abdel Ougnou@aougnou·
#sqlhelp how fast is it for a table with Billions of rows: ALTER TABLE table1 SWITCH TO table2
English
3
0
1
0
Abdel Ougnou
Abdel Ougnou@aougnou·
incase anyone else needs it :)
English
0
0
0
0
Abdel Ougnou
Abdel Ougnou@aougnou·
--part2 WHERE DATENAME(weekday, DATEADD(yy, DATEDIFF(yy, 0, GETDATE()), n.num)) = 'Friday' ) select * from cte1 where rn % 2 != 0
English
0
0
0
0
Abdel Ougnou
Abdel Ougnou@aougnou·
--part1 with cte1 as( SELECT ROW_NUMBER() OVER(ORDER BY (SELECT NULL)) as rn, Fridays = DATEADD(yy, DATEDIFF(yy, 0, GETDATE()), n.num) FROM (SELECT TOP 366 num = ROW_NUMBER() OVER(ORDER BY a.NAME)-1 FROM dbo.syscolumns a, dbo.syscolumns b) n
English
0
0
0
0
Abdel Ougnou
Abdel Ougnou@aougnou·
that gets every Friday, now how to get "every other Friday"?
English
1
0
0
0
Abdel Ougnou
Abdel Ougnou@aougnou·
SELECT Fridays = DATEADD(yy, DATEDIFF(yy, 0, GETDATE()), n.num) FROM (SELECT TOP 366 num = ROW_NUMBER() OVER(ORDER BY a.NAME)-1 FROM dbo.syscolumns a, dbo.syscolumns b) n WHERE DATENAME(weekday, DATEADD(yy, DATEDIFF(yy, 0, GETDATE()), n.num)) = 'Friday'
English
0
0
0
0
Abdel Ougnou
Abdel Ougnou@aougnou·
@kevchant it says its working on: Processed 130299320 pages for database 'VLdb', file 'PrdDt1' on file 1.... and it has to do a few of these files but because it's a 26TB DB it takes sometimes hours to complete this part after it has already reported Restore 100% complete
English
0
0
0
0
Abdel Ougnou
Abdel Ougnou@aougnou·
I track 26TB restore when it gets to 100% completed it keeps PROCESSING files and that takes hours to complete. 100 percent processed. Processed 130299320 pages for database 'VLdb', file 'PrdDt1' on file 1...... How to track the second part? #sqlhelp #sqlfamily
English
2
0
0
0
Abdel Ougnou
Abdel Ougnou@aougnou·
Script only tracks 1st part: SELECT session_id as SPID, command, a.text AS Query, start_time, percent_completeFROM sys.dm_exec_requests r CROSS APPLY sys.dm_exec_sql_text(r.sql_handle) a WHERE r.command in ('BACKUP DATABASE','RESTORE DATABASE')
English
0
0
0
0
Greg Gonzalez
Greg Gonzalez@SQLsensei·
@aougnou Hmm, sounds like a settings inheritance or object groups issue. Email S1 support and they'll help you figure out what's going on.
English
1
0
1
0
Abdel Ougnou
Abdel Ougnou@aougnou·
#sqlhelp I have created many alerts for long running query > 1 hr. in TSQL but I am having a hard time figuring out how to do it using #SentryOne. Any Blog posts or articles out there on how to do it? My Google-Fu is failing me on this one. Thanks in advance @SQLFamily.
English
1
0
0
0
Abdel Ougnou
Abdel Ougnou@aougnou·
@SQLsensei @SQLFamily The problem am having is that it's not responding to my threshold when I customize it to duration >= 30 minutes. It's still going by the default (I believe 1 hr. or 250%). Top SQL: Duration Threshold Max and [Event Duration.Total Minutes] Is greater than or equal to 30
English
1
0
0
0
Abdel Ougnou
Abdel Ougnou@aougnou·
@AngelaTidwell that should be captioned: "Internals of Table Fragmentation How it Works".
English
0
0
1
0
Abdel Ougnou
Abdel Ougnou@aougnou·
Every time leadership asks to speed up production I think of that chocolate factory episode from The Lucy Show 🤣
GIF
English
0
0
0
0
Abdel Ougnou
Abdel Ougnou@aougnou·
@GFritchey Yes please, I think we are all starting to smell you from here 😝
GIF
English
0
0
1
0
Grant Fritchey
Grant Fritchey@GFritchey·
Shower? The fact that I'm thinking about it probably means the answer is yes.
English
2
0
14
0