Loading Web pages directly from SQL Server

  • I have an application that takes a URL and store it's contents for future Full-Text Search operations.

    I prefer to implement the contents retrieval directly from SQL Server.

    Can you advise me of the best practice for acheiving this, whether to load source code as text or to store the HTML file as binary data.

    Your advise please

    Thanks,

  • Nawar.Tabaa (3/24/2010)


    I prefer to implement the contents retrieval directly from SQL Server. Can you advise me of the best practice for acheiving this, whether to load source code as text or to store the HTML file as binary data.

    Are you talking about retrieving the data from websites using SQL Server or just using SQL Server for storage?

    How large do you expect each data item to be on average? If less than about 256KB, it might be best stored as NVARCHAR(MAX) or VARBINARY(MAX). If larger than 1MB, consider FILESTREAM.

    See FILESTREAM White Paper

  • Thanks Paul, apart from the storage is there any way to load HTML documents from the web like those exists for documents on local file system / network share?

    SELECT * FROM OPENROWSET(BULK N'F:\test.htm', SINGLE_BLOB)

    Thanks,

  • Nawar.Tabaa (3/24/2010)


    Thanks Paul, apart from the storage is there any way to load HTML documents from the web like those exists for documents on local file system / network share?

    SELECT * FROM OPENROWSET(BULK N'F:\test.htm', SINGLE_BLOB)

    Thanks,

    Yes, but my view is that this task has nothing to do with SQL Server and is better done in an external application.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply