Wednesday, February 07, 2018

Sizing MSSQL Server DB's - Rules of Thumb

Microsoft Technet has published an article that includes some rules of thumb for sizing a SQL Server system.
NOTE: These are for sharepoint.
ANOTHER NOTE:) These are rules of thumb, not hard-and-fast recommendations.
Still, I often find myself called upon to make such recommendations in the absence of proper analysis, so I wanted to record some of these for future reference.

Technet article - Rule of Thumb for MSSQL Server Sizing (Sharepoint)


NOTE: SQL Server 2016 Standard can support up to 32 GB RAM. Because RAM is cheap, doesn't impact licensing, and vastly improves MSSQL Server performance, you will find nearly any source recommending you max out the RAM that is supported by your SQL Server edition. The #'s below are useful for estimating CPU cores, which are generally less important for OLTP systems and generally DO impact licensing.
Combined size of content databases RAM recommended for computer running SQL Server
Minimum for small production deployments 8 GB
Minimum for medium production deployments 16 GB
Recommendation for up to 2 terabytes 32 GB
Recommendation for the range of 2 terabytes to 5 terabytes 64 GB
Recommendation for more than 5 terabytes Additional RAM over 64 GB can improve SQL Server caching speed


We then figure 1 CPU core for every 4 GB RAM, so a 16 GB system would have 4 CPU cores. 32 GB = 8.
Of course,this varies by app!!! If your app does a lot of in-db processing, or you have scads of concurrent users, you'll want to increase that figure. Our app is a 3-tier system, and does most processing (exception: sorts) in the middle tier, so CPU on the DB is very nearly never our bottleneck. If your app depends more on the DB, consider a 1CPU / 2 GB RAM ratio.


Of course, there's not much that I can say about sizing your disk, excepting some broad generalizations about the broad generalizations you need to make :-)
If you can determine the base things that have most impact on your db size, you can extrapolate from that.
For instance, if you have an insurance Policy Administration System, you might look at a test environment, count the # of policies, and create a MB / Policy ratio.
Inventory items, sales transactions, or song records are all examples of the "main things" that will drive your db growth, with other tables (such as, say, a Users table for a smaller installation) being ancillary or lost in the noise.


So, we end up with a SWAG on the storage size, which leads us to a rule of thumb on memory, and another rule of thumb on CPU.

Tuesday, December 26, 2017

The Soft and Melting Duck Egg Meditation (For Qi Gong Psychosis)

The Soft and Melting Duck Egg Meditation:
(Moving the yang qi from the head)
When Master Hakuin was just starting out upon his Zen career in Japan, he really put a lot of effort into his meditation. In fact, he pushed the chi (prana or life force) around in his body so much, as chi-gong and Tao school people are apt to wrongly do, that he totally screwed up all of the vital energy currents running through his body.
As Hakuin said, he felt hotness in the lungs, icy coldness in his feet, and a constant roaring in his ears from having strenuously pushed his chi into his head. To try and cure his condition, he went from doctor to doctor without any results. No one could help him.
Since doctors don't understand cultivationgong-fu, including even those who know Chinese medicine, even today Hakuin would not be able to cure himself unless he knew of the following technique which I'm going to reveal. You can use it to help purify your physical body, and to fight aging and sickness.
Hakuin was luckily directed to a Taoist sage in the mountains, Master Hakuyu, who scolded Hakuin for his wrong efforts and taught him the following meditation method to harmonize his body.
"If the student finds in his meditation that the four great elements are out of harmony, and body and mind are fatigued, he should rouse himself and make this meditation. Let him visualize placed on the crown of his head that celestial So ointment, about as much as a duck's egg, pure in color and fragrance. Let him feel its exquisite essence and flavor melting and filtering down through his head, its flow permeating downwards, slowly leaving the shoulders and elbows, the sides of the breast and within the chest, the lungs, liver, stomach and internal organs, the back and spine and hip bones. All the old ailments and adhesions and pains in the five organs and six auxiliaries follow the mind downwards. There is a sound as of the trickling of water. Percolating through the whole body, the flow goes gently down the legs, stopping at the soles of the feet.
"Then let him make this meditation: that the elixir having permeated and filtered down through him, its abundance fills up the lower half of his body. It becomes warm, and he is saturated in it. Just as a skillful physician collects herbs of rare fragrance and puts them in a pan to boil, so the student feels that from the navel down he is simmering in the So elixir. When this meditation is being done there will be psychological experiences, of a sudden indescribable fragrance at the nose-tip, of a gentle and exquisite sensation in the body. Mind and body become harmonized and far surpass their condition at the peak of youth. Adhesions and obstructions are cleared away, the organs are tranquilized and insensibly the skin begins to glow. If the practice is carried on without relapse, what illness will not be healed, what power will not be acquired, what perfection will not be attained, what Way will not be fulfilled? The arrival of the result depends only on how the student performs the practices."

