Various news-groups and web-sites exist (such as (i.e. http://www.sql-server- performance.com/ac_extended_stored_procedures.asp) which document the Microsoft undocumented stored procedures. With regard to these undocumented stored procedures can I legally use them in my programs?
The reason I require to know this is that I am currently implementing a SQL Server backup tool and part of it functionality requires that the clients can navigate the directories and files on the server. To achieve this latter functionality the Microsoft undocumented stored procedures xp_subdirs and xp_fileexist could be used.
I am wary of using anything undocumented as Undocumented usually = unsupported = in trouble if it goes wrong.
Rather like using the system tables. They belong to MS and are subject to change at their discretion.
--
Allan Mitchell (Microsoft SQL Server MVP) MCSE,MCDBA www.SQLDTS.com I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org
"David Selwood" <Da...@Selwood.name> wrote in message
> Various news-groups and web-sites exist (such as (i.e. > http://www.sql-server- > performance.com/ac_extended_stored_procedures.asp) which > document the Microsoft undocumented stored procedures. > With regard to these undocumented stored procedures can I > legally use them in my programs?
> The reason I require to know this is that I am currently > implementing a SQL Server backup tool and part of it > functionality requires that the clients can navigate the > directories and files on the server. To achieve this > latter functionality the Microsoft undocumented stored > procedures xp_subdirs and xp_fileexist could be used.
AKAIK there is nothing stopping you from using them legally but any time you use an undocumented sp, command etc. you run the risk of shooting yourself in the foot. Being that they are undocumented they can change or disappear with any upgrade or even service pack and are not guaranteed to even work as expected in the first place. If this was for your own utility it might not be such a big deal but if you put it into production or another product you run a risk of not working in the future. The 2 you mentioned have been around for a while but again there is no guarantee.
-- Andrew J. Kelly SQL Server MVP
"David Selwood" <Da...@Selwood.name> wrote in message
> Various news-groups and web-sites exist (such as (i.e. > http://www.sql-server- > performance.com/ac_extended_stored_procedures.asp) which > document the Microsoft undocumented stored procedures. > With regard to these undocumented stored procedures can I > legally use them in my programs?
> The reason I require to know this is that I am currently > implementing a SQL Server backup tool and part of it > functionality requires that the clients can navigate the > directories and files on the server. To achieve this > latter functionality the Microsoft undocumented stored > procedures xp_subdirs and xp_fileexist could be used.
> With regard to these undocumented stored procedures can I > legally use them in my programs?
Yes, but in addition to Allan's comments about being unsupported, this can land you in hot water if functionality is changed or removed entirely, which is a known caveat with undocumented procedures / functions. So you can use them in your programs if you really want to, but be prepared to change the code and re-distribute if the functionality changes or is disabled in a future service pack or version of SQL Server. If you can, it is preferable to use other methods. Directory traversing and checking for the existence of a file, for example, can be achieved using a VBS, VB, etc. program and doesn't need to be handled exclusively by XPs. Especially at the risk of having to fall back to one of these methods after you use the XP and its functionality changes, after you've deployed your app etc.
Thanks for your response with regard to the undocumented stored procedures, what I'm however for is looking for clarification from Microsoft via my MSDN license. I really require an answer from Microsoft since I do not want Microsoft to sue me and claim that I have been reverse engineering their code, even though these undocumented stored procedures are listed on various web-sites.
Hopefully I shall get some positive feed back from Microsoft soon.
>-----Original Message----- >Various news-groups and web-sites exist (such as (i.e. >http://www.sql-server- >performance.com/ac_extended_stored_procedures.asp) which >document the Microsoft undocumented stored procedures. >With regard to these undocumented stored procedures can I >legally use them in my programs?
>The reason I require to know this is that I am currently >implementing a SQL Server backup tool and part of it >functionality requires that the clients can navigate the >directories and files on the server. To achieve this >latter functionality the Microsoft undocumented stored >procedures xp_subdirs and xp_fileexist could be used.
If you will not trust all the SQL Server MVPs on this, and you need an absolute answer from Microsoft in order to be comfortable, these public newsgroups are NOT the place to get that answer. Although occasionally, people from MS SQL Server support, and even some SQL Server dev team members, show up here, their responses are not the Official Microsoft Answer. You would have to have your legal department contact Microsoft's legal department if you are this paranoid.
> Thanks for your response with regard to the undocumented > stored procedures, what I'm however for is looking for > clarification from Microsoft via my MSDN license. I really > require an answer from Microsoft since I do not want > Microsoft to sue me and claim that I have been reverse > engineering their code, even though these undocumented > stored procedures are listed on various web-sites.
> Hopefully I shall get some positive feed back from > Microsoft soon.
> Cheers
> David Selwood.
> >-----Original Message----- > >Various news-groups and web-sites exist (such as (i.e. > >http://www.sql-server- > >performance.com/ac_extended_stored_procedures.asp) which > >document the Microsoft undocumented stored procedures. > >With regard to these undocumented stored procedures can I > >legally use them in my programs?
> >The reason I require to know this is that I am currently > >implementing a SQL Server backup tool and part of it > >functionality requires that the clients can navigate the > >directories and files on the server. To achieve this > >latter functionality the Microsoft undocumented stored > >procedures xp_subdirs and xp_fileexist could be used.
The best I can do is point you to the CD's eula.txt, and say that my skills are technical (not legal). I can also confirm that we have had customers call us after we 'suddenly' changed an undocumented xproc. When such cases are opened, our response is invariably "Yes - we confirm that we changed that undocumented xproc. No - we will not revert the code back to its old behavior, in part because its old behavior is undefined and in part because it was written for our needs (and not yours <g>). Should your needs differ; you should write your own xproc. For example, you can very easily use FSO (File System Object) to perform the identical tasks of those xprocs (plus, you will gain additional functionality)."
Technically, I believe it is important that you very wisely avoid using undocumented commands in any shipping code (and I think the able respondents to your post have made this very clear <g>). Otherwise, you should expect such code to fail.
Finally, keep in mind that your customers can call Microsoft, and thus *your* customers can *also* hear what I quoted above. My experience has been that some of these customers (after hearing the above) will subsequently refuse to use/purchase their now-former RDBMS vendor's product. IOW, I believe that the use of undocumented xprocs can expose your company to financial risk via a loss of a reputation for producing solid stable code <g>.
I cannot speak for the legality of using undocumented features in your code, if you need a definitive answer on that you should contact Microsoft's legal department.
While the SQL Server documentation does not explicitly give a policy regarding the use of undocumented features, I have been warning customers not to use them in applications. Undocumented features are not intended for general use, and are not tested to the same extent as the features covered in the SQL Server product documentation. The general use of these features is not supported by Microsoft Product Support Services, and I do not recommend using unsupported features in production systems.
Also, these features are intended for use only by a small set of code owned by Microsoft. This means that Microsoft can change the functionality from release to release without impacting customers. All that Microsoft has to do is to make sure all Microsoft code using the features is updated. This means that you cannot assume the same level of backward compatibility for these undocumented features as you can for documented features.
The following topic in the SQL Server 2000 Books Online does have a warning about undocumented system stored procedures not being supported (at the bottom of the topic):