Reading text files in a query.

Occassionly with SQL 2008 jobs, I find I cannot open the job-step output file. A possible solution is to use xp_cmdshell, for example

exec xp_cmdshell ‘type “C:MSSQL.1MSSQLLOGCheck Backups.txt”‘

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s