Feb 23, 2010 #1 Peager Programmer May 27, 2003 140 US How can you test to see if a file exists before you run a file operation on it?
Feb 25, 2010 1 #2 mrdenny Programmer May 27, 2002 11,595 You can use the xp_fileexist system stored procedure. Denny MVP MCSA (2003) / MCDBA (SQL 2000) MCTS (SQL 2005 / SQL 2005 BI / SQL 2008 DBA / SQL 2008 DBD / SQL 2008 BI / MWSS 3.0: Configuration / MOSS 2007: Configuration) MCITP (SQL 2005 DBA / SQL 2008 DBA / SQL 2005 DBD / SQL 2008 DBD / SQL 2005 BI / SQL 2008 BI) My Blog Upvote 0 Downvote
You can use the xp_fileexist system stored procedure. Denny MVP MCSA (2003) / MCDBA (SQL 2000) MCTS (SQL 2005 / SQL 2005 BI / SQL 2008 DBA / SQL 2008 DBD / SQL 2008 BI / MWSS 3.0: Configuration / MOSS 2007: Configuration) MCITP (SQL 2005 DBA / SQL 2008 DBA / SQL 2005 DBD / SQL 2008 DBD / SQL 2005 BI / SQL 2008 BI) My Blog
Feb 25, 2010 Thread starter #3 Peager Programmer May 27, 2003 140 US Is the procedure documented? I don't see it listed witht he other xp_ stuff in SQL help. Upvote 0 Downvote
Feb 27, 2010 #4 mrdenny Programmer May 27, 2002 11,595 No it is an undocumented system stored procedure. I documented it in this article. http://searchsqlserver.techtarget.com/tip/0,289483,sid87_gci1270919_mem1,00.html Denny MVP MCSA (2003) / MCDBA (SQL 2000) MCTS (SQL 2005 / SQL 2005 BI / SQL 2008 DBA / SQL 2008 DBD / SQL 2008 BI / MWSS 3.0: Configuration / MOSS 2007: Configuration) MCITP (SQL 2005 DBA / SQL 2008 DBA / SQL 2005 DBD / SQL 2008 DBD / SQL 2005 BI / SQL 2008 BI) My Blog Upvote 0 Downvote
No it is an undocumented system stored procedure. I documented it in this article. http://searchsqlserver.techtarget.com/tip/0,289483,sid87_gci1270919_mem1,00.html Denny MVP MCSA (2003) / MCDBA (SQL 2000) MCTS (SQL 2005 / SQL 2005 BI / SQL 2008 DBA / SQL 2008 DBD / SQL 2008 BI / MWSS 3.0: Configuration / MOSS 2007: Configuration) MCITP (SQL 2005 DBA / SQL 2008 DBA / SQL 2005 DBD / SQL 2008 DBD / SQL 2005 BI / SQL 2008 BI) My Blog
Mar 1, 2010 Thread starter #5 Peager Programmer May 27, 2003 140 US Denny, Thanks a bunch.... Great article. Paul Upvote 0 Downvote
Mar 3, 2010 #6 mrdenny Programmer May 27, 2002 11,595 No problem. Thanks. Denny MVP MCSA (2003) / MCDBA (SQL 2000) MCTS (SQL 2005 / SQL 2005 BI / SQL 2008 DBA / SQL 2008 DBD / SQL 2008 BI / MWSS 3.0: Configuration / MOSS 2007: Configuration) MCITP (SQL 2005 DBA / SQL 2008 DBA / SQL 2005 DBD / SQL 2008 DBD / SQL 2005 BI / SQL 2008 BI) My Blog Upvote 0 Downvote
No problem. Thanks. Denny MVP MCSA (2003) / MCDBA (SQL 2000) MCTS (SQL 2005 / SQL 2005 BI / SQL 2008 DBA / SQL 2008 DBD / SQL 2008 BI / MWSS 3.0: Configuration / MOSS 2007: Configuration) MCITP (SQL 2005 DBA / SQL 2008 DBA / SQL 2005 DBD / SQL 2008 DBD / SQL 2005 BI / SQL 2008 BI) My Blog