Home arrow SQL Server arrow SQL Sever: Storing Code in Binary or Text Files Rather than Stored Procedures
SQL SERVER

SQL Sever: Storing Code in Binary or Text Files Rather than Stored Procedures


Learn how to extend SQL Server's capabilities by making use of binary and text files, to execute SQL queries, in place of Stored Procedures.

Author Info:
By: Raghavendra Narayana
Rating: 4 stars4 stars4 stars4 stars4 stars / 33
October 21, 2003
TABLE OF CONTENTS:
  1. · SQL Sever: Storing Code in Binary or Text Files Rather than Stored Procedures
  2. · Case 1: .INI File
  3. · Case 2: SQL Query
  4. · Case 3: Complete Stored Procedure in a Binary File
  5. · Conclusion

print this article
SEARCH DEVARTICLES

SQL Sever: Storing Code in Binary or Text Files Rather than Stored Procedures
(Page 1 of 5 )

The base idea of this article is to extend the boundary of SQL Server.  The code of a Stored Procedure or User Defined Function need not to reside only in SP/UDF; you can have the code or a part of the code in ASCII/Binary/Other file format and stored under a specific server/folder.  This concept is useful while introducing .INI file concept in SQL Server.  Plus, you can avoid re-compilation of Stored Procedures on every minor change.  To some extent this concept also introduces code security and non-sharing of business logics.

Advantages

  • For security purposes:
    • Store the “Query/Part of query/Stored Procedure” in a Text/Binary/other file format.  Read it through “Bulk Insert” command or through any other feature of SQL SERVER for execution.
    • Include an encryption/decryption algorithm to store/retrieve the complete/part of code for execution from a Text or other file format.
  • Reduce the creation/usage of GUIs if the input data is minimal. You can even come out with some innovative approaches by making use of “Replaceable Parameter in batch files” ( a DOS concept).
  • Access/Leverage can be given to users who have SQL Query knowledge.
  • Reduce the Developer/DBA work/involvement in certain specific tasks where business ideas cannot be shared with the Development team.

Let us explore the cases where we can make use of this concept.  Case 1 and 2 explained here are expectable project requirements.  However, case 3 can be thought about in terms of security.


blog comments powered by Disqus
SQL SERVER ARTICLES

- Executing SQL Server Stored Procedure from P...
- How to Search for Date and Time Values Using...
- Replication: SQL Server 2000 - Part 2
- Replication: SQL Server 2000 - Part 1
- SQL Sever: Storing Code in Binary or Text Fi...
- Execute SQL on Multiple Tables/Columns - New...
- How to Connect to a SQL Server from Visual F...
- SQL Server Hardware Tuning and Performance M...
- Primary Key on Multiple Tables – New RDBMS C...
- Migrating from Sybase to SQL Server
- What's Best for DBAs? GUI or T-SQL Comma...
- How to Perform a SQL Server Performance Audit
- An Introduction To The Bulk Copy Utility
- SQL Server Stored Procedures 101
- Building Your First SQL Server 2000 Database

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials