Database Journal
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Links Database Forum

» Database Journal Home
» Database Articles
» Database Tutorials
MS SQL
Oracle
DB2
MS Access
MySQL
» RESOURCES
Database Tools
SQL Scripts & Samples
Links
» Database Forum
» Sitemap
Free Newsletters:
DatabaseDaily  
News Via RSS Feed


follow us on Twitter
Database Journal |DBA Support |SQLCourse |SQLCourse2
 

Featured Database Articles

SQL Scripts & Samples

Posted Aug 2, 2002

Append File Script

By DatabaseJournal.com Staff

This simple script from Ramunas Balukonis is useful when you need to log in to a file from SQL server. The script opens a file and adds user-specified information to that file.

Usage: dbo.append_log (@file_name VARCHAR(255) /* file2appaned*/, @msg VARCHAR(8000) /* msg2log */)

You need to set permission on master..OACreate, master..OADestroy, master..GetErrorInfo, master..sp_OAMethod xps to user, wich will execute this sp. Also you need to set write permissions on file @file_name, to the account under which SQL Server is running. Also, the "Scripting.FileSystemObject" object should be installed on the server.

Download the Script




SQL Scripts & Samples Archives

Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 




Latest Forum Threads
SQL Scripts & Samples Forum
Topic By Replies Updated
sql help!! add 1 August 22nd, 11:58 AM
How To Combine These 2 Queries into 1 Query ? tarek_land 1 June 7th, 08:37 AM
solving query svibuk 1 February 3rd, 06:08 AM
converting from a character string to uniqueidentifier saturnius 4 January 4th, 05:56 AM


















Thanks for your registration, follow us on our social networks to keep up-to-date