Search an MS-SQL database for a specific named column

Need to find a column in a database? The following SQL will return the tables, and columns, that contain a wildcard value

SELECT c.name AS ColumnName,
       t.name AS TableName
FROM sys.columns c
JOIN sys.tables t
 ON c.object_id = t.object_id
WHERE c.name LIKE '%column_name%'
ORDER BY TableName,
         ColumnName;
Advertisements

Windows PC not auto-booting?

Since I installed the “Windows 10 Fall Creators Update”, build 16299, the desktop has stopped auto-starting, to it’s BIOS configured schedule. It’s scheduled for a 5:01am start, but every morning I’ve come into the room, since the update, it’s sitting there switched off.

A couple of Google’s later and here’s the answer, well I hope it is as I haven’t verified it yet, something for tomorrow morning. So the suggestion is to disable Windows “fast startup” mode, details on doing that can be found over at TechAdvisor.co.uk, and a more detailed explaination of why is at HowToGeek.com.

29th October 2017: Seems to have resolved the issue.

Setting update proxy in Notepad++

Having problems setting, and retaining, the Updater Proxy in the Notepad++ UI?

Then resort to the command line. Open a cmd prompt, with administrator privileges.
At the prompt go to the Notepad++ updater directory, the following works for default installations:

cd C:\Program Files (x86)\Notepad++\updater

From here run this command:

gup -options

This brings up the same dialog as the UI but this time the values you enter will be saved.

gup-options

 

Repairing Windows

Just some random jottings on tools to repair Windows, release 10 and maybe 7 and 8 as well.

DISM (Deployment Image Servicing and Management)

Some of the options for this tool are not available depending on Windows version (Enterprise, Professional or Home) and also release.

Sample commands

  • DISM.exe /Online /cleanup-image /scanhealth
  • DISM.exe /Online /Cleanup-image /Restorehealth

SFC (System File Checker)

Tries to repair any file corruption in Windows files.

  • sfc /scannow
  • sfc /verifyonly