Showing posts with label scenario. Show all posts
Showing posts with label scenario. Show all posts

Sunday, March 25, 2012

Connection Pooling on Analysis Services

Please may I have your assistance with the following issue. Let me 1st describe the scenario. The front end uses BEA Web Logic which queries an IIS Web Service that in turns queries MS Analysis Services 2005.

The Web Service builds the MDX queries dynamically and returns the results in XML.

Each time we run a query we open a connection using ADOMD, fire the MDX to return the result set then close the connection. However we don't think this will provide the best performance. So

1. Does the AS OLEDB provider handle connection pooling internally?

2. If not, is it possible to implement connection pooling in code inside our web service?

3. Are there other ways to implement connection pooling? for example does using HTTP connections automatically provide us with connection pooling?

Thanks

Here is an article about implementing connection pooling in AS2000, the same should apply for AS2005.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql2k/html/sql2k_connpooling.asp

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Hi Edward,

Many thanks for the document. Please have a look at the following.

http://www.codecomments.com/archive364-2005-1-379959.html

What would be ideal is when the web service starts this will automatically create a fixed number of connection pools to an AS Db

Our objective is to be able to reuse these connection pools by different users connecting to the same web service, obviously not simultaneously. The above suggests that the connection pool is destroyed?

Any thoughts would be greatly appreciated

Thanks

John

|||

No.

The post you mention suggests only that you should apply a bit more logic beyond simple 3 step;

1. Application starts.
2. It creates pool of open connecitions size N.
3. Pool of connections is destroyed when you shut down your web service.

It suggests you implement logic in your application that allows your application to grow conneciton pool above pre-set limit N:
In beginning your conneciton pool is N , if application used all of the connections from the conneciton pool and still needs more connections, connection pool will grow to N +x ... Your application will periodically check if it needs to srink connection pool back to N.

As for the different users connecting to your application. You can re-use connections if application is using same credentials to retrevie data from Analysis Server.
For instance if user A and B connecting to your web service running under W credentials. If your connections are opened under W , you can re-use them . If you open connections under A , you should not let B re-use that conneciton , otherwize you might show B too much data.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Hi Edward, Many thanks for your tips and based on your recommendation (to pursue AS 2000) downloaded the MS XML FOR AS SDK (AS 2000) and started to look at the various options

We used the reference to this

Public Shared p As New MSXmlAnalysisSCLib.ADOConPool

p.MaxSessions = 5

cnadomd = p.GetConnection("Data Source=myASServer" & ";Provider=msolap.3; initial catalog=myASDb")

Unfortunately we dropped the above method because there are no options to use XML? This will mean we would need to read the cells and construct our own XML string

Then we looked at the option of using http connection using the latest AS 2005 connection provider which seems to be set up to use connection pooling

conn.ConnectionString = "Data Source=http://myWebServer/OLAPhttp/msmdpump.dll" & ";Provider=msolap.3; initial catalog=myASDb"

As the content of the msmdpump.ini file suggests ::

<ConfigurationSettings>

<ServerName>localhost</ServerName>

<SessionTimeout>3600</SessionTimeout>

<ConnectionPoolSize>10</ConnectionPoolSize>

<MinThreadPoolSize>1</MinThreadPoolSize>

<MaxThreadPoolSize>10</MaxThreadPoolSize>

<MaxThreadsPerClient>5</MaxThreadsPerClient>

</ConfigurationSettings>

However from perfmon as well as SQL profiler, when issuing multiple connections simultaneously using the above http method it will use the same connection Id, but create multiple ‘current user sessions’. Also the observed execution time was rather slow.

The alternative is to use the following

conn.ConnectionString = "Data Source=myASServer;Provider=msolap.3; initial catalog=myASDb"

which is observed to work correctly when we use multiple connection simultaneously and performs well.

However the issue I have with the above is where do I instantiate the above so that I can re-use the connection. I noticed in IIS we can configure application pooling.

A low level example would be greatly appreciated, if you don’t mind?

Thanks

John

|||

First you can try and increase the ConnectionPoolSize in the msmdpump.ini .

Creating a single connection and having it be reused across several sessions should have comparable or better performance to opening new TCP connections all the time.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

Monday, March 19, 2012

Connection Manager - variables

hello all,

I have a scenario where I like to reuse one project from one machine to another machine.

- Server name is variable.

- database name is variable

- table name is fixed.

How do I specify a variable name for "server name" and "database name" ?

Are you taking about Server/Database name of your Data Sources?

For that you can use package configurations storing those names in a table, xml file, etc

Rafael Salas

|||

