| Author |
Topic  |
|
tkizer
Almighty SQL Goddess
USA
35007 Posts |
Posted - 08/20/2003 : 16:39:43
|
You need to put the path in double quotes or use the 8.2 format. If Program Files is the only directory that is named like that, then use progra~1 instead of Program Files. Microsoft SQL Server, you might need to use micros~1 or micros~2, just depends on how many directories you have that start with micros.
Here's an example:
xp_cmdshell 'dir "c:\program files\"'
And another example:
xp_cmdshell 'dir c:\progra~1\'
Tara |
Edited by - tkizer on 08/20/2003 16:40:28 |
 |
|
|
hwdev
Starting Member
17 Posts |
Posted - 08/25/2003 : 11:09:22
|
| Could you tell me if textcopy can be written to memory instead of to a File? I was told the IO of writing to a file on a large scale could have a negative impact. |
 |
|
|
hwdev
Starting Member
17 Posts |
Posted - 08/25/2003 : 13:15:51
|
| Can textcopy save the output to memory opposed to a file? I have been told that save to a file on a large scale might create an IO nightmare. Any thoughts. |
 |
|
|
tkizer
Almighty SQL Goddess
USA
35007 Posts |
Posted - 08/25/2003 : 13:21:28
|
Run textcopy /? to see what options are available. It looks like you can only save it to a file.
Tara |
 |
|
|
robvolk
Most Valuable Yak
USA
15557 Posts |
Posted - 08/25/2003 : 19:47:18
|
| It's not going to do you any good to write it to memory, and textcopy's I/O performance is probably as efficient as you can get. Certainly faster than any ADO Stream object would be. |
 |
|
|
hwdev
Starting Member
17 Posts |
Posted - 08/26/2003 : 13:18:14
|
I created a Stored Procedure and setup 'textcopy' where I could pass in all the variables if needed and it works GREAT! Next question, is there any XML DOM experts that can tell me whether I can parse the output from the 'textcopy' inside of my Stored Procedure? Or do I need to write an ASP, call the SP to create the XML file from 'textcopy', return to the ASP and referenece the Sql Server XML file and place the XML DOM code inside a JavaScript function? I am not sure where the Document Object Model (DOM) code has to go.
Thank You |
 |
|
|
jlo
Starting Member
2 Posts |
Posted - 09/26/2003 : 10:28:18
|
Hi hwdev - I am dealing with the same issue with a vendor storing everything in a blob, your posts have been of a great help - I've been able to export a file from sql in xml but have to admit I am at a loss at how to get it to display on my asp page. The xml output is in base64 and I'd like to convert it to text ultimately. If you have any ideas???? Thanks tons!
quote: Originally posted by hwdev
I created a Stored Procedure and setup 'textcopy' where I could pass in all the variables if needed and it works GREAT! Next question, is there any XML DOM experts that can tell me whether I can parse the output from the 'textcopy' inside of my Stored Procedure? Or do I need to write an ASP, call the SP to create the XML file from 'textcopy', return to the ASP and referenece the Sql Server XML file and place the XML DOM code inside a JavaScript function? I am not sure where the Document Object Model (DOM) code has to go.
Thank You
|
Edited by - jlo on 09/26/2003 16:53:40 |
 |
|
|
twiglet1975
Starting Member
United Kingdom
1 Posts |
Posted - 11/04/2004 : 07:13:59
|
Interesting article. Worth noting that using ADO.NET and XML Web Services makes it very easy to insert and retrive BLOBs.
I would disagree with the blanket statement that one shouldn't store BLOBs/images in the database and should instead link to them. This is a bad idea for any enterprise class system (i.e. used by more than 2 users!). Why? Here's a few reasons:
1. Things get moved - links go dead. So you have a superbly reliable RDBMS but your data gets buggered because you're storing stuff outside of the database.
2. No security. I have enough hassle just setting up permissions on SQL Server objects and my web services without having to set folder permissions as well.
3. Image capture and transactions- I run a school database that has photos of pupils on. My front end allows images to be captured from the pupil form via a video/web cam straight into the pupil form. If anything goes wrong when the form saves then the transaction is rolled back and nothing gets changed. Try doing that without storing images in the database - it's a lot more difficult/impossible!
4. Audit - nuff said!
SQL Server's BLOB handling is superb and it seems a waste not to use it. Admittedly it becomes a problem when storing larger objects (my images are all restricted to a max 100kb size so it's not an issue) but then there are architectural decisions that you have to make. I also have a document management system that stores Word files as BLOBs and it just wouldn't work properly if I hyperlinked to them.
A very good example of what you can do with SQL Server and BLOBs can be found on the Terra Server website(http://terraserver.microsoft.com/) which Microsoft use as a technology demo for BLOB handling. |
 |
|
|
robvolk
Most Valuable Yak
USA
15557 Posts |
Posted - 11/04/2004 : 08:47:39
|
| Just out of curiosity, why does everyone who derides the blanket statement "don't store images in the database" always respond with the blanket statement "TerraServer does it, so it's good"? |
 |
|
|
amachanic
SQL Server MVP
USA
169 Posts |
Posted - 11/09/2004 : 17:10:15
|
| An excellent example of storing BLOBs in a DBMS (though not SQL Server) is from a friend of mine, who worked for a cable company that does on-demand movies. They store encoded versions of the entire films in an Oracle database and stream them from there. Apparently they can get much higher concurrency that way than storing them in a file system. I haven't run extensive tests on SQL Server's LOB capabilities under heavy load, so I'm not sure how it would stand up to a similar scheme. |
 |
|
Topic  |
|