Thursday, March 29, 2012
Data File Used Space
the "Log file(s) Used sizes (KB)".
I would like to determine the "Database file(s) Used Sizes (KB)".
How can I determine this value?
Thank You,Lookup the usage and details of the system procedure sp_spaceused in SQL
Server Books Online.
Anith
Wednesday, March 7, 2012
data being repeated.
Hello, I have merged a master and detail tables into a fact table in order to create a cube, the master table let's say it's a sales table, and the detail the products of the sale, I merged both tables into a single fact table, so the data for one sale is being repeated once for each detail, this is the way I want. So if my sale has a total, let's say $100, and the detail has 3 products, when I visualize the cube the total for the sale is $300, and obviously this is incorrect, and let's say too, if there are many sales with different totals and differents details, the calculation can not be a simple MAX function or AVG, so, somebody know how I can show the data as I want?
Thanks in advance!
odin_dark@.yahoo.com.mx
If you're using AS 2005, you could consider the new many-many dimension feature:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql90/html/sql2k5snapshotisol.asp
>>
Many-to-Many Dimensions in Analysis Services 2005
Richard Tkachuk
Microsoft Corporation
June 2005
Applies to:
Microsoft SQL Server 2005 Analysis Services
Summary: See an example of using the Many-to-Many dimension in SQL Server 2005 Analysis Services to analyze sales data, and get ideas for other uses such as treating medical conditions, software testing, and more.
>>
There is an example, in Adventure Works, where Sales Reason relates to Internet Sales as a many-many dimension, via the intermediate measure group: Sales Reasons.
So, in your case, the main measure group could be based on the master table, and the intermediate measure group could be based on the detail table. And dimensions like Product, which relate directly to the detail table, could be configured as many-many dimensions. In your example of $100 total sale (on the main measure group), $100 would be attributed to each of the 3 individual products, but the contribution at the All Product level should still be $100, not $300.
|||Hi,
U can u many to many concept.But this can be solved if u proper joins while joining the table.
Some time the relation between the table is not set properly which result in repeated data.
from
Sufian
|||Hello all, thanks for your reply, unfortunately I'm using analysis services 2000, so is there another way?
and.. wich kind of joins are u talking about, because I want the data to be repeated in the fact table to improve performance, but in the cube I want to fiter this data correctly.
thanks in advance!
|||Hi,
By repeting the data in the fact table will not increase the performance but it will effect the performance in negative way.
When the cube is processed the it will take more time and more space to store ur aggregates and data.
I am talkin about the joins between the facttable and dimension table.
Some time when u create the cube through desing view analysis services creates the join where it fines refrence of relation keys.
HTH
from
Sufian
|||Unfortunately, I don't know of any way to achieve exactly what you want with AS 2000. In master-detail scenarios, I typically set up separate fact tables and cubes for the master and detail, but combined them in a virtual cube. Still, I had separate measures from the 2 cubes.|||I've already tried using separate fact tables and combining them into a virtual cube, but I do need the measures "united", not separated, because, how I can know to which "master" registry corresponds the "details" registries?
|||thanks all!, but I'm still having the problem, mohd sufian could you please send me an example about the joins between tables you're talking about? because i think i have the proper joins but the data is being repeated..
thanks in advance!
|||Dear ,
In SSAS2005 can have more then one fact table.
So when u going the fact table with the dimension table .The join shoud be Facttable primary key is used as a refrence key in the dimension table.
The same methord is applied in all.
In this way AS will not repeat the data .
HTH
Regards
Sufian
data being repeated.
Hello, I have merged a master and detail tables into a fact table in order to create a cube, the master table let's say it's a sales table, and the detail the products of the sale, I merged both tables into a single fact table, so the data for one sale is being repeated once for each detail, this is the way I want. So if my sale has a total, let's say $100, and the detail has 3 products, when I visualize the cube the total for the sale is $300, and obviously this is incorrect, and let's say too, if there are many sales with different totals and differents details, the calculation can not be a simple MAX function or AVG, so, somebody know how I can show the data as I want?
Thanks in advance!
odin_dark@.yahoo.com.mx
If you're using AS 2005, you could consider the new many-many dimension feature:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql90/html/sql2k5snapshotisol.asp
>>
Many-to-Many Dimensions in Analysis Services 2005
Richard Tkachuk
Microsoft Corporation
June 2005
Applies to:
Microsoft SQL Server 2005 Analysis Services
Summary: See an example of using the Many-to-Many dimension in SQL Server 2005 Analysis Services to analyze sales data, and get ideas for other uses such as treating medical conditions, software testing, and more.
>>
There is an example, in Adventure Works, where Sales Reason relates to Internet Sales as a many-many dimension, via the intermediate measure group: Sales Reasons.
So, in your case, the main measure group could be based on the master table, and the intermediate measure group could be based on the detail table. And dimensions like Product, which relate directly to the detail table, could be configured as many-many dimensions. In your example of $100 total sale (on the main measure group), $100 would be attributed to each of the 3 individual products, but the contribution at the All Product level should still be $100, not $300.
|||Hi,
U can u many to many concept.But this can be solved if u proper joins while joining the table.
Some time the relation between the table is not set properly which result in repeated data.
from
Sufian
|||Hello all, thanks for your reply, unfortunately I'm using analysis services 2000, so is there another way?
and.. wich kind of joins are u talking about, because I want the data to be repeated in the fact table to improve performance, but in the cube I want to fiter this data correctly.
thanks in advance!
|||Hi,
By repeting the data in the fact table will not increase the performance but it will effect the performance in negative way.
When the cube is processed the it will take more time and more space to store ur aggregates and data.
I am talkin about the joins between the facttable and dimension table.
Some time when u create the cube through desing view analysis services creates the join where it fines refrence of relation keys.
HTH
from
Sufian
|||Unfortunately, I don't know of any way to achieve exactly what you want with AS 2000. In master-detail scenarios, I typically set up separate fact tables and cubes for the master and detail, but combined them in a virtual cube. Still, I had separate measures from the 2 cubes.|||I've already tried using separate fact tables and combining them into a virtual cube, but I do need the measures "united", not separated, because, how I can know to which "master" registry corresponds the "details" registries?
|||
thanks all!, but I'm still having the problem, mohd sufian could you please send me an example about the joins between tables you're talking about? because i think i have the proper joins but the data is being repeated..
thanks in advance!
|||Dear ,
In SSAS2005 can have more then one fact table.
So when u going the fact table with the dimension table .The join shoud be Facttable primary key is used as a refrence key in the dimension table.
The same methord is applied in all.
In this way AS will not repeat the data .
HTH
Regards
Sufian
Sunday, February 19, 2012
Daily Backup of System Databases
if I just backup both Master and MSDB databases ?
For weekly backup, I have included the Master, MSDB and Model one.
ThanksI think it would be easier and simpler to include also model on the daily
backup. Usually model is very small.
Ben Nevarez, MCDBA, OCP
"Jason" <Jason@.discussions.microsoft.com> wrote in message
news:ODldhbk8FHA.3416@.TK2MSFTNGP15.phx.gbl...
>I would like to know for daily backup of the system databases, is it
>suffice if I just backup both Master and MSDB databases ?
> For weekly backup, I have included the Master, MSDB and Model one.
> Thanks
>|||Thank you for your advice.
I would like to know when do we change / customize the model database ?
Thanks
"Ben Nevarez" <bnevarez@.sjm.com> wrote in message
news:evUfWnk8FHA.3388@.TK2MSFTNGP11.phx.gbl...
> I think it would be easier and simpler to include also model on the daily
> backup. Usually model is very small.
> Ben Nevarez, MCDBA, OCP
>
> "Jason" <Jason@.discussions.microsoft.com> wrote in message
> news:ODldhbk8FHA.3416@.TK2MSFTNGP15.phx.gbl...
>
Daily Backup of System Databases
if I just backup both Master and MSDB databases ?
For weekly backup, I have included the Master, MSDB and Model one.
Thanks
I think it would be easier and simpler to include also model on the daily
backup. Usually model is very small.
Ben Nevarez, MCDBA, OCP
"Jason" <Jason@.discussions.microsoft.com> wrote in message
news:ODldhbk8FHA.3416@.TK2MSFTNGP15.phx.gbl...
>I would like to know for daily backup of the system databases, is it
>suffice if I just backup both Master and MSDB databases ?
> For weekly backup, I have included the Master, MSDB and Model one.
> Thanks
>
|||Thank you for your advice.
I would like to know when do we change / customize the model database ?
Thanks
"Ben Nevarez" <bnevarez@.sjm.com> wrote in message
news:evUfWnk8FHA.3388@.TK2MSFTNGP11.phx.gbl...
> I think it would be easier and simpler to include also model on the daily
> backup. Usually model is very small.
> Ben Nevarez, MCDBA, OCP
>
> "Jason" <Jason@.discussions.microsoft.com> wrote in message
> news:ODldhbk8FHA.3416@.TK2MSFTNGP15.phx.gbl...
>
Daily Backup of System Databases
if I just backup both Master and MSDB databases ?
For weekly backup, I have included the Master, MSDB and Model one.
ThanksI think it would be easier and simpler to include also model on the daily
backup. Usually model is very small.
Ben Nevarez, MCDBA, OCP
"Jason" <Jason@.discussions.microsoft.com> wrote in message
news:ODldhbk8FHA.3416@.TK2MSFTNGP15.phx.gbl...
>I would like to know for daily backup of the system databases, is it
>suffice if I just backup both Master and MSDB databases ?
> For weekly backup, I have included the Master, MSDB and Model one.
> Thanks
>|||Thank you for your advice.
I would like to know when do we change / customize the model database ?
Thanks
"Ben Nevarez" <bnevarez@.sjm.com> wrote in message
news:evUfWnk8FHA.3388@.TK2MSFTNGP11.phx.gbl...
> I think it would be easier and simpler to include also model on the daily
> backup. Usually model is very small.
> Ben Nevarez, MCDBA, OCP
>
> "Jason" <Jason@.discussions.microsoft.com> wrote in message
> news:ODldhbk8FHA.3416@.TK2MSFTNGP15.phx.gbl...
>>I would like to know for daily backup of the system databases, is it
>>suffice if I just backup both Master and MSDB databases ?
>> For weekly backup, I have included the Master, MSDB and Model one.
>> Thanks
>
dafult database is not master
I'm a c# programmer and a SQL Server 2005 newby so...be gentle with me !
Here is my problem. I used to log on my computer with login A. while using this login, I've created a couple of databases on SQL SERVER Express with SQLServer managment studio express (FolkTaleDb, AdventureWork, etc...). One day, the ITManager changed my login access to my computer to LoginB (for some reason, LoginA is still activ in ActivDirectory so I can still use it). With that new login, I've only created one new database called TestSpatial. Well now, when I connect to SQLServer without explicitly mentionning the initial catalog in the connectionstring (I connect from my VS application), the default database is master when logged as LoginA, but TestSpatial when logged as LoginB ! I have to type explicitly 'master' (in my connectionstring) in order to connect to master instead of TestSpatial. How can I sort this out ?
Any help is welcomed !
David HILPIPRESue either the GUI to change your default database or the command sp_defaultdb.
Jens K. Suessmeyer:
http://www.sqlserver2005.de
Friday, February 17, 2012
Cycling Through Subreports
I have a master report which contains several subreports. My end users want these reports to cycle through for a list of clients in a loop. So, for example, given a list of three clients, the users want to see all subreports run for client 1, then all subreports run for client 2, then all subreports run for client3. (I hope this is making sense)
Currently the report uses an "in" statement so the users get subreport 1 for clients 1, 2, and 3, followed by subreport 2 for clients 1, 2, and 3, etc., which is not what they want.
I've tried placing the subreports inside a table and creating a group, but that just seems to crash the Report Designer.
Is there any to create a loop outside of the report that will call the report once for each client? Or is there some other way I can get it to run the subreports one client at a time?
Any help would be greatly appreciated.
Creating a group by client and putting the subreports inside of the group should be the right way of doing it. I'm not sure why the designer crashes when you are doing this using a table. But you can also try using a list instead.