Showing posts with label net. Show all posts
Showing posts with label net. Show all posts

Sunday, March 25, 2012

asp.net

When I attempt to install sql reporting services enterprise, i receive the
following:
"System Check results--asp.net is not installed or is not registered with
your web server".
I review services and iisadmin is there and running as is also asp.net state
services which I had started to run automatically. Microsoft .net framework
1.1 is confirmed installed in the add/remove programs.
Anyone come across this before?
thanksDid you by any chance remove the default website? RS needs the default
website to be able to install.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"tom frost" <tomfrost@.discussions.microsoft.com> wrote in message
news:3ABC1970-87A4-47D2-8CFC-11A613861F72@.microsoft.com...
> When I attempt to install sql reporting services enterprise, i receive the
> following:
> "System Check results--asp.net is not installed or is not registered with
> your web server".
> I review services and iisadmin is there and running as is also asp.net
state
> services which I had started to run automatically. Microsoft .net
framework
> 1.1 is confirmed installed in the add/remove programs.
> Anyone come across this before?
> thanks
>|||Run this from a command prompt:
%SYSTEMROOT%\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe -i
This will install ASP.NET.
On a side note, you may want to turn off the ASP.NET State Service as this
is used for servers that act as session state servers for ASP.NET
applications that are configured to maintain session state out of process.
So this service is probably just using resources for nothing.
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:ui3TDyx$EHA.2880@.TK2MSFTNGP14.phx.gbl...
> Did you by any chance remove the default website? RS needs the default
> website to be able to install.
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "tom frost" <tomfrost@.discussions.microsoft.com> wrote in message
> news:3ABC1970-87A4-47D2-8CFC-11A613861F72@.microsoft.com...
> > When I attempt to install sql reporting services enterprise, i receive
the
> > following:
> > "System Check results--asp.net is not installed or is not registered
with
> > your web server".
> >
> > I review services and iisadmin is there and running as is also asp.net
> state
> > services which I had started to run automatically. Microsoft .net
> framework
> > 1.1 is confirmed installed in the add/remove programs.
> >
> > Anyone come across this before?
> >
> > thanks
> >
> >
>|||Your error happens when, for example, ASP.NET is installed and IIS isn't on
the machine or IIS is installed later. The aspnet_regiis.exe utility with
the -i parameter installs the correct IIS script maps so IIS associates
asp.net requests with the desired version of the framework. (Each framework
version has it's own aspnet_regiis.exe utility).
You should also be able to MSDN search that message and you will get more
information on the aspnet_regiis tool.
Adrian M.
"tom frost" <tomfrost@.discussions.microsoft.com> wrote in message
news:3ABC1970-87A4-47D2-8CFC-11A613861F72@.microsoft.com...
> When I attempt to install sql reporting services enterprise, i receive the
> following:
> "System Check results--asp.net is not installed or is not registered with
> your web server".
> I review services and iisadmin is there and running as is also asp.net
> state
> services which I had started to run automatically. Microsoft .net
> framework
> 1.1 is confirmed installed in the add/remove programs.
> Anyone come across this before?
> thanks
>

ASP.Net

Looking for some good examples of how folks used ASP.Net to pass in
parameters to SQL2005 Reporting Services - not liking how the parameters
have to be coded within the designer itself.We used a single string parameter and embedded an XML document within
that, translating it in a wrapping stored procedure to be the
parameters required by the real sp on the database.
This allowed us to do things like data driven parameters to the report
(in the ASP.Net web application we wrote as the front end)
Cheers
Greg
Joe wrote:
> Looking for some good examples of how folks used ASP.Net to pass in
> parameters to SQL2005 Reporting Services - not liking how the parameters
> have to be coded within the designer itself.|||I use stored procedures as the datasource and set the parameters with the
procedure variables. Using report parameters takes way too long on large data
sets from what I have experienced. All the data is loaded before the
filtering takes place (from what I was told).
"Joe" wrote:
> Looking for some good examples of how folks used ASP.Net to pass in
> parameters to SQL2005 Reporting Services - not liking how the parameters
> have to be coded within the designer itself.
>
>

ASP. NET vs. PL/SQL

Hey guys, I am trying to rewrite an application with an Active Server Pages front-end that calls Oracle WebDB v2.2 reports. The data is all stored in an Oracle 9i database. What are some of the benefits and drawbacks of redesigning the application using an ASP .NET or PL/SQL
implementation. The redesigned application should still retrieve the data from the Oracle 9i database. Any help with this is greatly appreciated.When it comes to database development PL/SQL has the advantage since it is very flexible with Oracle and it seperates the business logic from the interface. But it lacks presentation in a nice way.

ASP.NET on the other hand can be developed to display data in very nice way. Performance wise PL/SQL would be better since it directly runs in the database server.

If the presentation of the report is not an issue then go for PL/SQL, or else you can go for ASP.NET

But remember to eveluate your skill level also on both and decide on one.

asp, trusted authentication, sql server 2000

hi...

i'm trying to write a database application using asp (not .net) and need to have it connect to SQL server 2000 using windows integrated security and trusted authentication. i have the following asp code:

DIM dbConn
set dbConn = Server.CreateObject("ADODB.Connection")
DBconn.Open "Driver={SQL Server};Server=DBSERVER;Database=MyDatabase;Truste d_Connection=yes"

i can access the page from the local webserver (http://localhost/sample.asp) but cannot access it from another machine. when i access it via another machine, it prompts for a un/pw but still says:

"Login failed for user (null). Reason: Not associated with a trusted SQL server connection"

please help...thanksHowdy,

Try setting up an ODBC connection ( make it use NT authentication ) on the web box to the SQL box and see if the problem goes away.

That may help establish where the problem is. Also, do you have same version of MDAC on web server & SQL Server boxes?

Cheers,

SG.|||i do have an odbc connection to the sql database on the web box (which currently is an xp pro machine for testing purposes, once i finish it will be moved to a 2000 server box)...how do i get it to use that specific connection?|||Try the following connection string:

Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=mydatabase;Data Source=dbserver

Also, your iis configuration may not be correct.|||After a good deal of troubleshooting, I have reason to believe that my IIS server is at fault. I do not know how to configure it correctly to use integrated security. I thought I had it correct - I do not allow Anonymous access, and under Authenticated access I have:

Digest authentication for Windows domain servers is checked (I've tried not using this, and recieved the same result)

Basic authentication (password is sent in clear text) is NOT checked

Integrated Windows authentication is checked.

When logging onto the ASP page, it does prompt for a user name and password. Upon entering my AD logon/password (which does have permission on the database), it errors out, reporting Login failed for user (null). This error is the same as it appears in SQL server's logs.

I can access it directly from the server without incident. Also, if i *do* allow anonymous access and use my credentials (as opposed to IUSER_blah), I can access it successfully. Otherwise, it reports the aforementioned error.

It might be mentioned that the machine I've been using to try to access the page is on XYZ domain, as is the IIS server - however, the SQL server is in the ABC domain. Does this matter?

Thursday, March 22, 2012

ASP pages stopped working

Our website uses asp and asp.net pages. Yesteray we started having problems
with the asp pages. The asp pages are unable to connect to the database.
The asp.net pages work fine. We receive the generic sql server error message
that it can't find the stored procedure. However, when we go into SQL
Manager we can view the stored procedure and run it.
Any ideas?
You might want to try running SQL Profiler while your application is
running. Set it to include Errors and Warnings. You should be able to see
which database it is going to.
If your stored procedures start with a sp_, SQL will look in the database it
is connected to, then in the master database for the stored procedure.
************************************************** *****************
Andy S.
MCSE NT/2000, MCDBA SQL 7/2000
andymcdba1@.NOMORESPAM.yahoo.com
Please remove NOMORESPAM before replying.
Always keep your antivirus and Microsoft software
up to date with the latest definitions and product updates.
Be suspicious of every email attachment, I will never send
or post anything other than the text of a http:// link nor
post the link directly to a file for downloading.
This posting is provided "as is" with no warranties
and confers no rights.
************************************************** *****************
"BD" <BD@.discussions.microsoft.com> wrote in message
news:BA31F094-7AF7-44CE-8906-964FE5F8110C@.microsoft.com...
> Our website uses asp and asp.net pages. Yesteray we started having
problems
> with the asp pages. The asp pages are unable to connect to the database.
> The asp.net pages work fine. We receive the generic sql server error
message
> that it can't find the stored procedure. However, when we go into SQL
> Manager we can view the stored procedure and run it.
> Any ideas?

ASP pages stopped working

Our website uses asp and asp.net pages. Yesteray we started having problems
with the asp pages. The asp pages are unable to connect to the database.
The asp.net pages work fine. We receive the generic sql server error messag
e
that it can't find the stored procedure. However, when we go into SQL
Manager we can view the stored procedure and run it.
Any ideas?You might want to try running SQL Profiler while your application is
running. Set it to include Errors and Warnings. You should be able to see
which database it is going to.
If your stored procedures start with a sp_, SQL will look in the database it
is connected to, then in the master database for the stored procedure.
****************************************
***************************
Andy S.
MCSE NT/2000, MCDBA SQL 7/2000
andymcdba1@.NOMORESPAM.yahoo.com
Please remove NOMORESPAM before replying.
Always keep your antivirus and Microsoft software
up to date with the latest definitions and product updates.
Be suspicious of every email attachment, I will never send
or post anything other than the text of a http:// link nor
post the link directly to a file for downloading.
This posting is provided "as is" with no warranties
and confers no rights.
****************************************
***************************
"BD" <BD@.discussions.microsoft.com> wrote in message
news:BA31F094-7AF7-44CE-8906-964FE5F8110C@.microsoft.com...
> Our website uses asp and asp.net pages. Yesteray we started having
problems
> with the asp pages. The asp pages are unable to connect to the database.
> The asp.net pages work fine. We receive the generic sql server error
message
> that it can't find the stored procedure. However, when we go into SQL
> Manager we can view the stored procedure and run it.
> Any ideas?sql

ASP and MSDE Connection Problems

Hello
I have a simple MSDE database set up on this local machine. I have a small
asp.net web page that tries to query the database and returns a list from
one of the columns. Nothing fancy, just trying to set it all up and get it
all working.
I get an error on the page when I run it.
Exception Details: System.Data.SqlClient.SqlException: Login failed for
user 'BBAISLEY\ASPNET'.
I assume this means that the user account isn't set up right, but I am not
telling it to use this account. I have the following connection string:
Dim connectionString As String = "server='BBAISLEY\MSDEBBAISLEY';
trusted_connection=true; database='music_cds'; user id=SQL;
password=xxxxxxxxxx;"
Can someone help me get this working? I would like to make a simple account
for all of my apps to use, don't really care what its called for now.
When I log in, I can only use the windows authencation method, so maybe my
MSDE instance isn't set for SQL passwords? How can I check this?
Thanks
Brett
You are using ASP.NET?
This is a common error as the applications default to using the ASPNET
account.
You have two choices:
1. Give access to the ASPNET account. (I dont think you want to do this
though).
2. Modify the AUTHENTICATION heading in the web.config file, & also the
virtual directory/site/directory property to only allow windows
authenticated users into the folder:
Under the AUTHENTICATION heading add:
<identity impersonate="true" />
Modify IIS to only allow windows authenticated users through...
Cheers,
James Goodman
"Brett Baisley" <baisley@.hotmail.com.REMOVETHIS> wrote in message
news:e$TLLgdLEHA.3292@.TK2MSFTNGP11.phx.gbl...
> Hello
> I have a simple MSDE database set up on this local machine. I have a small
> asp.net web page that tries to query the database and returns a list from
> one of the columns. Nothing fancy, just trying to set it all up and get it
> all working.
> I get an error on the page when I run it.
> Exception Details: System.Data.SqlClient.SqlException: Login failed for
> user 'BBAISLEY\ASPNET'.
> I assume this means that the user account isn't set up right, but I am not
> telling it to use this account. I have the following connection string:
> Dim connectionString As String = "server='BBAISLEY\MSDEBBAISLEY';
> trusted_connection=true; database='music_cds'; user id=SQL;
> password=xxxxxxxxxx;"
> Can someone help me get this working? I would like to make a simple
account
> for all of my apps to use, don't really care what its called for now.
> When I log in, I can only use the windows authencation method, so maybe my
> MSDE instance isn't set for SQL passwords? How can I check this?
> Thanks
> Brett
>
|||Whoops, I misread!
It looks like you do want to use the first suggestion I made.
By default, msde is only setup for Windows Authentication, rather than sql
authentication.
See this link for information on how to modify this:
http://support.microsoft.com/default...en-us%3B319930
http://support.microsoft.com/default...n-us%3BQ322336
Cheers,
James Goodman
"Brett Baisley" <baisley@.hotmail.com.REMOVETHIS> wrote in message
news:e$TLLgdLEHA.3292@.TK2MSFTNGP11.phx.gbl...
> Hello
> I have a simple MSDE database set up on this local machine. I have a small
> asp.net web page that tries to query the database and returns a list from
> one of the columns. Nothing fancy, just trying to set it all up and get it
> all working.
> I get an error on the page when I run it.
> Exception Details: System.Data.SqlClient.SqlException: Login failed for
> user 'BBAISLEY\ASPNET'.
> I assume this means that the user account isn't set up right, but I am not
> telling it to use this account. I have the following connection string:
> Dim connectionString As String = "server='BBAISLEY\MSDEBBAISLEY';
> trusted_connection=true; database='music_cds'; user id=SQL;
> password=xxxxxxxxxx;"
> Can someone help me get this working? I would like to make a simple
account
> for all of my apps to use, don't really care what its called for now.
> When I log in, I can only use the windows authencation method, so maybe my
> MSDE instance isn't set for SQL passwords? How can I check this?
> Thanks
> Brett
>
|||Ahh, that fixed it up. Thanks James
"James" <jamesATnorton-associates.co.ukREMOVE> wrote in message
news:e6GypgfLEHA.1644@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> Whoops, I misread!
> It looks like you do want to use the first suggestion I made.
> By default, msde is only setup for Windows Authentication, rather than sql
> authentication.
> See this link for information on how to modify this:
> http://support.microsoft.com/default...en-us%3B319930
> http://support.microsoft.com/default...n-us%3BQ322336
>
> --
> Cheers,
> James Goodman
> "Brett Baisley" <baisley@.hotmail.com.REMOVETHIS> wrote in message
> news:e$TLLgdLEHA.3292@.TK2MSFTNGP11.phx.gbl...
small[vbcol=seagreen]
from[vbcol=seagreen]
it[vbcol=seagreen]
not[vbcol=seagreen]
> account
my
>

Tuesday, March 20, 2012

ASP .NET Web Site Administration Tool Problem

Hi,

I have a problem when I use ASP .NET Web Application Administration tool. When I click the Security tab, I receive following message

"There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.

The following message may help in diagnosing the problem:Unable to connect to SQL Server database."

In the same page, there is a button to go to Provider section. I clicked it, and I went to the Provider page. There, there were two links, which were: "Select a single provider for all site management data" and
"Select a different provider for each feature (advanced)". I clicked the earlier, and I was redirected to a page to select provider. There, there was a link, I clicked it and I receive following message:

"

Provider ManagementCould not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider.

"

After reading this message, I opened Command Prompt and went to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727. There, I ran the aspnet_regsql command, and then ASP .NET SQL Server Setup Wizard was displayed. In the first page of this wizard I chose "Configure SQL Server for application services" and then I clicked "Next" button. In the second page I left all fields as they were and then I clicke"Next". In the third page I only clicked "Next" and then some process ran. Finally, in the last page I received following message:

"

Setup failed.

Exception:
Unable to connect to SQL Server database.

------------
Details of failure
------------

System.Web.HttpException: Unable to connect to SQL Server database. --> System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString)
-- End of inner exception stack trace --
at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString)
at System.Web.Management.SqlServices.SetupApplicationServices(String server, String user, String password, Boolean trusted, String connectionString, String database, String dbFileName, SqlFeatures features, Boolean install)
at System.Web.Management.SqlServices.Install(String database, SqlFeatures features, String connectionString)
at System.Web.Management.ConfirmPanel.Execute()
"

What should I do? I tried to use this administration tool on computer in my house and everything was just fine. Why do I have this problem in my office?

Hi,

It seems that you are not providing correct information about your SQL Server database on second page of that wizard. It should be properly pointing to the database which would be used by your application. When you have properly pointed it to that, it will then create some default tables and objects for you to use and enable this feature in your application.

|||

Yes, you are right! I made a mistake in step 2 of ASP .NET SQL Server Setup Wizard. Recently, I successfully went through all the steps. However, I still can't open the Security tab in ASP .NET Web Site Administration Tool. When I open the Provider section, I still receive the message below:

"

Provider ManagementCould not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider.

"

What should I do? I need to create a login functionality for my site in near future. Please help me...

|||

Hi haris101,

There, there were two links, which were: "Select a single provider for all site management data" and
"Select a different provider for each feature (advanced)". I clicked the earlier, and I was redirected to a page to select provider.

Open your machine.config and search for "localsqlserver" connection string. The default is configured to use sql server express database. So, if you are not using sql express, you need to modify this "localsqlserver" connection string or specify a new connection string for the default provider.

I suggestion you read this walk-through first:http://msdn2.microsoft.com/en-us/library/879kf95c(VS.80).aspx

Hope my suggestion helps

|||

hey haris

im having the same problem -
i can get the web site to run queries
but i cant get the website administration to connect
did you ever find out the solution??
would love to know your experience

thanks
toy

|||

I'm also having a similar problem, I tried to connect the aspnet_regsql to my sql 2005 server on the network but it keeps telling me it can't connect. and i'm not sure why that is. I already have information for my web app stored in this server so i know that it is running just fine. if anyone can help that would be great, im running the vs 2005 pro with the 2.0 framework.

Thank,

Shane S.
FDOT

|||

Bo Chen – MSFT:

Hi haris101,

There, there were two links, which were: "Select a single provider for all site management data" and
"Select a different provider for each feature (advanced)". I clicked the earlier, and I was redirected to a page to select provider.

Open your machine.config and search for "localsqlserver" connection string. The default is configured to use sql server express database. So, if you are not using sql express, you need to modify this "localsqlserver" connection string or specify a new connection string for the default provider.

I suggestion you read this walk-through first:http://msdn2.microsoft.com/en-us/library/879kf95c(VS.80).aspx

Hope my suggestion helps

Thanks Bo! You are right!Yes

For others who experience the same problem like mine, all you have to do is modify machine.config file in ...\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG (this is the default location). Scroll down until you find

<connectionStrings> <add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" /></connectionStrings>

What I did is changing the connection string to "Data Source=IT-HARIS\SQLEXPRESS;Integrated Security=True" since "IT-HARIS\SQLEXPRESS" is my SQL Server name and I use windows authentication to log on to this server. I hope this works for you too.


Best regards,

Haris

ASP .NET Application is Hanging when number of user grows

Hi,

Asp.net 2.0 (VB) application with Sql server 2000 Installed in windows 2000 professional server.Only less than 10 users using this application.

The problem is sometimes the application didn't response, it's very slow to get the information and after sometimes its never responding it showing hourclass.

I used Helper class (Application Block). Since Sql Server 2000 doesn't have the MARS Function, i have manually close the connection and opening again everytime.

Any idea?. Thanks in advance.

Help Class Modified Code:

--

Code :

' If the provided connection is not open, we will open it

If connection.State <> ConnectionState.Open Then

connection.Open()

mustCloseConnection = True

Else

mustCloseConnection = False

End If

Data ObjectBase :

'The transaction will call this method and also check the connection status

Public Sub BeginTransaction()

Try

If Not (myTransaction Is Nothing) Then

'Throw New Exception(ConfigManager.ReadFromXml("msg_DataAccess_Begin_trans"))

Throw New Exception("Transaction Error in Begin")

End If

If ourConnection.State <> ConnectionState.Open Then

ourConnection.Open()

myMustClose = True

Else

myMustClose = False

End If

myTransaction = ourConnection.BeginTransaction()

Catch ex As Exception

'Throw New BRSDatabaseException(ex.Message, ex)

Throw ex

End Try ''''

End Sub

Sounds like you need to determine what the bottleneck is. It could any number of things from the network, memory, hardware.

Are there other databases on this server in use?

How many records are being returned from sql server?

Are the tables that are being hit indexed?

I'd have the sql server dba monitor usage on the server in question.

|||I don't think it is SQL Server or Asp.net Win2k Pro concurrent users is five which means you need Small Business Server.|||

Hi Anthony Martin,

Yes, In this server there are about 3 applications running.

Very few records only returning (100 records)

We set only the primary key index.

is there any problem with connection closing in the object base class?

|||

I can't really speak on whether or not the .NET code is the issue. I have more experience with database tuning.

What do the query plans look like for the queries the application is using?

Are there large table index scans?

Try running sp_who2 or select * from sys.dm_db_exec_requests to monitor system usage/performance

|||

This is the output for sp_who2 in Sql Server 2000 Database.

1 BACKGROUND sa . . NULL LAZY WRITER 21688 0 06/14 17:57:59 1
2 sleeping sa . . NULL LOG WRITER 200766 0 06/14 17:57:59 2
3 BACKGROUND sa . . NULL LOCK MONITOR 1203 0 06/14 17:57:59 3
4 BACKGROUND sa . . master SIGNAL HANDLER 47 0 06/14 17:57:59 4
5 BACKGROUND sa . . master TASK MANAGER 0 849 06/14 17:57:59 5
6 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 6
7 sleeping sa . . NULL CHECKPOINT SLEEP 252156 17092 06/14 17:57:59 7
8 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 8
9 BACKGROUND sa . . master TASK MANAGER 0 1595 06/14 17:57:59 9
10 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 10
11 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 11
12 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 12
13 BACKGROUND sa . . master TASK MANAGER 0 388 06/14 17:57:59 13
14 BACKGROUND sa . . master TASK MANAGER 0 2129 06/14 17:57:59 14
15 BACKGROUND sa . . master TASK MANAGER 0 2176 06/14 17:57:59 15
17 BACKGROUND sa . . master TASK MANAGER 0 517 06/14 17:57:59 17
51 sleeping NT AUTHORITY\SYSTEM W2K92 . msdb AWAITING COMMAND 62 37 06/14 17:58:37 SQLAgent - Generic Refresher 51
52 sleeping NT AUTHORITY\SYSTEM W2K92 . msdb AWAITING COMMAND 1192429 29 09/13 12:57:53 SQLAgent - Alert Engine 52
53 sleeping WCAS PCOFFNONGGK8881 . WCASR2 AWAITING COMMAND 61 16 09/13 11:53:43 TESS 53
54 sleeping SA PCOFFNCHANWCS81 . TEMISCS AWAITING COMMAND 578 8 09/13 12:48:39 Temis-CS 54
55 sleeping SA PCOFFNHONGHSC81 . TEMISCS AWAITING COMMAND 218 3 09/13 12:07:14 Temis-CS 55
56 sleeping SA PCOFFNCHANWCS81 . TEMISCS AWAITING COMMAND 2080 228 09/13 12:49:45 Temis-CS 56
57 sleeping TESS W2K92 . TESS AWAITING COMMAND 29175 3 09/13 12:55:11 .Net SqlClient Data Provider 57
58 sleeping W2K92\w2k92_remote W2K92 . TESS AWAITING COMMAND 63 5 09/13 12:49:03 MS SQLEM 58
59 RUNNABLE W2K92\w2k92_remote W2K92 . TESS SELECT INTO 156 9 09/13 12:58:00 SQL Query Analyzer 59
60 sleeping TESS W2K92 . TESS AWAITING COMMAND 5549 0 09/13 12:58:02 .Net SqlClient Data Provider 60
61 sleeping sa W2K92 . WCASR2 AWAITING COMMAND 9422 408 09/13 12:57:57 Microsoft(R) Windows (R) 2000 Operating System 61
62 sleeping sa W2K92 . WCASR2 AWAITING COMMAND 1781 113 09/13 12:57:57 Microsoft(R) Windows (R) 2000 Operating System 62

ASP .NET Application is Hanging when number of user grows

Hi,

Asp.net 2.0 (VB) application with Sql server 2000 Installed in windows 2000 professional server.Only less than 10 users using this application.

The problem is sometimes the application didn't response, it's very slow to get the information and after sometimes its never responding it showing hourclass.

I used Helper class (Application Block). Since Sql Server 2000 doesn't have the MARS Function, i have manually close the connection and opening again everytime.

Any idea?. Thanks in advance.

Help Class Modified Code:

--

Code :

' If the provided connection is not open, we will open it

If connection.State <> ConnectionState.Open Then

connection.Open()

mustCloseConnection = True

Else

mustCloseConnection = False

End If

Data ObjectBase :

'The transaction will call this method and also check the connection status

Public Sub BeginTransaction()

Try

If Not (myTransaction Is Nothing) Then

'Throw New Exception(ConfigManager.ReadFromXml("msg_DataAccess_Begin_trans"))

Throw New Exception("Transaction Error in Begin")

End If

If ourConnection.State <> ConnectionState.Open Then

ourConnection.Open()

myMustClose = True

Else

myMustClose = False

End If

myTransaction = ourConnection.BeginTransaction()

Catch ex As Exception

'Throw New BRSDatabaseException(ex.Message, ex)

Throw ex

End Try ''''

End Sub

Sounds like you need to determine what the bottleneck is. It could any number of things from the network, memory, hardware.

Are there other databases on this server in use?

How many records are being returned from sql server?

Are the tables that are being hit indexed?

I'd have the sql server dba monitor usage on the server in question.

|||I don't think it is SQL Server or Asp.net Win2k Pro concurrent users is five which means you need Small Business Server.|||

Hi Anthony Martin,

Yes, In this server there are about 3 applications running.

Very few records only returning (100 records)

We set only the primary key index.

is there any problem with connection closing in the object base class?

|||

I can't really speak on whether or not the .NET code is the issue. I have more experience with database tuning.

What do the query plans look like for the queries the application is using?

Are there large table index scans?

Try running sp_who2 or select * from sys.dm_db_exec_requests to monitor system usage/performance

|||

This is the output for sp_who2 in Sql Server 2000 Database.

1 BACKGROUND sa . . NULL LAZY WRITER 21688 0 06/14 17:57:59 1
2 sleeping sa . . NULL LOG WRITER 200766 0 06/14 17:57:59 2
3 BACKGROUND sa . . NULL LOCK MONITOR 1203 0 06/14 17:57:59 3
4 BACKGROUND sa . . master SIGNAL HANDLER 47 0 06/14 17:57:59 4
5 BACKGROUND sa . . master TASK MANAGER 0 849 06/14 17:57:59 5
6 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 6
7 sleeping sa . . NULL CHECKPOINT SLEEP 252156 17092 06/14 17:57:59 7
8 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 8
9 BACKGROUND sa . . master TASK MANAGER 0 1595 06/14 17:57:59 9
10 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 10
11 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 11
12 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 12
13 BACKGROUND sa . . master TASK MANAGER 0 388 06/14 17:57:59 13
14 BACKGROUND sa . . master TASK MANAGER 0 2129 06/14 17:57:59 14
15 BACKGROUND sa . . master TASK MANAGER 0 2176 06/14 17:57:59 15
17 BACKGROUND sa . . master TASK MANAGER 0 517 06/14 17:57:59 17
51 sleeping NT AUTHORITY\SYSTEM W2K92 . msdb AWAITING COMMAND 62 37 06/14 17:58:37 SQLAgent - Generic Refresher 51
52 sleeping NT AUTHORITY\SYSTEM W2K92 . msdb AWAITING COMMAND 1192429 29 09/13 12:57:53 SQLAgent - Alert Engine 52
53 sleeping WCAS PCOFFNONGGK8881 . WCASR2 AWAITING COMMAND 61 16 09/13 11:53:43 TESS 53
54 sleeping SA PCOFFNCHANWCS81 . TEMISCS AWAITING COMMAND 578 8 09/13 12:48:39 Temis-CS 54
55 sleeping SA PCOFFNHONGHSC81 . TEMISCS AWAITING COMMAND 218 3 09/13 12:07:14 Temis-CS 55
56 sleeping SA PCOFFNCHANWCS81 . TEMISCS AWAITING COMMAND 2080 228 09/13 12:49:45 Temis-CS 56
57 sleeping TESS W2K92 . TESS AWAITING COMMAND 29175 3 09/13 12:55:11 .Net SqlClient Data Provider 57
58 sleeping W2K92\w2k92_remote W2K92 . TESS AWAITING COMMAND 63 5 09/13 12:49:03 MS SQLEM 58
59 RUNNABLE W2K92\w2k92_remote W2K92 . TESS SELECT INTO 156 9 09/13 12:58:00 SQL Query Analyzer 59
60 sleeping TESS W2K92 . TESS AWAITING COMMAND 5549 0 09/13 12:58:02 .Net SqlClient Data Provider 60
61 sleeping sa W2K92 . WCASR2 AWAITING COMMAND 9422 408 09/13 12:57:57 Microsoft(R) Windows (R) 2000 Operating System 61
62 sleeping sa W2K92 . WCASR2 AWAITING COMMAND 1781 113 09/13 12:57:57 Microsoft(R) Windows (R) 2000 Operating System 62

ASP .NET Application is Hanging when number of user grows

Hi,

Asp.net 2.0 (VB) application with Sql server 2000 Installed in windows 2000 professional server.Only less than 10 users using this application.

The problem is sometimes the application didn't response, it's very slow to get the information and after sometimes its never responding it showing hourclass.

I used Helper class (Application Block). Since Sql Server 2000 doesn't have the MARS Function, i have manually close the connection and opening again everytime.

Any idea?. Thanks in advance.

Help Class Modified Code:

--

Code :

' If the provided connection is not open, we will open it

If connection.State <> ConnectionState.Open Then

connection.Open()

mustCloseConnection = True

Else

mustCloseConnection = False

End If

Data ObjectBase :

'The transaction will call this method and also check the connection status

Public Sub BeginTransaction()

Try

If Not (myTransaction Is Nothing) Then

'Throw New Exception(ConfigManager.ReadFromXml("msg_DataAccess_Begin_trans"))

Throw New Exception("Transaction Error in Begin")

End If

If ourConnection.State <> ConnectionState.Open Then

ourConnection.Open()

myMustClose = True

Else

myMustClose = False

End If

myTransaction = ourConnection.BeginTransaction()

Catch ex As Exception

'Throw New BRSDatabaseException(ex.Message, ex)

Throw ex

End Try ''''

End Sub

Sounds like you need to determine what the bottleneck is. It could any number of things from the network, memory, hardware.

Are there other databases on this server in use?

How many records are being returned from sql server?

Are the tables that are being hit indexed?

I'd have the sql server dba monitor usage on the server in question.

|||I don't think it is SQL Server or Asp.net Win2k Pro concurrent users is five which means you need Small Business Server.|||

Hi Anthony Martin,

Yes, In this server there are about 3 applications running.

Very few records only returning (100 records)

We set only the primary key index.

is there any problem with connection closing in the object base class?

|||

I can't really speak on whether or not the .NET code is the issue. I have more experience with database tuning.

What do the query plans look like for the queries the application is using?

Are there large table index scans?

Try running sp_who2 or select * from sys.dm_db_exec_requests to monitor system usage/performance

|||

This is the output for sp_who2 in Sql Server 2000 Database.

1 BACKGROUND sa . . NULL LAZY WRITER 21688 0 06/14 17:57:59 1
2 sleeping sa . . NULL LOG WRITER 200766 0 06/14 17:57:59 2
3 BACKGROUND sa . . NULL LOCK MONITOR 1203 0 06/14 17:57:59 3
4 BACKGROUND sa . . master SIGNAL HANDLER 47 0 06/14 17:57:59 4
5 BACKGROUND sa . . master TASK MANAGER 0 849 06/14 17:57:59 5
6 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 6
7 sleeping sa . . NULL CHECKPOINT SLEEP 252156 17092 06/14 17:57:59 7
8 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 8
9 BACKGROUND sa . . master TASK MANAGER 0 1595 06/14 17:57:59 9
10 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 10
11 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 11
12 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 12
13 BACKGROUND sa . . master TASK MANAGER 0 388 06/14 17:57:59 13
14 BACKGROUND sa . . master TASK MANAGER 0 2129 06/14 17:57:59 14
15 BACKGROUND sa . . master TASK MANAGER 0 2176 06/14 17:57:59 15
17 BACKGROUND sa . . master TASK MANAGER 0 517 06/14 17:57:59 17
51 sleeping NT AUTHORITY\SYSTEM W2K92 . msdb AWAITING COMMAND 62 37 06/14 17:58:37 SQLAgent - Generic Refresher 51
52 sleeping NT AUTHORITY\SYSTEM W2K92 . msdb AWAITING COMMAND 1192429 29 09/13 12:57:53 SQLAgent - Alert Engine 52
53 sleeping WCAS PCOFFNONGGK8881 . WCASR2 AWAITING COMMAND 61 16 09/13 11:53:43 TESS 53
54 sleeping SA PCOFFNCHANWCS81 . TEMISCS AWAITING COMMAND 578 8 09/13 12:48:39 Temis-CS 54
55 sleeping SA PCOFFNHONGHSC81 . TEMISCS AWAITING COMMAND 218 3 09/13 12:07:14 Temis-CS 55
56 sleeping SA PCOFFNCHANWCS81 . TEMISCS AWAITING COMMAND 2080 228 09/13 12:49:45 Temis-CS 56
57 sleeping TESS W2K92 . TESS AWAITING COMMAND 29175 3 09/13 12:55:11 .Net SqlClient Data Provider 57
58 sleeping W2K92\w2k92_remote W2K92 . TESS AWAITING COMMAND 63 5 09/13 12:49:03 MS SQLEM 58
59 RUNNABLE W2K92\w2k92_remote W2K92 . TESS SELECT INTO 156 9 09/13 12:58:00 SQL Query Analyzer 59
60 sleeping TESS W2K92 . TESS AWAITING COMMAND 5549 0 09/13 12:58:02 .Net SqlClient Data Provider 60
61 sleeping sa W2K92 . WCASR2 AWAITING COMMAND 9422 408 09/13 12:57:57 Microsoft(R) Windows (R) 2000 Operating System 61
62 sleeping sa W2K92 . WCASR2 AWAITING COMMAND 1781 113 09/13 12:57:57 Microsoft(R) Windows (R) 2000 Operating System 62

sql

ASP .NET Application is Hanging when number of user grows

Hi,

Asp.net 2.0 (VB) application with Sql server 2000 Installed in windows 2000 professional server.Only less than 10 users using this application.

The problem is sometimes the application didn't response, it's very slow to get the information and after sometimes its never responding it showing hourclass.

I used Helper class (Application Block). Since Sql Server 2000 doesn't have the MARS Function, i have manually close the connection and opening again everytime.

Any idea?. Thanks in advance.

Help Class Modified Code:

--

Code :

' If the provided connection is not open, we will open it

If connection.State <> ConnectionState.Open Then

connection.Open()

mustCloseConnection = True

Else

mustCloseConnection = False

End If

Data ObjectBase :

'The transaction will call this method and also check the connection status

Public Sub BeginTransaction()

Try

If Not (myTransaction Is Nothing) Then

'Throw New Exception(ConfigManager.ReadFromXml("msg_DataAccess_Begin_trans"))

Throw New Exception("Transaction Error in Begin")

End If

If ourConnection.State <> ConnectionState.Open Then

ourConnection.Open()

myMustClose = True

Else

myMustClose = False

End If

myTransaction = ourConnection.BeginTransaction()

Catch ex As Exception

'Throw New BRSDatabaseException(ex.Message, ex)

Throw ex

End Try ''''

End Sub

Sounds like you need to determine what the bottleneck is. It could any number of things from the network, memory, hardware.

Are there other databases on this server in use?

How many records are being returned from sql server?

Are the tables that are being hit indexed?

I'd have the sql server dba monitor usage on the server in question.

|||I don't think it is SQL Server or Asp.net Win2k Pro concurrent users is five which means you need Small Business Server.|||

Hi Anthony Martin,

Yes, In this server there are about 3 applications running.

Very few records only returning (100 records)

We set only the primary key index.

is there any problem with connection closing in the object base class?

|||

I can't really speak on whether or not the .NET code is the issue. I have more experience with database tuning.

What do the query plans look like for the queries the application is using?

Are there large table index scans?

Try running sp_who2 or select * from sys.dm_db_exec_requests to monitor system usage/performance

|||

This is the output for sp_who2 in Sql Server 2000 Database.

1 BACKGROUND sa . . NULL LAZY WRITER 21688 0 06/14 17:57:59 1
2 sleeping sa . . NULL LOG WRITER 200766 0 06/14 17:57:59 2
3 BACKGROUND sa . . NULL LOCK MONITOR 1203 0 06/14 17:57:59 3
4 BACKGROUND sa . . master SIGNAL HANDLER 47 0 06/14 17:57:59 4
5 BACKGROUND sa . . master TASK MANAGER 0 849 06/14 17:57:59 5
6 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 6
7 sleeping sa . . NULL CHECKPOINT SLEEP 252156 17092 06/14 17:57:59 7
8 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 8
9 BACKGROUND sa . . master TASK MANAGER 0 1595 06/14 17:57:59 9
10 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 10
11 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 11
12 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 12
13 BACKGROUND sa . . master TASK MANAGER 0 388 06/14 17:57:59 13
14 BACKGROUND sa . . master TASK MANAGER 0 2129 06/14 17:57:59 14
15 BACKGROUND sa . . master TASK MANAGER 0 2176 06/14 17:57:59 15
17 BACKGROUND sa . . master TASK MANAGER 0 517 06/14 17:57:59 17
51 sleeping NT AUTHORITY\SYSTEM W2K92 . msdb AWAITING COMMAND 62 37 06/14 17:58:37 SQLAgent - Generic Refresher 51
52 sleeping NT AUTHORITY\SYSTEM W2K92 . msdb AWAITING COMMAND 1192429 29 09/13 12:57:53 SQLAgent - Alert Engine 52
53 sleeping WCAS PCOFFNONGGK8881 . WCASR2 AWAITING COMMAND 61 16 09/13 11:53:43 TESS 53
54 sleeping SA PCOFFNCHANWCS81 . TEMISCS AWAITING COMMAND 578 8 09/13 12:48:39 Temis-CS 54
55 sleeping SA PCOFFNHONGHSC81 . TEMISCS AWAITING COMMAND 218 3 09/13 12:07:14 Temis-CS 55
56 sleeping SA PCOFFNCHANWCS81 . TEMISCS AWAITING COMMAND 2080 228 09/13 12:49:45 Temis-CS 56
57 sleeping TESS W2K92 . TESS AWAITING COMMAND 29175 3 09/13 12:55:11 .Net SqlClient Data Provider 57
58 sleeping W2K92\w2k92_remote W2K92 . TESS AWAITING COMMAND 63 5 09/13 12:49:03 MS SQLEM 58
59 RUNNABLE W2K92\w2k92_remote W2K92 . TESS SELECT INTO 156 9 09/13 12:58:00 SQL Query Analyzer 59
60 sleeping TESS W2K92 . TESS AWAITING COMMAND 5549 0 09/13 12:58:02 .Net SqlClient Data Provider 60
61 sleeping sa W2K92 . WCASR2 AWAITING COMMAND 9422 408 09/13 12:57:57 Microsoft(R) Windows (R) 2000 Operating System 61
62 sleeping sa W2K92 . WCASR2 AWAITING COMMAND 1781 113 09/13 12:57:57 Microsoft(R) Windows (R) 2000 Operating System 62

ASP .Net 2.0 SQLServer MembershipProvider

Hi,

Currently I am developing a web application which takes a SQL Database file mdf as backend. I use SQL Server express edition as backend. I use SQL Membership provider as well as Role provider. All the data related to membership & the application is combined in a common database and exists as a single mdf file which I have attached through SQL Server Express Edtion.

My problem is I am able to access the application Tables & Stored procedures etc but not getting connected with the Membership methods.

Can any one help me in this aspect. The connection string what I have done for the attaching the database file is as follows

<addname="connectionstring"connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename="|DataDirectory|JsskDb.mdf";Trusted_Connection=Yes"providerName="System.Data.SqlClient"/>

<addname="MyProviderConnectionString"connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|JsskDb.mdf;Integrated Security=SSPI;"providerName="System.Data.SqlClient"/>

The first one works while the later doesn't work.

Help please,

Thanks,

Uma Ramiya

Hi Ramiya,

According to the code you posted, I think the way you create your connection string is right, It can be declared in the connectionString node but not for Membership settings, it should be declared in the membership node. Here's the correct way.

<membership defaultProvider="AspNetSqlProvider">
<providers>
<add connectionStringName="connectionstring" /// the value is according to the name in your connectionString node you set
applicationName="/"
description=""
minRequiredPasswordLength="6"
minRequiredNonalphanumericCharacters="0"
requiresUniqueEmail="false"
enablePasswordRetrieval="false"
enablePasswordReset="false"
requiresQuestionAndAnswer="false"
passwordFormat="Hashed"
name="AspNetSqlProvider"
type="System.Web.Security.SqlMembershipProvider"/>
</providers>
</membership>

Hope this helps. Thanks.

asp > asp.net

I'm in the process of trying to learn asp.net and one of the things I'd like to tackle right off the bat is a simple display from my SQL server. Below is some of my "classic" asp that works fine. I suppose what I want to know is, what would this code look like in .net?

<%

Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open Application("inet_dvdauthority")
sql = "SELECT * FROM contest_text where dte = '3/14/2004' order by id"

Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open sql, Conn, adOpenStatic, adLockReadOnly, adCmdText

%
<p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr><td class="reviewheader" colspan="2">dvd/authority contest - week of <%=RS("dte")%><br><br></td>
</tr>
<%
If RS.EOF Then
%>
<tr>
<td>No Contest found.</td>
</tr>
<%
Else
%>
<%
Do Until RS.EOF
%>
<tr>
<td width="110" valign="top" align="center" class="afitext"><img src="http://pics.10026.com/?src=/dvds/<%=RS("image")%>" border="1" width="100" height="140" alt="<%=RS("title")%>"><Br><%=RS("title")%><br><br></td>
<td valign="top" class="maintext"><p align="justify"><%=RS("body")%></p></td>
</tr>
<%
RS.MoveNext
Loop
End If
%>
</table>
</p
<%

Set RS = Nothing
Conn.Close
Set Conn = Nothing

%>Google for info on using a SQLDataReader to populate a repeater. That should give you what you need to do this in dotnet

Sunday, March 11, 2012

AS400 password request

Hi all,

I'm loading a working SSIS package in VB.NET and executing it programmatically. As the 'Persist Security Info' is set, it executes fine, presumably because I executed it previously with valid login info. But, when I update the connection info (programmatically) it prompts me for a password at runtime. The connection string will be provided by the user (DB Admin) and this is running as a Windows service, so what I want to do is, in the case of invalid login info, just receive a rejection, that I can respond to in the code. I'm using the IBMDA400 data provider to connect to an iSeries. Ideally, I need a generic solution that will apply to all connection strings and providers, if possible, but provider specific would be fine for now. Hope you can help....

Mazmo

i ran into this using 3 different AS400 connectors. Try making the Connection componments connection string a variable, and setting the connection string there. Fixed it for me, though security freaks would say this is bad. You could always encrypt your config file .|||

I'm pretty sure this won't solve my problem.

Regardless of the 'Persist Security Info' flag and whether it has connected previously, my customers will be creating the SSIS packages for my program to deal with. Wherever the connection string is stored, there will always be cases where it cannot authenticate. This is acceptable, as long as I can respond to the rejection by telling the user to edit their SSIS package and try again, instead of it automatically throwing up the login box.

So, basically, I want to supress the login box.

Any ideas?

|||We used a program called Macro Express that could track dialog boxes (amongst other things). This was our "Automation Process" before we got an open standards DMS. You could read the form title of the CLAE prompt, do a macro to email the person resonsible. Crummy workaround, but you are dealing with a 3rd party driver pop-up. So however else you do this in .net i don't know. Basically you will be screen scraping the environment, which menas you will also have to have the ssis running in a logged in user context, whcih goes over real well with sys admins (I hate it). Otherwise, maybe a windows programmer can shed some light on this using a pre-execute event or something.|||

maybe you could run a pre-emptive sql query against the 400 (such as SELECT 1+1) as a fake first step of you SSIS program. If it fails, send an email to somebody. Of course, it might time out and never trigger your catch clause.

(tried to edit but forums kept throwing errors...hopefully this gets through)

Saturday, February 25, 2012

AS 2005 References/Books

Hi All -

I have come across the need to use a cube in AS 2005 for an application. Unfortunately this will be the first time writting an ASP.Net application which uses one. I was wondering if any of you had any good books or references that I could look at to get an idea of how I should approach this issue.

Thanks in advance.

Have a look at ISBN: 0470176377 ; ISBN13: 9780470176375 at http://www.compman.co.uk/scripts/browse.asp?ref=834216&source=A94

Also look at http://www.codeproject.com/cs/database/CubesAdomd.asp An article on Cubes, MDX, Analysis Services and ADOMD in .NET
and http://www.codeproject.com/cs/database/MyMdDataReader.asp This code replaces the buggy ADOMD.NET DataAdapter and DataReader.

|||Thanks for the help. I will look into them.

AS 2000 DSO loses connection

We use DSO with ASP.NET 1.1 via COM layer through interop. However, sometimes after awhile the connection can no longer be established. The error occurs somewhere in the following code, most likely the first line:

dsoServer.Connect ServerName
Set m_dsoServer = dsoServer

If m_dsoServer.MDStores.Find(mvarDBName) Then
Set m_dsoDatabase = m_dsoServer.MDStores(mvarDBName)
Else
' Dont do nothing for now
End If

The error reads: Error: Cannot connect to the repository.

Restarting IIS fixes this problem until it recurs. Any idea?

Thanks,
Boris Zakharin

Calling DSO from ASP.NET is not really a supported scenario :(

Is your repository in Access or migrated to SQL Server ?

|||Access|||Then please migrate it to SQL Server. There are plenty of benefits in doing so, and it also might help in your scenario, although as I already mentioned, it is not supported one.|||Could you point me to where it says that using DSO from ASP.NET is not supported?
I have found at least one KB article talking about how to do this very thing (http://support.microsoft.com/kb/823066). Does this not mean that it is in fact supported?|||It's more like there is no documentation which states that DSO is supported from ASP.NET. (And up to AS2000 it wasn't supported even for ASP.) Microsoft doesn't ship PIA for DSO, so using DSO from any .NET application is not supported, although technically you can build interop assembly yourself. Remember, DSO was built in VB6 for VB6 programmers, before .NET was invented, and there are many potential issues around integration between the two.|||So, what is the supported way to access AS 2000 data from ASP.NET?|||In order to access data you should use ADOMD.NET. DSO is for the administrator operations.|||I assume things like creating a cube and changing a filter are considered administrative. We allow users to do that from our web application.|||

I am not sure what you mean by "changing a filter".

Creating cubes from web application is a loaded operation. You may want to consider migrating to AS2005, where you could either use AMO from ASP.NET or generate XMLA scripts directly.

articles about data access using System.Data.SqlClient namespace?

Aaarrgghhhhhhh, still searchin' for a nice step-by-step article to learn data access (all insert delete update commands) with the SQL Server .NET Data Provider found in [System.Data.SqlClient] namespace...

Can anyone plz help me to find it?these might help?
http://samples.gotdotnet.com/quickstart/howto/doc/adoplus/ADOPlusOverview.aspx
http://www.stylusinc.net/technology/microsoft/ado.shtml
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemDataSqlClientSqlConnectionClassTopic.asp?frame=true
http://msdn.microsoft.com/data/downloads/samples/default.aspx

Also
Check out the Data Access Application Block for .NET, it creates a wrapper around SqlClient class for somewhat easier use.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/daab-rm.asp

Friday, February 24, 2012

Array parameters in stored procedures in SQL 2005?

Hi,
I am not sure if I have understood what is happening with the new SQL server
2005.
Will we be using .Net classes instead of stored procedures?
Will I be able to use an array or list type of parameter for my queries with
SQL server 2005? If yes, how would I do this?
Thanks,
Morten> Will we be using .Net classes instead of stored procedures?
Well this is an option available with us. Not that this is the only way. The
T-SQL style still exists nevertheless.

> Will I be able to use an array or list type of parameter for my queries
with
> SQL server 2005? If yes, how would I do this?
AFAIK, this is still not possible.
HTH,
Vinod Kumar
MCSE, DBA, MCAD, MCSD
http://www.extremeexperts.com
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp
"Morten" <morten@.imano.nospam> wrote in message
news:%23L9KEr6AFHA.2180@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I am not sure if I have understood what is happening with the new SQL
server
> 2005.
> Will we be using .Net classes instead of stored procedures?
> Will I be able to use an array or list type of parameter for my queries
with
> SQL server 2005? If yes, how would I do this?
>
> Thanks,
> Morten
>|||>> Will I be able to use an array or list type of parameter for my
queries with SQL server 2005? <<
The short answer is no. But the real qustion is why do you want to
make SQL less relational instead of more standardized?
The way this is done in Standard SQL is with a table constructor:
BEGIN
DELETE FROM Parmlist;
INSERT INTO Parmlist
VALUES (a1), (a2), .., (an);
CALL Foobar (...);
END:
Then you use the parameter table in the query or other statement in the
usual manner.

Sunday, February 19, 2012

Array as variable ?

Hi,
I am in a situation where I have an array of userIDs in VB .Net. For each of
these UserIDs I need to query the database for the fastest time for each
user and would like to fill a dataset ordered with fastest to slowest time.
Is there any way I can manage this in T-SQL and submit an array of userIDs
as a variable to the stored procedure, or do I need to manage this in my
code by submitting one query per user and do the sorting etc in code ?
Niclashttp://www.sommarskog.se/arrays-in-sql.html|||To add to Omnibuzz's response, you can also consider using the XML data type
if you're using SQL 2005.
Hope this helps.
Dan Guzman
SQL Server MVP
"Niclas" <lindblom_niclas@.hotmail.com> wrote in message
news:OOAMYC4aGHA.4788@.TK2MSFTNGP02.phx.gbl...
> Hi,
> I am in a situation where I have an array of userIDs in VB .Net. For each
> of these UserIDs I need to query the database for the fastest time for
> each user and would like to fill a dataset ordered with fastest to slowest
> time.
> Is there any way I can manage this in T-SQL and submit an array of userIDs
> as a variable to the stored procedure, or do I need to manage this in my
> code by submitting one query per user and do the sorting etc in code ?
> Niclas
>|||> I am in a situation where I have an array of userIDs in VB .Net. For each
> of these UserIDs I need to query the database for the fastest time for
> each user and would like to fill a dataset ordered with fastest to slowest
> time.
> Is there any way I can manage this in T-SQL and submit an array of userIDs
> as a variable to the stored procedure, or do I need to manage this in my
> code by submitting one query per user and do the sorting etc in code ?
The simplest way of dealing with an array of updates / inserts / deletes in
.NET is to either (a) iterate over that array, passing each value one at a
time to your stored procedure, which is pretty inefficient, or to (b) slurp
the data up into a DataTable or DataSet and do something like this:
If you want to see it in C#, just say so, and I will repost:
Imports Jedi.Mind.Trick
' you're putting your connection strings in your .config file, aren't you?!?
Dim cnstr As String = ConfigurationSettings.AppSettings("connectionString")
Dim cn As New SqlConnection(cnstr)
' SQL Statement or stored procedure that updates a *single* record
Dim cm As New SqlConnection("INSERT INTO ... VALUES (...)", cn)
Dim da As New SqlDataAdapter(cm)
' whatever you need to hold your *multiple records* of data.
Dim dt As New DataTable() ' or, if you prefer, Dim ds As New DataSet()
' get your data from wherever
da.Update(dt) ' does inserts, updates, and deletes, as neccesary
Peace & happy computing,
Mike Labosh, MCSD MCT
Owner, vbSensei.Com
"Escriba coda ergo sum." -- vbSensei