Showing posts with label based. Show all posts
Showing posts with label based. Show all posts

Wednesday, March 28, 2012

Read Timeout

Hi Friends,

I have the text file in my server which is 21 MB size.

i want to insert that text file into temporary table and then based on the conditions will insert the original table.
But before inserting all the records in temporary table, i got the below error message but the backend process still running(inserting into temp table)

The following error was encountered:Read Timeout

The system returned:

 [No Error]

A Timeout occurred while waiting to read data from the network. The network or server may be down or congested. Please retry your request.

I am using the following code configuration section

<

sessionStatetimeout="600" />

<

httpRuntime

executionTimeout="110"

maxRequestLength="21504"

requestLengthDiskThreshold="80"

useFullyQualifiedRedirectUrl="false"

minFreeThreads="8"

minLocalRequestFreeThreads="4"

appRequestQueueLimit="5000"

enableKernelOutputCache="true"

enableVersionHeader="true"

requireRootedSaveAsPath="true"

enable="true"

shutdownTimeout="90"

delayNotificationTimeout="5"

waitChangeNotification="0"

maxWaitChangeNotification="0"

enableHeaderChecking="true"

sendCacheControlHeader="true"

apartmentThreading="false" />

How to implement the page keep active while all the records are inserted into DB?

If you are using AJAX, you could add an AJAX Timer to show the progress

Friday, March 23, 2012

Read MS SQL 2000 backup file without restoring the database

I want to read certain data from the backup file of MS SQL 2000 without restoring the database backup file. Based on the data selected I will manage the further functionality such as restoration of the backup file.
Is it possible to read some data from MS SQL 2000 backup file without restoring? If yes then please let me know how?
I don't think you can read the data without restoring the backup file...................also you need to restore the entire backup file and after restoring it you can choose the data you need..........may be if you already have a db take a backup before restoring from the backup (overwrite) and then choose your data and if needed you can export it and then once again restore the original backup of the db...........|||

Just to be clear, you definitely can't directly read from a backup file.

|||hmmmm.....Ok, is it possible that I can restore only one table from my MS SQL backup file to some other temp db? Which will help me to get the required value from that table.
|||you can restore your backup file as a entire db and then export the required table to another db in the same server or in another server ...
|||

No - you can only restore a complete database. Restoring a single table is a commonly requested feature - it's not included in SQL Server 2008 but may make it into the following version.

Thanks

Read MS SQL 2000 backup file without restoring the database

I want to read certain data from the backup file of MS SQL 2000 without restoring the database backup file. Based on the data selected I will manage the further functionality such as restoration of the backup file.
Is it possible to read some data from MS SQL 2000 backup file without restoring? If yes then please let me know how?
I don't think you can read the data without restoring the backup file...................also you need to restore the entire backup file and after restoring it you can choose the data you need..........may be if you already have a db take a backup before restoring from the backup (overwrite) and then choose your data and if needed you can export it and then once again restore the original backup of the db...........|||

Just to be clear, you definitely can't directly read from a backup file.

|||hmmmm.....Ok, is it possible that I can restore only one table from my MS SQL backup file to some other temp db? Which will help me to get the required value from that table.
|||you can restore your backup file as a entire db and then export the required table to another db in the same server or in another server ...
|||

No - you can only restore a complete database. Restoring a single table is a commonly requested feature - it's not included in SQL Server 2008 but may make it into the following version.

Thanks

sql

Monday, March 12, 2012

RDLC vs RDL Revisited

I have searched the archive of this forum, and based on some previous answers have read the followin FAQ

http://www.gotreportviewer.com/

However, even so, I still have a questoin about when to use RDLC vs RDL from the point of view of licensing and load sharing betwee DB and report server.

1. As we all know that SSRS will take a license of SQL Server if the web service is deployed on any other machine other than SQL Server (which is normally the case because no serious DBA will allow IIS apps to be installed on the DB Server). Also, if the SSRS is deployed on NLB cluster then each node of the cluster would need a "SQL Enterprise" license. (which can be very expensive).

2. Co deploying the SSRS with SQL Server is a bad idea because it puts excessive load on the DB+Report Server.

3. Since there is no "load balancing" in SQL all the rendering has to be done by the SSRS service which is running on the DB Server.

Now compare this to RDLC

1. RDLC gives me the same engine as RDL

2. However it has no licensing tags to it.

3. I can deploy ASP.NET report viewer on my web farm and scale it out as much as I like.

4. Extract data from the DB using stored procedures.

So it seems that RDLC solution is cheaper, gives better scale out capabilities and also moves the rendering of reports on the web farm rather than the Report Server.

Why should me or anyone else choose RDL at all?