You can select the connection manager then go to the properties pane to set the expression for these properties. In your case, you'd want to change the server name and initialcatalog properties, which are very common. You could set these to a variable of course like in your requirement and then additionally later use a configuration file to externalize this all.

Also, the same type of concepts in this video would help you as well: http://www.jumpstarttv.com/Media.aspx?vid=34

-- Brian Knight

connection issue with enterprise manager but works with management studio

Hi,

I have an interesting scenario.

I have a SQL Server 2000 Standard Edition instance running on Computer A. I'm trying to access it through computers B and C.

Computer B has Sql Server 2005 Express Edition installed and I was able to use its Management Studio and
connect to instance on Computer A.

Computer C has SQL Server 2000 Standard Edition installed. When I try to connect to the instance on Computer A,
I get connection failed message.

I checked some settings. Both TCP/IP and Named pipes are enabled on the instance in A. The TCP/IP port is set to 1433 for
both client and server.

Please give me some ideas as to how I can solve this problem.

-Thanks

What is the error message that is displayed?|||I am assuming all three are on the same network then it is a simple right click at the top of Management Studio and register the 2000 then it becomes local to you. I have registered 68 7/2000 in one box so it works . Hope this helps.|||

The error said something like

Invalid Connection.ConnetionOpen(Invalid Instance)

|||

I figured it out.

Both A and C had Sql Server 2000 instances. When you try to connect to one Sql Server 2000 instance from another, Enterprise Manager automatically sets "Dynamically determine port" option and hence the connection fails. What you can do is use the Client Network Utility in C and create a new TCP/IP alias and uncheck the "dynamically determine port" option and manually set it to 1433. Then u can use Enterprise Manager in C and select the new alias that you created and finish registering the 2000 instance from A.

Thanks for your replies.

|||

shiversticks:

I figured it out.

Both A and C had Sql Server 2000 instances. When you try to connect to one Sql Server 2000 instance from another, Enterprise Manager automatically sets "Dynamically determine port" option and hence the connection fails. What you can do is use the Client Network Utility in C and create a new TCP/IP alias and uncheck the "dynamically determine port" option and manually set it to 1433. Then u can use Enterprise Manager in C and select the new alias that you created and finish registering the 2000 instance from A.

Thanks for your replies.

(on the same network then it is a simple right click at the top of Management Studio and register the 2000 then it becomes local to you. I have registered 68 7/2000 in one box so it works )

For the reference of future readers of this thread you just right click and register the other SQL Server as I originally posted and leave your port setings alone in eigth years I have not had reason to touch port settings it is not needed. Port settings could lead to SQL injection attacks.

Sunday, March 11, 2012

connection going to sleep?

Ok, here's the scenario. On a Windows 2003 Server I have MSSQL 2000
installed. On another test server I have Windows 2003 server, IIS 6 and
Coldfusion installed. There has been an account created in SQL and assigned
permissions. My coldfusion web site makes multiple calls to the database
server using the account created. All is wonderful. Then, all of a sudden
I start getting connection problems (SQL STATE: HTY00). My web site cannot
connect using that account. I can still ping the SQL server from the
development server so I know thats not the problem. So I tried creating an
ODBC connection using that account. Same error. Sometimes resetting the
password in SQL works. A few days ago, however, I had to reboot the SQL
server and now everything is fine again, until the next time. Can anyone
explain to me why that user account seems to "goes to sleep" every few
days' There have been occasions when it's been fine for a week or two
but sooner or later, it will always do this!when you're dealing with connection problems it helps to do things like:
* try the connection from a different client
* check to see if you can connect from other accounts
* check to see if you can connect from a Windows and/or SQL authenticated
account
* check the SQL Server error logs for messages....
--
Brian Moran
Principal Mentor
Solid Quality Learning
SQL Server MVP
http://www.solidqualitylearning.com
"Steve" <StephenGL@.sabian.ca> wrote in message
news:5Lovb.33154$R13.985896@.ursa-nb00s0.nbnet.nb.ca...
> Ok, here's the scenario. On a Windows 2003 Server I have MSSQL 2000
> installed. On another test server I have Windows 2003 server, IIS 6 and
> Coldfusion installed. There has been an account created in SQL and
assigned
> permissions. My coldfusion web site makes multiple calls to the database
> server using the account created. All is wonderful. Then, all of a
sudden
> I start getting connection problems (SQL STATE: HTY00). My web site
cannot
> connect using that account. I can still ping the SQL server from the
> development server so I know thats not the problem. So I tried creating
an
> ODBC connection using that account. Same error. Sometimes resetting the
> password in SQL works. A few days ago, however, I had to reboot the SQL
> server and now everything is fine again, until the next time. Can anyone
> explain to me why that user account seems to "goes to sleep" every few
> days' There have been occasions when it's been fine for a week or two
> but sooner or later, it will always do this!
>

