During the Sui dynasty
After Dou Rongding died in 586, Dou Kang inherited the title of Duke of Chen. He was then made the governor of Liang Province (梁州, roughly modern Hanzhong, Shaanxi). Before his departing the capital Chang'an to report to Liang Province, Emperor Wen personally visited Dou Kang and Princess Ancheng. Later, when Princess Ancheng died, Dou Kang was said to be in much distress in mourning that he fainted several times, and Emperor Wen sent his servants to comfort Dou Kang. Thereafter, Emperor Wen recalled him to governmental service as the governor of Qi Province (岐州, roughly modern Baoji, Shaanxi), and then as the commandant at Youzhou (modern Beijing, Tianjin and northern Hebei). Dou developed a reputation for being generous and merciful, during these terms of service.
In 604, Emperor Wen died—a death that traditional historians generally believe to be a murder ordered by his son and crown prince Yang Guang, although they admitted a lack of direct evidence. Yang Guang took the throne as Emperor Yang. Immediately thereafter, another son of Emperor Wen, Yang Liang the Prince of Han, rebelled against Emperor Yang at Bing Province (并州, roughly modern Taiyuan, Shanxi). Emperor Yang, for reasons not stated in historical accounts, suspected Dou of collaborating with Yang Liang and sent the general Li Zixiong (李子雄) rushing to You Province to arrest Dou and replace him. Li subsequently alleged that Dou had received letters from Yang Liang urging him to join the rebellion but had not reported them to Emperor Yang. However, after an investigation, Emperor Yang concluded that there was a lack of evidence that Dou collaborated with Yang Liang, but nevertheless removed him from governmental service and further stripped him of the title of Duke of Chen, bestowing that title on his younger brother Dou Qing (竇慶) instead.
Dou Kang was friendly with another general, Li Yuan the Duke of Tang, the husband of a cousin of his. During the rebellion of the general Yang Xuangan in 613, when Li Yuan was commissioned with an army, it was said that Dou told Li,
Is it not that Yang Xuangan is providing you with an opportunity? The prophecies refer to the Li clan as the originator of the next emperor, and you can use this opportunity. This is a divine revelation.
Li responded, "I will not be the start of a rebellion. Why do you speak in such daring terms?" Nevertheless, he kept Dou's suggestion in mind.
Toward the end of Emperor Yang's reign, Dou was commissioned with an army at Lingwu to secure the northern border. After Li Yuan rebelled against Emperor Yang in 617 and subsequently captured Chang'an, declaring Emperor Yang's grandson Yang You the Prince of Dai emperor (as Emperor Gong), Dou submitted to him in spring 618, along with the several commanderies he controlled in the region.