Overview and self curing methods:
Deviation of Qigong refers to the adverse reactions that can occur during the course of Qigong exercise. The practitioner may feel uncomfortable and may not be able to regain balance. Such reactions can be physically and mentally harmful. Common causes of deviation include:
• Exercising or practicing under the guidance of an inexperienced instructor or one who has no understanding of TCM theories.
• Failing to obey the principle of exercising in light of concrete conditions such as those who are not fit for the exercise of intrinsic circulation but force themselves to do it anyway.
• Hoping to experience quick results and thereby failing to respond to the effects of Qi in the correct way.
• Failing to master the principle and methods of the Three Regulations leading to mental and physical confusion.
• Becoming frightened or irritated during the course ofQigong practice.
• Blindly or unnaturally guiding intrinsic Qi to circulate or force Qi to go out.
• Becoming confused or suspicious concerning the normal phenomena occurring in the course of Qigong exercise.
• Receiving treatment from an unqualified practitioner which can lead to deranged circulation of Qi.
Deranged Flow of Qi:
Symptoms. Dizziness, vertigo, panic, chest distress, short breath, uncontrolled movement of the extremities, tremors of the body, continuous, uncomfortable flow of Qi along a particular channel or area.
1. Self-Treatment with Qigong Exercise.
Terminate the qigong exercises that caused the symptoms mentioned above.
Do not panic, and calm down the mind. Pat the areas where the signs and symptoms are occurring and carry out self-massage along the proper route and in the correct direction. Massage the following channels: The Three Yin Channels of the Hand, The Three Yin Channels of the Foot, The Three Yang Channels of the Hand, and The Three Yang Channels of the Foot. If the symptoms are severe, see an experienced Qigong doctor.
2. Treatment with Outgoing Qi.
Select points, in the locations and along the channels, where functional activities of have been in a state of disorder. Flat Palm or Sword Thrust hand gestures, as well as pushing, pulling and quivering manipulations, should be used to help normalize the functional activities of Qi along the disordered or related channels. To finish, use the pushing manipulation to regulate the Yin and Yang and to guide Qi to a certain channel, viscera, or Dantian.
Stagnation of Qi and Stasis of Blood:
Symptoms. Pain, heaviness, sore and distending sensation, and sensation of compression. These symptoms will not disappear automatically and may become worse if not treated.
1. Self-Treatment with Qigong Exercise.
Terminate the Qigong exercises that have caused the symptoms.
If you feel a compressing sensation on the head and a severe headache, you may massage the acupuncture points Baibui (Du 20), Fengfu (GB 20), Tianrmn, Kangong, and Tajyang (Extra 2) and then pat and massage along the route and direction of the Du and Ren Channels. When you have finished, concentrate the mind on Yongquan (K 1) and Dadun(Liv 1) and carry out Head and Face Exercise.
If you feel tight and compressed on the forehead, you may first massage the points Tianmen, Kangong, and Taiyang (Extra 2) and then pat from Baihui (Du 20) down to the Dantian along the Ren Channel. This should be done several times. Next, conduct pushing-massage several times along the same route. Carry out this procedure in cooperation with Head and Face Exercise and Neck Exercise.
If you feel distending pain around the point Dazhui (Du 14), you may apply pushing manipulation on Dazhui (Du 14) and Jizhong (Du 6) and pat downward along the Du Channel several times. This therapeutic method may be used for the treatment of stagnation and blood stasis in any location. Administration of drugs dispersing in nature, treatment by outgoing Qi, and acupuncture is prohibited.
2. Treatment with Outgoing Qi.
In accordance with Corresponding Channel Point Selection Theory, select the points in and around the location where stagnation and blood stasis exist. Digitally tap and knead the points and push and stroke along the channel. Use the Flat Palm hand gesture and the manipulative procedures of pushing, pulling and quivering to emit Qi so that channel movement is induced. Outgoing Qi is applied along the channel route to guide and normalize the functional activities of Qi and to dredge the channels.
Leaking of Genuine (Vital) Qi:
Symptoms. During or after Qigong practice one may experience the sensation of Qi leaking of from the external genitals, anus, or other points. This leaking may not be controlled by the mind or simple breathing practice. Leaking of genuine Qi may lead to wasting and weakness of the extremities, a pale grayish and dark complexion, vexation, failure of mind concentration, spontaneous perspiration, night sweat, seminal emission, insomnia, and reluctance to speak or move.
1. Self-Treatment with Qigong Exercise.
Terminate the Qigong exercises that caused the symptoms.
Anus contracting, teeth tapping, and saliva swallowing are among other techniques that can often help alleviate symptoms. Another recourse is to pat the Ren, Du, and twelve regular channels along the direction of their course to ensure a smoother flow of Qi. The following herbal prescription may be given to bring Qi back to its origin:
Rhizoma Rebmanniae Praeparada (Sbudi) 30 grams
Fructus Comi (Shanyurvu) 30 grams
Radix Ginseng (Rensben) 9 grams
Magnetitum iCisbi) 30 grams
Radix Acbyranthis Bidenlatae (Niuxi) 18 grams
Cortex Cinnamomi (Rougui) 6 grams
Os Draconis Fossilia (Sbenghnggu) 30 grams
Concha Ostreae (Sbengmuli) 30 grams
Cinnabaris (Zbusba) 1 gram taken following its infusion
The above herbs, except Cinnabaris, which is infused separately, are prepared as one decoction and given by oral administration, 5-10 doses altogether.
2. Treatment with Outgoing Qi.
Press and knead the following points: Shenshu (U.B. 23), Mingmen (Du 4), the Dantian and Guanyuan (Ren 4). Using the Flat Palm hand gesture along with pushing-locating manipulation, emit Qi towards the point Mingmen (Du 4). Then use pushing-guiding manipulation to break through the channels and guide Qi to its origin. If Qi leaks from the external genitals, anus, or Huiyin (Ren 1), guide it to flow upward to the Middle Dantian. If Qi leaks from the sweat pores, close the pores and guide it to flow back to the Urinary Bladder Channel and the Lung Channel. If Qi leaks from the nasal cavity, treatment with outgoing Qi should focus on dredging the Lung and the Ren Channels.
Mental Derangement:
Symptoms: During Qigong exercises, a phenomenon of mental derangement (also called being infatuated (Ru Mo), may appear in some practitioners who have regarded the illusion emerging during or after Qigong exercise as true. This condition often leads to mental derangement such as uncommunicative and eccentric disposition, a withered and dull expression, apathy, and trance. Some even lose their confidence of living and want to commit suicide. Others suffer from continuous auditory and visual hallucinations, which are similar to that seen in psychotics. These symptoms are known as the ten devils and are described in Works of Zhong and Lu's Taoist Doctrine (Zhong Lu Chuan Dao Ji). The ten devils include: the devil of six thieves, the devil of animals, the devil of aristocracy, the devil of six passions, the devil of love, the devil of adversity, the devil of saints, the devil of fight, the devil of amusement with women, and the devil of sexuality.
1. Self-Treatment with Qigong Exercise.
Terminate the Qigong exercises that have caused the symptoms.
Turn a deaf ear to the auditory hallucination and a blind eye to the visual hallucination, and pay no heed to any illusion. Allow such illusions to emerge and disappear spontaneously. If the symptoms are severe, go and see a doctor for comprehensive treatment. The following prescription, Baihe Dibuang Tang, may be used for treatment:
Bulbus Libi (Baibe) 30 grams
Radix Rebmanniae (Sbengdibuang) 30 grams
Concha Ostreac (Sbengmuti) 30 grams
Magnetitum (Cisbi) 30 grams
Radix Acbyrantbis Bidentatae (Niuxi) 15 grams
Radix Potygalae (Yuambi) 12 grams Semen Zizipbi Spinosae (Cbaozaoren) Cinnabaris (Zbusba)
9 grams
1 gram taken following its infusion
These drugs, except Cinnabaris, which is infused separately, are decocted for oral administration.
2. Treatment with Outgoing Qi.
Open the points of the Eight Extra Channels in accordance with the theory of point selection called The Eight Methods of Intelligent Turtle (Ling Gui Ba Fa ) and with the principle of opening the points at a definite time. Press and knead the acupuncture points Baihui (Du 20), Dazhui (Du 14), Lingiai (Du 10), and Feishu (U.B. 13). Use Flat Palm or Sword Thrust hand gestures and the pushing-pulling-quivering manipulations to emit Qi and guide it to flow along the channels. Pinch the points Baihui (Du 20), Yintang (Extra 1), Shangen, Renzhong (Du 26), Tinggong (S.I. 19), Jiache (St 6), Quchi (L.I. 11), Hegu (L.I.4), Weizhong (U.B.40), and Chengshan (U.B.57). Use the Middle Finger Propping hand gesture and the vibrating method to emit Qi towards the points Jiuwei (Ren 15) and Zhongwan (Ren 12) for a period of 18 normal respirations. Next, guide Qi to flow along the Ren Channel back to Dantian.
Management of Temporary Symptoms Emerging during Qigong Exercise.
Some mild symptoms may emerge during the course of initial practice. These symptoms, usually resulting from incorrect exercise, should not be regarded as deviations and are not difficult to treat. Following, are some common symptoms and their management methods: Fullness of the Head and Headache. Qigong beginners who have not mastered the practicing methods are often nervous mentally. They may hold their facial muscles too tightly or exert too much mind control. Such situations often causeheadaches. Treatment methods include relaxation of the mind and muscles in the head during Qigong practice, Head Daoyin Exercise, Psychosomatic Relaxation Exercise, and the exercise of saying "Xu" from the Liver Regulation Exercise.
Choking Sensation in the Chest. This symptom usually stems from breath-holding and breath-prolonging. Massaging the Chest and Saying "He", Massaging the Chest and Saying "Si", Chest Exercise, or concentrating the mind on the point Zusanli (St. 36) may relieve this symptom.
Abdominal Distention and Soreness. These two symptoms usually occur in beginners who perform the exercise Abdominal Respiration too strenuously. To alleviate the symptom, pay attention to proper movement of theabdominal muscles, use a reasonable time duration for each exercise session, and practice Abdominal Exercise.
Coldness of the Extremities. This symptom is usually due to excess of Yin and deficiency of Yang or by incorrect Qigong practice in terms of time, posture, and breathing methods. If the symptom is caused by excess of Yin and deficiency of Yang and if the methods of the practitioner are correct, the Yang Qi will recover gradually and the symptoms will disappear. If the symptom is caused merely by incorrect practice methods, you should make the proper corrections and practice the exercise, Taking Essence From the Sun for supplementation.
Qigong Disease:
In Chinese medicine, the qi, the mind, and the breath are all closely related. In a sense, these are not three separate things but are aspects of a single reality. Numerous Chinese medical classics, such as the Nei Jing (Inner Classic) and Nan Jing (Classic of Difficulties), describe how the qi moves through the body in co-ordination with the breath. It is the lungs' respiration, which diffuses and scatters the ancestral or chest qi to spread and extend to the rest of the body. In addition, consciousness in Chinese medicine is referred to as the spirit brilliance, and the spirit is nothing other than the accumulation of qi in the heart. According to many Asian schools of meditation, the thoughts in the mind come and go with the movement of the breath. Therefore, alterations in respiration correspond to alterations in thinking and vice versa. Further, it is qi, which moves the body in space. Hence, there is likewise a relationship between the movement of the mind, the circulation of qi, and the movement of the body. Most qigong is a combination of either specific is static posture or physical movement coordinated with specific respiration and specific concentration or visualization. Therefore, we can say that qigong affects the flow of qi in the body, and specific mental-emotional states are evoked by and correspond to specific directions of qi flow. Thus it is easy to see that erroneous qigong can cause abnormal flows o f qi in the body which then causes an uncomfortable, even pathological mental-emotional state. In addition, if one disturbs the free flow o f the qi mechanism, for instance, by absorbing more qi than the body can freely diffuse and circulate or by accumulating and concentrating the qi in a certain area of the body, this may easily lead to qi stagnation. If this qi stagnation endures, depression may transform fire, and fire flaming upward may harass the heart spirit. Depressive heat may also damage and consume yin fluids, thus giving rise to ascendant hyperactivity of yang, vacuity heat, and/or internal stirring of wind. On another level, if one is too physically active, activity which is yang may also damage and consume yin fluids leading to yang hyperactivity and evil heat. While too much sitting and inactivity, as in Zen meditation, which is yin, may aggravate liver depression and even cause or aggravate both phlegm dampness and blood stasis. This is even more likely if such still sitting meditation is accompanied by unfulfilled desires, such as wanting to become a Buddha or an Immortal, or if there are excessive worries and anxieties. Especially if one leads the qi in the body upward or concentrates their mind on a point in the upper body, one can lead ministerial fire to counterflow upward. When this disease mechanism causes symptoms of heat harassing upward, it is sometimes referred to as "fire burning the Shaolin monastery." (The Shaolin monastery is the traditional home of Chan or Zen Buddhism, while shaolin literally means "little forest.)

The Chinese medical literature describes three main patterns of qigong disease. These are:
1. Qi stagnation & blood stasis pattern:
The main symptoms o f this pattern, of qigong disease are emotional instability, crying and laughing without constancy, paranoia, tension, visual hallucinations, delusional thoughts, chest and ribside fullness and oppression, headache, generalized body pain, a dark, stagnant facial complexion, a dark red tongue or possible static spots or macuIes on the tongue, dark purple, engorged sublingual veins, and a bowstring, choppy pulse.
Emotional impetuosity, difficulty staying still, emotional instability, crying and laughing without constancy, etc. are all symptoms indicating that the qi mechanism is disturbed and chaotic and has lost its control. The qi is commander of the blood, while the blood is the q mother of the qi. When the qi moves, the blood moves. Likewise, if the qi becomes chaotic, the blood becomes disquieted. Hence qi and blood lose their regulation and are unable to control themselves (i.e., one is unable to control oneself). Qi and blood depression and stagnation may obstruct the heart orifices, resulting in harassment of the heart spirit. Therefore, one may see emotional instability, crying and laughing without constancy, paranoia, tension, visual hallucinations, and delusional thoughts. Static blood obstructing and stagnating may cause qi stagnation of chest yang. In that case, one may see chest and rib-side fullness and oppression. Qi stagnation and blood stasis result in the channels and network vessels not being freeflowing. Hence there is headache, generalized body pain, a dark, stagnant facial complexion, a dark red tongue with possible static spots or macuIes, and a bowstring, choppy pulse.
2. Phlegm fire harassing above pattern:
The main symptoms of this pattern of qigong disease are emotional tension and agitation, impulsive movement, breaking things, mania, difficulty controlling oneself, profuse phlegm, chest oppression, a bitter taste in the mouth and bad breath, headache, red eyes, reddish urine, bound stools, a red tongue with thick/ slimy, yellow fur, and a bowstring, slippery, rapid pulse.
If there is habitual bodily yang exuberance (as there often is in young males) or addiction to alcohol and/or tobacco, or excessive eating of fatty, greasy, thick-flavored foods, phlegm dampness may congest and become exuberant. In that case, when one tries to practice qigong, one cannot obtain stillness but the qi mechanism becomes disturbed and chaotic instead. Then phlegm and fire become mixed and internally harass the heart spirit. This then causes emotional tension and agitation, impulsive movement, breaking and damaging things, and manic, chaotic behavior. lf the qi does not gather in the channels, it is difficult for it to control itself. This then leads to spontaneous sensations of qi discharging chaotically around the body and inability to control oneself. Phlegm turbidity internally obstructing with devitalization of chest yang results in
profuse phlegm and chest oppression, while phlegm fire ascending to harass the clear orifices results in the bitter taste in the mouth, bad breath, headache, and red eyes. The reddish urine, bound stools, red tongue with thick, slimy, yellow fur, and the bowstring, slippery, rapid pulse are all signs of phlegm fire and congested heat.

3.Yin vacuity-fire of effulgence pattern:
The main symptoms of this pattern of qigong disease are emotional depression, difficulty thinking, poor memory, mumbling and speaking to oneself, fright palpitations, generalized fear and dread, auditory and visual hallucinations, vexatious heat in the five hearts (meaning the heart and the centers of the hands and feet), a dry mouth and throat, insomnia, night sweats, a red tongue with scanty fur, and a fine, rapid or surging rapid pulse. If one is already habitually kidney yin depleted and vacuous (as are many thin people, women, and the elderly), doing too much or erroneous qigong may cause excessive psycho-emotional tension. In addition, compulsively chasing ones thoughts or a desire to emit qi or possess other such supranormal qigong abilities may cause one to exhaust oneself in one's practice. This exhausts and consumes the essence and blood.
If the essence and blood become insufficient, then the sea of marrow will lack nourishment. This then leads to difficulty thinking, dull-wittedness, and decreased memory power. Essence and blood depletion and vacuity leads to heart spirit lack of nourishment. Hence there is emotional depression, mumbling and speaking to oneself, fright palpita-tions, fear and dread. Yin vacuity leads to vacuity fire flaming upward. Therefore, one sees vexatious heat in the five hearts, a dry mouth and throat, insomnia, and night sweats. The red tongue with scanty fur and the fine, rapid, surging rapid pulse are signs of yin vacuity with internal heat.
What to do About Qigong Disease:
At the very first sign o f qigong disease, the practitioner should stop doing qigong or their practice should be immediately monitored, assessed, and modified by a competent teacher. If symptoms persist, both acupuncture and Chinese herbal medicine can be used to treat any of the above three patterns. Therefore, practitioners with qigong-induced symptoms which do not spontaneously go away when they stop practicing may want to see their local acupuncturist or professional practitioner of Chinese medicine. However, one of the foundations of Chinese medicine is to treat disease before it arises, and the best way to prevent qigong disease is to insure that the type of qigong you are practicing is right for you and that you are doing it correctly. When the right person practices the right kind of qigong in the right manner, then qigong can be a wonderful practice. When practiced wrongly, it can cause mental-emotional disease, hypertension, and heart disease and may lead to stroke. It's good to remember that, in Chinese medicine, health is seen as a matter of balance, and too much qi is just as unhealthy as too little.
Image may contain: text

Top of Form

Thursday, October 26, 2017

DBA Categories from Brent Ozar

Brent Ozar shared a post on the categories for a SQL Server DBA.
NOTE that these overlook things like BI or data scientist professionals, which are not usually considered part of the DBA span of work

The most interesting part, to me, was this chart:
(Credit -

I like the way he breaks this up to Database Developer, Development DBA, and Production DBA.
This seems to reflect the reality that I see in our own business as well as in some others.

Wednesday, October 04, 2017

MS SQL Server Max Memory Size for given Server Physical Memory

Glenn Berry, over at SQL Server Central, has written an excellent and straight-forward guide to initial settings for max memory in SQL Server, given the amount of memory available on the server.

Suggested Max Memory Settings for SQL Server 2005/2008

I would encourage you to visit his article for details, but here follows the crux of the matter:
Physical RAM                        MaxServerMem Setting
2GB                                           1500
4GB                                           3200
6GB                                           4800
8GB                                           6400
12GB                                         10000
16GB                                         13500
24GB                                         21500
32GB                                         29000
48GB                                         44000
64GB                                         60000
72GB                                         68000
96GB                                         92000
128GB                                       124000

Again, note that he goes on to give more advice on tuning with additional products, and how much memory should be available to the system when under max load. I would encourage you to check out the original article.

Friday, September 15, 2017

Creating Hash Values for Strings In MSSQL, DB2 UDB for LUW, and Oracle

It will often occur that we need to search a large character string in a relational database, something like an email address, postal address, etc.

For the most part, when we do such searches, we're searching for a sub-string within that large string of characters.

However, for instances where we know we need an equivalency search, we can make things more efficient by generating a hash of the string and then storing that in an indexed column.

This can be done in all 3 of the major RDBMS platforms.  Links below:

MSSQL uses the CHECKSUM() function.
DB2 LUW uses the DBMS_UTILITY.GET_HASH_VALUE() function.
Oracle uses the ORA_HASH function.

This article by Jeff Reinhard over at is what inspired me to look for the similar function in DB2 & Oracle, and it does a very nice job of explaining the use case for this using an e-mail address scenario.

If anyone knows how to do this in postgressql or MySQL, I'd love to have you add a few words or link in the comments. Thanks! :)

Wednesday, May 03, 2017

I had previous written very breifly about creating a report on disk space using WMI

A much better, and very concise instruction for querying disk information (including %free) can  be found here:
This could be easily adapted to be driven from a list of servers in a text file, in a query, or received from something like a net view command

Write-Host "Drive information for MY_Server"

Get-WmiObject -Class Win32_LogicalDisk -ComputerName MY_Server |
    Where-Object {$_.DriveType -ne 5} |
    Sort-Object -Property Name | 
    Select-Object Name, VolumeName, FileSystem, Description, VolumeDirty, `
        @{"Label"="DiskSize(GB)";"Expression"={"{0:N}" -f ($_.Size/1GB) -as [float]}}, `
        @{"Label"="FreeSpace(GB)";"Expression"={"{0:N}" -f ($_.FreeSpace/1GB) -as [float]}}, `
        @{"Label"="%Free";"Expression"={"{0:N}" -f ($_.FreeSpace/$_.Size*100) -as [float]}} |
    Format-Table -AutoSize

Drive information for MY_Server

Name VolumeName FileSystem Description             VolumeDirty DiskSize(GB) FreeSpace(GB) %Free
---- ---------- ---------- -----------             ----------- ------------ ------------- -----
A:                         3 1/2 Inch Floppy Drive                        0             0      
C:              NTFS       Local Fixed Disk        False               59.9          5.83 9.74 
D:   Programs   NTFS       Local Fixed Disk        False                200         18.03 9.02 
E:   Product_1  NTFS       Local Fixed Disk        False                250         99.57 39.83
F:   Product_2  NTFS       Local Fixed Disk        False                 20          7.02 35.09
R:   Product_3  MVFS       Network Connection                         78.13         48.83 62.5 

Tuesday, March 21, 2017

Minimally Logged Operations in SQL Server

I'm posting this mostly so I can find it later :)
The following article has a great table that defines when operations will be minimally logged.

Here's the table, just in case the link goes away at some point in the future:

Table Indexes

Rows in table Hints Without TF 610 With TF 610 Concurrent possible
Heap + Index
Depends (3)
Yes (2)
Yes (2)
Cluster + Index
Depends (3)
Yes (2)
Cluster + Index
Depends (3)

Sizing MSSQL Server DB's - Rules of Thumb

Microsoft Technet has published an article that includes some rules of thumb for sizing a SQL Server system. NOTE: These are for sharepoin...