Showing posts with label app. Show all posts
Showing posts with label app. Show all posts

Friday, March 30, 2012

Long time SSIS package loading

I load SSIS package using following code:

Application app = new Application();
Package pac = app.LoadFromSqlServer(packageName, serverName, null, null, null);

For simple package containing 2 tasks this code executes about 20 seconds.
If I load old version (SQL2K) package from SQL2000 then it takes 5 seconds.

Is any way to increase loading speed for SSIS packages?

Do you have SSIS service running? The service caches SSIS component information; in the absense of the service it may take long time (although it is usually 2-3 seconds on reasonable hardware) to enumerate them when loading the package.|||

Thank you Michael.
I carry out additional experiments with realworld package (contains 11 tasks) at another computer.
When I start this experiment I have to wait 1.5 minutes to load package every time. Then I examine if SSIS running. I discover SSIS don't running after SP1 was applied (widely known SP1 bug). I installed post SP1 cumulative hotfixes and continue investigation. Now package loading first time during 30 seconds. When I start it second time it takes about 2 seconds. This is good result. But is there ability to increase loading speed at first time? Will be loading perfomance improved if such delay caused internal implementation of SSIS?

|||Much of the time on the initial load of the package is due to validation of the metadata of each of your tasks. In order to speed of the initial load, you could change the DelayValidation property of your package and all tasks to true. However, that's not really best practices.|||

Thank you Martin
This helps.

BTW, BOL says:
"Validating the package before it runs is a way of finding some errors before execution starts. However, it processes the package to find errors, and if no errors are found, the package runs. Because this goes through the package two times, validating a package increases the amount of processing for the package, so should be used only when necessary."

|||

Alexey Rokhin wrote:

... I discover SSIS don't running after SP1 was applied (widely known SP1 bug). I installed post SP1 cumulative hotfixes and continue investigation. Now package loading first time during 30 seconds...

The bug you quote is described in http://support.microsoft.com/kb/918644. While the hotfix fixes the service startup failure, it can't fix the cause of the problem - long time to start the service due to network configuration that timeouts requests to CRL. So the service still takes 30+ seconds to start (which caused to fail before the hotfix, this later part is now fixed).

To avoid this 30+ delay you should either change the SSIS service to autostart (thus moving the delay to the computer boot time), or better fix the network configuration as described in the KB (although it might be very specific to your environment) to either allow access to CRL, or to quickly fail and return failure status to an application accessing CRL.

|||

Thank you, Michael.
In production environment SSIS service will autostart.

|||

Alexey,

IMHO, a good practice is defining a Events class and so, debugging the code and so you'll find issues faster, i.e with F11...