Thursday, March 8, 2012

Connection failure on standalone MSDE installtion when network is lost

Scenario -
On a standalone installation i.e client and SQL server are on same
machine, if network connection is lost while preparing SQL server
connection through client application, then SQL connection could not be
established. This was detected only on few machines. The configuration
details are:
OS : Windows 2000 SP 4 with MSDE
Error : MSVC exception occurred. This is not consistent. Some times it
throws error in sql server connectivity DLLs.Check local security policies on client machines that screw up. I had this
probelem recently.
<shridhargune@.hotmail.com> wrote in message
news:1122392145.762770.32950@.g49g2000cwa.googlegroups.com...
> Scenario -
> On a standalone installation i.e client and SQL server are on same
> machine, if network connection is lost while preparing SQL server
> connection through client application, then SQL connection could not be
> established. This was detected only on few machines. The configuration
> details are:
> OS : Windows 2000 SP 4 with MSDE
> Error : MSVC exception occurred. This is not consistent. Some times it
> throws error in sql server connectivity DLLs.
>

Connection failure on standalone MSDE installtion when network is lost

Scenario -
On a standalone installation i.e client and SQL server are on same
machine, if network connection is lost while preparing SQL server
connection through client application, then SQL connection could not be
established. This was detected only on few machines. The configuration
details are:
OS : Windows 2000 SP 4 with MSDE
Error : MSVC exception occurred. This is not consistent. Some times it
throws error in sql server connectivity DLLs.
Check local security policies on client machines that screw up. I had this
probelem recently.
<shridhargune@.hotmail.com> wrote in message
news:1122392145.762770.32950@.g49g2000cwa.googlegro ups.com...
> Scenario -
> On a standalone installation i.e client and SQL server are on same
> machine, if network connection is lost while preparing SQL server
> connection through client application, then SQL connection could not be
> established. This was detected only on few machines. The configuration
> details are:
> OS : Windows 2000 SP 4 with MSDE
> Error : MSVC exception occurred. This is not consistent. Some times it
> throws error in sql server connectivity DLLs.
>

Sunday, February 19, 2012

Connection between Principal and Mirror servers

Hi guys, right now I am facing this scenario several times and I wonder why it can be happen. Both SQL servers are in Enterprise SP1 edition. The mirroring setup can be work fine to me. Once my principal get attacking by DDOS, then mirroring session change the status to 'DISCONNECTED'. However, after DDOS attack solved and line connection gets back on the principal server, the mirroring session still remain to the status ('DISCONNECTED'). If I restart the SQL services on principal server or mirror server, then only the mirroring session change to 'SYNCHRONIZING' status. Does anyone faced this happen before? I need some assistance on it and hope able to get any explanation or solution from you guys. Thanx and have a nice day.

Best Regards,

Hans

Are the SQL server services set to BOOT or enabled to restart on the failure.

Also chekc the SQL server error log in this case.

Connection between OLAP cubes and underlying tables

I am new to SQL Server 2005 and have a simple question/scenario. I would like to use cubes to improve query performance. If I build OLAP cubes with Analysis Services, will SQL Server automatically pick the 'best' cube to resolve user queries to the underlying tables?

For example: A cube is created to sum up sales by month from a fact table (Sales_Fact) called Monthly_Sales.

The user enters the query: Select datepart(month, Sales_Date) from Sales_Fact group by datepart(month, Sales_Date) .

Will the Monthly_Sales cube used to resolve the query?

Thanks

Johnsoi

You are bit far off on the learning side Smile

To use Analysis Services to the most part you will need different client side applicaitons. The query language is different: it is MDX and not SQL.

Suggest you install SQL Server samples and go through tutorial see if you pick some of the concepts there.


HTH
Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Edward,

Thanks for the reply. So...it looks like SQL Server cannot rewrite queries (from Cognos, Crsytal, etc..) to use predefined OLAP cubes. I am looking for a way to add aggreagate tables (or other summarized objects) to our data warehouse and not require users to know of their existence. Is SQL Server 2005 aggregate aware?

Ike

|||

You are bit off again. Smile

SQL Server ships several components in it. One is Analysis Services that allows for creating multidimensional models (OLAP cubes you call it). Analysis Services allow access to the data stored in cubes using MDX query langage.

That is completely different from SQL query language. To access data in Analysis Services you can use serveral client tools. If you are just interested in reports, you can install Reporting Services and use it to access data in cubes.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.