There seems to be one disadvantage that the data has to fetched programmatically and manually binded (like an ASP.NET app) as RDLC does not provide any feature to connect to data sources. But this is not much when you see the cost and scalability benefits.

regards,

Abhishek.

bump!|||You have some great reasons for using RDLC.

A few off the top-of-my-head advantages for using RDL rather than RDLC.

1. Subscriptions
2. Caching / Snapshots
3. Role Based security
4. "My Reports"
5. Configuration / Definitions stored in Report Catalog DB
6. Additional rendering formats
7. Sharepoint webparts integration

Without a doubt you can implement similar functionality in your application hosting the RDLC, but these are out of the box when you're using the report server.

I have had several clients start out heading down the road of wanting to use RDLC to avoid the licensing fees. In the end, they all ended up using the report server. There's no one size fits all solution and in many cases, RDLC would be a valuable choice.

Hope this helps.|||

Thanks, I also found information on the MSDN site.

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

regards,

Abhishek.

Monday, February 20, 2012

Ratio Calculation based on calculations from two different dimensions

I am trying to come up with a way to calculate a ratio that is based on the values from two different dimension calculations. The values are based on how a person responded to a question on a survey. I have one calculation that I can get with the following MDX statement:

select {Measures.[Brand Usage Last Try 2-6]} on columns,

non empty([brand usage].[brand label].children) on rows

from cube

RESULTS:

Brand Usage Last Try 2-6

Brand 1

164.277

Brand 2

208.513

Brand 3

131.193

(The [Brand Usage Last Try 2-6] measure is the Measures.Weight aggregate calculation for people that responded with a value from 2 to 6 for a particular brand).

The second calculation is the following:

with member measures.hrd as ([Brand Awareness].[VarResponse].[Var3].&[hrd].&[heard_of_brand], [Measures].[Weight])

select {measures.hrd} on columns,

non empty([brand awareness].[brand label].children) on rows

from cube

RESULTS:

hrd

Brand 1

301.601

Brand 2

462.385

Brand 3

361.533

I need to be able to take the calculation from the first one and divide it by the value for the second calculation based on brand. I tried using the linkmember to retrieve the values based on the brand, but it is not returning the results that I expected.

with member measures.hrd as ([Brand Awareness].[VarResponse].[Var3].&[hrd].&[heard_of_brand], [Measures].[Weight])

member measures.hrdlnk as (measures.hrd, linkmember([Brand Usage].[Brand Label].currentmember,[Brand Awareness].[Brand Label]))

member measures.ratio as (iif(measures.hrdlnk > 0, measures.[brand usage last try 2-6]/measures.hrdlnk, null)*100)

select {measures.[Brand Usage Last Try 2-6], measures.hrd, measures.hrdlnk,

measures.ratio} on columns,

non empty([brand usage].[brand label].children) on rows

from cube

RESULTS:

Brand Usage Last Try 2-6

hrd

ratio

Brand 1

164.277

301.601

54.47

Brand 2

208.513

(null)

(null)

Brand 3

131.193

271.332

48.35

Somehow the first brand ratio calculation comes out right, but that is the only one. Both of these dimensions reference a brand dimension. Each dimension, [Brand Awareness] and [Brand Usage], contain questions and potential responses for each type of brand in the brand dimension. Both dimensions have a hierarchy that I created [VarResponse] in them that is based on the type of question [Var3] (which is the first three characters of the Variable name) and then the response [Category Name].

"Both of these dimensions reference a brand dimension. Each dimension, [Brand Awareness] and [Brand Usage], contain questions and potential responses for each type of brand in the brand dimension." - could you explain how dimension usage is configured for the cube, in terms of these 3 dimensions and the [Measures].[Weight] measure group? Assuming that [Brand] has a regular relation to the fact table, and that [Brand Awareness] and [Brand Usage] each has a many-to-many relation to the measure group, there may be unintended interaction when computing hrdlnk, so try this:

member measures.hrdlnk as (measures.hrd, linkmember([Brand Usage].[Brand Label].currentmember, [Brand Awareness].[Brand Label]), [Brand Usage].[Brand Label].[All])

|||

This calculation did work and produced the results that I was looking for, thank you so much.

In regards to the configuration, the brand table is linked to each of the dimension tables, awareness and usage. The brand table does not directly relate to the fact table. The dimension tables, awareness and usage have a regular relationship to the fact table and they both have a key designated in the table. This is how it is currently configured.

Brand (Brand_ID) -->Brand Awareness (Brand_Awareness_ID, Brand_ID)

-->Brand Usage(Brand_Usage_ID, Brand_ID)

-->Fact Table(Date_ID, Respondent_ID, Brand_Awareness_ID, Brand_Usage_ID)

The granularity within the fact table is not what I am typically used to, so this is kind of an odd setup.