Wednesday, March 28, 2012
How to transfer binary data from Server side to the client side through ASP Page ?
I am designing a 4-tier application. It is like this.
Client - Business Logic Client Side (UI Validation) - ASP Page - Business
Logic Server Side (Database related) - SQL server database.
In this scenario, As of now I am passing a XML string from Server side
(Using ADO 2.6) to the client side through ASP. But I believe, compared to
transfer of huge XML strings from the server side to the client side,
transfer of binary data would be fast.
Can any one tell me, how to transfer binary data from Server side to the
client side through ASP Page ?
Thanks and Regards,
Peri
"Peri" <lperi@.CSPL.com> wrote in message
news:u4SyKPxPEHA.3220@.TK2MSFTNGP09.phx.gbl...
[snip]
> Can any one tell me, how to transfer binary data from Server side to the
> client side through ASP Page ?
You would need to figure out what the binary data would look like and how to
transfer it. That is the beauty of XML, you don't have to do either (but you
do pay the package tax).
Bryant
How to transfer backup from client to server machine (MSSQL, SQL Server)
I succeeded in transferring a backup file from the SQL Server machine
to the client using OPENROWSET.
I used this way because it is not (always easy) possible to restore a
file residing on the client machine on a SQL Server.
One has to share drives on the client machine for remote SQL Server
access or better granting access on the SQL Server machine for the
client.
In my line of bussiness it is not possible to help every client on this
issue (several thousand users)
What I need to achieve is transferring backup to the server by using
SQL Server to do it and restoring it with SQL Server.
A solution for SQL 2005 would be perfect (it is not necessary to solve
this in SQL Server 2000). Using Named pipes is not an option because it
is no longer supported in SQL2005
Hi
"Oz" wrote:
> MSSQL, Microsoft SQL Server:
> I succeeded in transferring a backup file from the SQL Server machine
> to the client using OPENROWSET.
I am not sure why you are doing this, if you are actually talking about a
database backup. I assume this is a CSV or XML file? If so why not use the
BULK INSERT command? This will take a UNC name for the file if necessary.
> I used this way because it is not (always easy) possible to restore a
> file residing on the client machine on a SQL Server.
> One has to share drives on the client machine for remote SQL Server
> access or better granting access on the SQL Server machine for the
> client.
> In my line of bussiness it is not possible to help every client on this
> issue (several thousand users)
> What I need to achieve is transferring backup to the server by using
> SQL Server to do it and restoring it with SQL Server.
Have you looked at SSIS and loading the file using FTP either through a
package or User Interface (e.g
http://classicasp.aspfaq.com/general/how-do-i-ftp-files-from-asp.html ) onto
the SQL Server or somewhere which can be seen by the SQL Server and then
loading it from a package?
> A solution for SQL 2005 would be perfect (it is not necessary to solve
> this in SQL Server 2000). Using Named pipes is not an option because it
> is no longer supported in SQL2005
>
John
Monday, March 26, 2012
How to trace SQL
I'm trying to debug a vendor package and would like to turn on JDBC trace (either client or server side). The only information I found is DBCC TRACE which seems not very useful (I even don't know where the trace result located). Any help is appreciated!
Env: Windows Server 2003 & SQL Server 2000 8.00.818.
Jeff Liperhaps you could use the profiler and run it on the server to see what/when sql-commands are given?|||Unfortunately, the profile won't give me enough information for why a function (xa_open) failed.
thanks,
Jeff Li|||Open a DSN trace on the client?
-PatP|||Hi, Pat:
How can I open the DSN trace on a client?
thanks,
Jeff|||When creating an ODBC DSN, the last dialog page (with the Finish button) usually has the log file information on it.
You can also do it using a connection string or dynamcially using SQLSetConnectAttr, but I don't remember the parameter names for either of them.
-PatP
Friday, March 23, 2012
How to terminate the client connections manually?
Hi guys,
You know when restoring a database in SQL Server, exclusive access is required. With sp_who I can see the clients. But I don't know how to terminate the client connections easily. Usually I have to stop the server and restart it. I DO think it's too troublesome. Do you have any ideas? Is there any sp or command, or tool that may help? How do you deal with this issue?
Thanks!
Have a look at the kill command.|||Refer to Books Online, Topic: KILL StatementMonday, March 19, 2012
how to target the file name with date variable
My client will upload a file to a FTP folder regularly, but the time patten is unknown, only thing i know is he'll use today's date as the file name. for example, he uploaded a file 'wk070705_id.txt' today, but i don't know when the next file will be uploaded. so how can i write a package like, eveytime when he upload a new file (for example if he upload a file 'wk070708_id.txt'), i can import the data into my table? i am a very newbie of SSIS, it would be perfect if i can get a full script for this. thanks in advance with appreciation!
ps: the date in file name is yymmdd
One way i can think of is to make use of gateway service to poll that directory and as soon as file arrives, parse the file name and load the corresponding package.|||If you have normal file system access to the folder then you can use this task -http://www.sqlis.com/23.aspx
If you only have FTP access then polling is the way to go. You can request the file, but nee dto make the parameter dynamic based on todays date, for which you can use a property expression. Have a look in Books Online for the references to property expressions in SSIS they are what make it flexible and dynamic.
Some example date expressions - http://wiki.sqlis.com/default.aspx/SQLISWiki/ExpressionDateFunctions.html