Showing posts with label system. Show all posts
Showing posts with label system. Show all posts

Thursday, March 29, 2012

Cursor versus While Loop

I have always been told that Cursors create a lot of overhead and consume a lot of system resources. Is it faster to store the data in a temp table and loop through it by using Select Top 1 and Delete statements or by using a static, Forward-Only Cursor? Both ways store the data in TempDB, but doesn't the While Loop statement generate more IO's than the Cursor? In theory, I am thinking that the Cursor is better. Any info will be appreciated.

Thanks!!The short answer boils down to both options are bad, and you are correct that the WHILE/SELECT/DELETE choice is even worse than the cursor.

More than 99 percent of the time there is a set-based solution that is hundreds or thousands of times faster/better than any loop can be, so the set based solution is what should be your "holy grail". Fix the problem instead of trying to find ways to make the loop less of an annoyance!

-PatP|||Why don't you post what it is you're trying to dosql

Thursday, March 8, 2012

Cumalative %

Hi there, i am having some problems with a Crystal Report. I have created a report showing the duration of calls within a HEAT System. The calls are grouped into the below areas:

Under 4 Hours
Under 8 Hours
Under 2 Days
Under 3 Days

What is required is the following:

Duration of Call(Group) Number of Calls Cumalative %

Under 4 Hours 300 30% Calc(300/1000)
Under 8 Hours 300 60% Calc(600/1000)
Under 2 Days 100 70% Calc(700/1000)
Under 3 Days 300 100% Calc(1000/1000)

Total Calls 1000

I don't know how to achieve this in a Grouped report in Crystal - what would i use in a formula to do this?

Any help would be greatly received.

Regards

TimI think you want the PercentOfCount function, e.g.

PercentOfSum (call, inner, outer)

So if your report were grouped on, say,
1) Call centre
2) Duration

You would want: PercentOfSum(call, duration, centre)

Anyway, read the help on the PercentOf... functions.|||Sorry, I kept writing PercentOfSum instead of PercentOfCount

Culture problem with datepicker in report parameters

Hi,
on the server of a customer I determined the following problem: The customer
installed an English operating system (Windows server 2003) with English SQL
server 2005. I go from a German Client on a report about http://
<servername>/reports (report managers) to calendars in the report parameters
with German format of date as expected there. So far, so well. I turn into
however http:// more <servername>/reportserver on report, are indicated now
everything correctly in the report parameters on German represented indicate
(Tooltips, "Bericht anzeigen" (show report). etc.), only the calendar
strangely enough is in the English format of date. I have tested the same
configuration (likewise with English operating system and English Sql
server; german Client) on a virtual server, and can not reproduce the
problem here. Someone an idea, why I do not get the calendar at the customer
in accordance with the language settings of the client as expected?
Thanks and regards,
StefanHello Stefan,
I would like to know what's the server Regional Setting.
Also, please applied the latest service pack to your server and let me know
the result.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hello Wei Lu,
the Regional Setting of the Server is German.
I will ask the customer, if they have installed the latest service pack. As
far as I know, they have installed SP2.
Thanks and regards,
Stefan Dirks
"Wei Lu [MSFT]" <weilu@.online.microsoft.com> schrieb im Newsbeitrag
news:PsMLICbnHHA.1140@.TK2MSFTNGHUB02.phx.gbl...
> Hello Stefan,
> I would like to know what's the server Regional Setting.
> Also, please applied the latest service pack to your server and let me
> know
> the result.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>|||Hi ,
How is everything going? Please feel free to let me know if you need any
assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi Wei Lu,
the customer has installed SQL Reporting Services Version 9.00.3042.00.
It's strange that every reporting parameter (e.g. Tooltip) is in german
except for the calendar. Is there a possibility to set the
calendar-parameter explicit to german?
I tried to set the default language of the Reports to german/User!Language
but with no effect.
Thanks Stefan
"Wei Lu [MSFT]" <weilu@.online.microsoft.com> schrieb im Newsbeitrag
news:6tvedcQoHHA.5168@.TK2MSFTNGHUB02.phx.gbl...
> Hi ,
> How is everything going? Please feel free to let me know if you need any
> assistance.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>|||Hello Stefan,
This is a known issue in the reporting Services SP2. Product team is still
working on it. I will inform you the update if any progress.
Thank you!
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi Wei Lu,
thanks for this information. I use in the meantime a ReportViewer on a
aspx-Site as a workaround.
Thanks,
Stefan
"Wei Lu [MSFT]" <weilu@.online.microsoft.com> schrieb im Newsbeitrag
news:39vfU9ooHHA.1428@.TK2MSFTNGHUB02.phx.gbl...
> Hello Stefan,
> This is a known issue in the reporting Services SP2. Product team is still
> working on it. I will inform you the update if any progress.
> Thank you!
>
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>