pkg = app.LoadFromSqlServer(ObjSSIS.sRutaDts & "\" & ObjSSIS.sSSISName, ObjSSIS.sServer, "usrSSIS", "ninot", EventsSSIS)

Public Class EventsSSIS

OnError

OnPreExecute

..

..

sql

Monday, March 19, 2012

Logon to DTS from a different domain

I have a series of DTS's that need to be executed in a certain order and therefore have created a VB app that would execute the DTS's and perform a few administrative funtions for the user if successful.

The DBA for the SQL Server has given me a certain Windows Logon and I must logon via Terminal Server when I need to gain access to the SQL Server Manager. This is where I have created the DTS's - all created and owned by that user logon with certain rights. My VB application will be run from a different user machine on a different domain and therefore has a different logon- normal Windows logon. This user does not have access to the SQL Server and the DTS's need to logon with the same logon as under which it was created.

BUT...
LoadFromSQLServer offers only a SQL or Trusted connection by which one can let the user connect. By using the Windows connection flag, the LoadFromSQLServer function now ignores the logon username & password and posts the normal Windows logon. Obviously, the logon now fails for the user.

How can I let the LoadFromSQLServer funtion logon to the DTS Package with a different domain, username & password than the local Windows Logon information ?

GrahamAnybody out there ?

Logon Failed

OK. I have my Reporting Server running and able to create report with BS and
run it in BS, but when I try to get the report in my Web app or using Report
Manager I get "Logon Failed" error. I'm using Win Athentication credientials.
SQL Server 2005, SP2.
Thanks for help.
FereydoonI found the answer by myself:
In the Reporting Server Configuration page in Execution Account, uncheck the
Specify Account, so any user that have access to the reporting server can
execute the report.
"Fereydoon" wrote:
> OK. I have my Reporting Server running and able to create report with BS and
> run it in BS, but when I try to get the report in my Web app or using Report
> Manager I get "Logon Failed" error. I'm using Win Athentication credientials.
> SQL Server 2005, SP2.
> Thanks for help.
> Fereydoon

Monday, March 12, 2012

Logo.jpg won''t appear on report

Hi all,

I have a VS2005 / SQL Server 2005 report that looks fine when I run it from Visual Studio.But when a user clicks a button on my app (ASP 2.0 / VB 2005) and I have it go to the report manager site (http://servername/Reports/Pages/Folder.aspx) so they can run the report (the only report in that folder) the logo appears on the screen-rendered report as only a box w/ an "X" in it.The rest of the report is fine.

Logo.jpg is part of the project; I've tried dragging it directly to the header section, and dragging an Image control from the Toolbox to the header and going thru the wizard to specify Logo.jpg (trying both the "Embedded - the image is stored as part of the report" option and the "Project - the image is stored as part of the project" option.)The jpg is already the correct size, about 2" x 1".

If anyone has any ideas I'd be very grateful... thanks in advance.

- LenexaKS

Host the image on a website and link to it.|||That worked (once I renamed the logo jpg file to not have spaces in the name)... thanks!|||Duh, of course you can have spaces in the JPG name... I just hadn't uploaded the report from VS to the report manager before that attempt.

Wednesday, March 7, 2012

login to database failed...

Hi,

I am using VS2003 with SQLExpress on my local machine. I am trying to configure an app to connect to a loca sql express database. The following is
the connection string that I am using and the error message that I am receiving.

Any ideas what the problem is?

<add key="connectionString" value="Server=IKITSCH\SQLEXPRESS;database=Test1;trusted_connection=true" />


Cannot open database "Test1" requested by the login. The login failed. Login failed for user 'IKITSCH\ASPNET'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Cannot open database "Test1" requested by the login. The login failed. Login failed for user 'IKITSCH\ASPNET'.

Source Error:


Line 1600: {
Line 1601: SqlConnection conSql = new SqlConnection(ConnectionString);
Line 1602: conSql.Open();
Line 1603: return conSql;
Line 1604: }

Source File: c:\inetpub\wwwroot\testsite\classes\config.cs Line: 1602

Stack Trace:


[SqlException: Cannot open database "Test1" requested by the login. The login failed.
Login failed for user 'IKITSCH\ASPNET'.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +472
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
eStreamBG.Dating.Classes.DB.Open() in c:\inetpub\wwwroot\testsite\classes\config.cs:1602
eStreamBG.Dating.Classes.DBSettings.Get(String Key) in c:\inetpub\wwwroot\TestSite\Classes\DBSettings.cs:125
eStreamBG.Dating.Classes.DBSettings.Get(String Key, String Default) in c:\inetpub\wwwroot\TestSite\Classes\DBSettings.cs:75
eStreamBG.Dating.Classes.Misc.get_SiteEmail() in c:\inetpub\wwwroot\testsite\classes\config.cs:1719
eStreamBG.Dating.Classes.EmailQueueItem.Create(String to, String subject, String body) in c:\inetpub\wwwroot\TestSite\Classes\Email.cs:224
eStreamBG.Dating.Classes.ExceptionLogger.Log(String source, Exception ex) in c:\inetpub\wwwroot\TestSite\Classes\Exceptions.cs:122

Many Thanks!


------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032

Hi

You are using integrated security for authentication to the SQL Server database.

ASP.Net runs with the identity of the ASPNET user account by default and this user account has limited rights.

Try to avoid integrated security and specify the user name and password for the SQL Connection String instead.

And make sure you DB name isTest1 not test1Smile

|||That means the login account used to open the connection does not have access to the requested database Test1. Since the connection use Trust_connection and Impersonate is not enabled, IIS?use?its?account?machinename\ASPNET?to?connect?to?database?then?causes?the?failure.?To?solve?this,?open?Management?Studio->connect?to?SQLExpress->navigate?to?Security->Logins->check Properties of IKITSCH\ASPNET->switch?to?User?Mapping?tab->add?mapping?to?the?Test1?database?and?give?sufficient?permissions?to?the?mapped?database?user?for?future?operations?on?Test1?database.?

You can download Management Studio Express from here:

http://msdn.microsoft.com/vstudio/express/sql/download/|||

Hi,

Many Thanks!

|||

Hello,

I am also experiencing the same problem as 'chemystery', and I too have used integrated security in my connection string for authentication to the SQL Server.

I have contacted the DB and server administrators to find out if they can give me the username and password so that I can include it in my connectionstring but they have refused as they say it breaches their security protocols.

Is there another way around this that will allow integrated security and allow access to the DB?

Thanks in advance!


|||Then you have 2 options:
Walkthrough: Encrypting Configuration Information Using Protected Configuration

Or?ask the database host to add your Windows account?to?SQL?logins?and?give?it?proper?permissions,?so?that?you?can?the?same?Windows?Identity?when?opening?connection?with?Integrated?Security.?To?ensure?to?use?your?account?to?open?conneciton?for?each?web request,?you?can?use?impersonation?with?credentital, please refer to: identity Element

Friday, February 24, 2012

Login process error

Hi guys
Just setup a new system running Win2k3, SQL Server 2005, etc (all msdn).
I've got a web app (.net 2) which is running perfectly well, most of the
time, and then there's one page where I'm getting the following error...
Server Error in '/' Application.
A connection was successfully established with the server, but then an error
occured during the login process. (provider: Shared Memory Provider, error:
0
- No process is on the other end of the pipe.)
I guess the question is what does this message mean and how can I fix it?!
It's a website that's working fine apart from that page, and as far as I can
tell the code should be fine. Help!!
Cheers
Danmusosdev wrote:
> Hi guys
> Just setup a new system running Win2k3, SQL Server 2005, etc (all
> msdn). I've got a web app (.net 2) which is running perfectly well,
> most of the time, and then there's one page where I'm getting the
> following error...
> Server Error in '/' Application.
> A connection was successfully established with the server, but then
> an error occured during the login process. (provider: Shared Memory
> Provider, error: 0 - No process is on the other end of the pipe.)
> I guess the question is what does this message mean and how can I fix
> it?! It's a website that's working fine apart from that page, and as
> far as I can tell the code should be fine. Help!!
> Cheers
>
> Dan
http://msdn2.microsoft.com/en-us/library/ms175496.aspx
http://blogs.msdn.com/sql_protocols.../22/483684.aspx (see
message 4)
David Gugick - SQL Server MVP
Quest Software