Showing posts with label aspx. Show all posts
Showing posts with label aspx. Show all posts

Monday, March 26, 2012

Executing DTS packages in 64 bit SSIS

Hello Everyone,

I am going through the following article

http://msdn2.microsoft.com/en-us/library/ms141766.aspx

and I have some clarifications to seek.

Based on the above article it seems its possible to run a DTS package on a SQL 2006 X64 machine.

Furthermore it seems possible that this package will run without any upgrade being performed to SSIS.

Also, to execute the DTS package in 32 bit mode, all I have to do is to set the job step type of SQL Agent to Operating system, and enter a command line or use a batch file that invokes the 32-bit version of dtexec.exe. You can use the dtexecui.exe utility to create the command line, and then copy and paste the command line into the job step.

Are the above deductions correct? Please let me know if some correction / refinement is needed.

There is no 64-bit design-time or run-time support for DTS packages.

You can run DTS packages (SQL Server 2000), as well as SSIS packages (SQL Server 2005), on the same 32-bit machine. You can use the dtsrun.exe utility to run the DTS packages from the command prompt. You also have the option of running a DTS package from a SSIS package (SQL Server 2005) by adding the Execute DTS 2000 Package task to the SSIS package.

For more information about SQL Server 2005 support for DTS packages, see "SQL Server 2005 Integration Services Backward Compatibility" at http://msdn2.microsoft.com/en-us/library/ms143706.aspx#runtime_installing.

Monday, March 19, 2012

Execute xp_cmdshell from store procedure (called from aspx)

Hi, I have been searching for an answer to allow me to execute xp_cmdshell from withing store prcedure by calling the store procedure from an aspx via click on a button. This is what I found from my reserch but was not able to know where to set the rights and what each of them means:
"To run xp_cmdshell for a non-system administrator user, you must grant the following rights.
MSSQLServer and SQLServerAgent Services
Act as part of the Operating System.
Increase Quotas.
Replace a process level token.
Log on as a batch job."

The above quote was from the following link:
http://support.microsoft.com/default.aspx?scid=kb;en-us;264155

The bottom line is to be able to call a store procedure from an aspx page to execute the code which contain xp_cmdshell command, an example of such command is like:
------------------
EXEC master..xp_cmdshell 'dir d:\BT_import\Data\sales_option_price_report.csv'

Thanks for your help
ehx5The "rights" refer to the user account that is running the extended stored proc, namely the user account for teh MSSQLServer service and the SQLServerAgent service. Once you know who they are you can go to the security policy editor and grant them the said rights. However, this is *VERY* dangerous and I really would recommend that you do NOT take this path. If someone gets onto to DB the xp_xmdShell 'Format c'. You get the idea. Much, much better to let some Business logic component sort this out, or even your own extended proc.

Monday, March 12, 2012

Execute SSIS project from ASP.NET page

Can you execute a SSIS project from an ASPX page? Or do you have to wrap it into a SQL job and run that?

Does anybody have a code snippet to do this?

Well, you can, but it is rarely a good idea for at least two reasons:

you are sharing address space and threads with IIS, so the scalability of this solution is limited