Wednesday, March 7, 2012

Cube process problem. Urgent

Hi,

After I changed password for my machine, the cubes process

got system error: “ The following system error occurred:Logon failure: unknown user name or bad

password. “ We have 10 more cubes and still can browse the cubes but no any cube

can processes now.

Before I changed password, everything is working.

We use ‘Windows

Authentication’ for SQL server 2005 Database and Analysis Service.

Anyone can help this problem?

Thanks.

Hello! Check this. Open the cube project in BIDS and change the impersonation mode to default in the data connection.

HTH

Thomas Ivarsson

|||

Hi,

If by any chance that does not work,

set specific credentials for the username and password in the impersonation mode tab.

Also, as a secondary check, see if the user has process permissions.

Regards

Vijay R

|||It sounds like the SSAS service on the server may be set up to use your account. Jump on to the server and check the account credentials using the SQL Server Configuration Manager application. If the service is running under your user account you will either need to update the password or preferrably set up an account for the SSAS service.|||Thank you very much Thomas and Vijay for replaying my email.

I changed the impersonation mode to default then processing works.

Thanks a lot.


Friday, February 24, 2012

Cube back up

dear all
i have a list of 7 cubes on the production server and i intend to bring the back up of 1 cube to my local system(w/o data,just the structure).I took the xmla file by scripting that respective cube and brought that xmla file to my local system. tell me wat i need to do to restore this xmla file to get the structure of my cube

Cheers
sid

If you just need the structure I would suggest scripting the whole database and then running the script on your local server and deleting any cubes that you don't need. This is because you need to have a database to script the cube into and you need to bring the dsv, data sources and database dimensions along so that the cube will work.

I've been playing with a Powershell script to generate the xmla script for a single cube and all the dependant objects, but it's not quite finished. For the time being I would say to go with scripting the whole database and deleting what you don't need later.

Tuesday, February 14, 2012

CSDVersion key for Service Pack

I was looking up the changes in SP3 and SP3a, and basically the ways to
identify the service pack is installed on the system. In one of the
references I found that the CSDVersion key under
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\ MSSQLServer\CurrentVersion
has changed.
I wanted to know whether the CSDVersion key changes with every service pack
release.
From what I have heard, that is not a reliable measure.
"Harshal" <Harshal@.discussions.microsoft.com> wrote in message
news:AAE3B70A-AEDE-4350-B872-D44697DD759F@.microsoft.com...
> I was looking up the changes in SP3 and SP3a, and basically the ways to
> identify the service pack is installed on the system. In one of the
> references I found that the CSDVersion key under
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\ MSSQLServer\CurrentVersion
> has changed.
> I wanted to know whether the CSDVersion key changes with every service
> pack
> release.

CSDVersion key for Service Pack

I was looking up the changes in SP3 and SP3a, and basically the ways to
identify the service pack is installed on the system. In one of the
references I found that the CSDVersion key under
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\CurrentVersion
has changed.
I wanted to know whether the CSDVersion key changes with every service pack
release.From what I have heard, that is not a reliable measure.
"Harshal" <Harshal@.discussions.microsoft.com> wrote in message
news:AAE3B70A-AEDE-4350-B872-D44697DD759F@.microsoft.com...
> I was looking up the changes in SP3 and SP3a, and basically the ways to
> identify the service pack is installed on the system. In one of the
> references I found that the CSDVersion key under
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\CurrentVersion
> has changed.
> I wanted to know whether the CSDVersion key changes with every service
> pack
> release.

CSDVersion key for Service Pack

I was looking up the changes in SP3 and SP3a, and basically the ways to
identify the service pack is installed on the system. In one of the
references I found that the CSDVersion key under
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MS
SQLServer\MSSQLServer\CurrentVersion
has changed.
I wanted to know whether the CSDVersion key changes with every service pack
release.From what I have heard, that is not a reliable measure.
"Harshal" <Harshal@.discussions.microsoft.com> wrote in message
news:AAE3B70A-AEDE-4350-B872-D44697DD759F@.microsoft.com...
> I was looking up the changes in SP3 and SP3a, and basically the ways to
> identify the service pack is installed on the system. In one of the
> references I found that the CSDVersion key under
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MS
SQLServer\MSSQLServer\CurrentVersi
on
> has changed.
> I wanted to know whether the CSDVersion key changes with every service
> pack
> release.