Tuesday, March 20, 2012
Can I copy a local package
I'm looking for a way to copy a local package. I thought it would be fairly
straight forward with just a simple command, but that doesn't seems to be
the case. Does anyone of you know how it can be done - if it can?....
Regards
SteenHi,
In DTS window in enterprise manager, Save the DTS package as a Structured
Storage File.
After that you can copy package to the destination server.
- In DTS Designer, on the toolbar, click Save.
- In the Location list, click Structured Storage File.
- Complete the rest of the required fields.
You can later open them in another Server.
--
Thanks
Hari
MCDBA
"Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message
news:Os3PalPWEHA.1888@.TK2MSFTNGP11.phx.gbl...
> Hi
> I'm looking for a way to copy a local package. I thought it would be
fairly
> straight forward with just a simple command, but that doesn't seems to be
> the case. Does anyone of you know how it can be done - if it can?....
> Regards
> Steen
>|||Steen,
manually the simplest way is to open the package and save as a different
name, but to do this programatically is not straightforward - have a look at
this page for the posibilities available:
http://www.sqldts.com/default.aspx?204.
HTH,
Paul Ibison
Saturday, February 25, 2012
can anyone show me how to combine these two SQL queries into one
i have a fairly big SQL query that is used to display data into a datagrid. Each query grabs data from two seperate databases. Is there anyway to combine these queries into one so all the data appears in 1 datagrid and not 2.
here is the 1st query:
SQL = "SELECT sum(case when month(pb_report_shippers.shipper_date_time) = 1 then pb_report_shippers_lots.quantity else 0 end) as Jan ,sum(case when month(pb_report_shippers.shipper_date_time) = 2 then pb_report_shippers_lots.quantity else 0 end) as Feb ,sum(case when month(pb_report_shippers.shipper_date_time) = 3 then pb_report_shippers_lots.quantity else 0 end) as Mar ,sum(case when month(pb_report_shippers.shipper_date_time) = 4 then pb_report_shippers_lots.quantity else 0 end) as Apr ,sum(case when month(pb_report_shippers.shipper_date_time) = 5 then pb_report_shippers_lots.quantity else 0 end) as May ,sum(case when month(pb_report_shippers.shipper_date_time) = 6 then pb_report_shippers_lots.quantity else 0 end) as Jun ,sum(case when month(pb_report_shippers.shipper_date_time) = 7 then pb_report_shippers_lots.quantity else 0 end) as Jul ,sum(case when month(pb_report_shippers.shipper_date_time) = 8 then pb_report_shippers_lots.quantity else 0 end) as Aug ,sum(case when month(pb_report_shippers.shipper_date_time) = 9 then pb_report_shippers_lots.quantity else 0 end) as Sept ,sum(case when month(pb_report_shippers.shipper_date_time) = 10 then pb_report_shippers_lots.quantity else 0 end) as Oct ,sum(case when month(pb_report_shippers.shipper_date_time) = 11 then pb_report_shippers_lots.quantity else 0 end) as Nov ,sum(case when month(pb_report_shippers.shipper_date_time) = 12 then pb_report_shippers_lots.quantity else 0 end) as Dec FROM pb_customers INNER JOIN pb_jobs ON pb_customers.customer_id = pb_jobs.customer_id INNER JOIN pb_recipes_sub_recipes ON pb_jobs.recipe_id = pb_recipes_sub_recipes.recipe_id INNER JOIN pb_jobs_lots ON pb_jobs.job_id = pb_jobs_lots.job_id INNER JOIN pb_sub_recipes ON pb_recipes_sub_recipes.sub_recipe_id = pb_sub_recipes.sub_recipe_id INNER JOIN pb_report_shippers_lots ON pb_jobs_lots.intrack_lot_id = pb_report_shippers_lots.intrack_lot_id INNER JOIN pb_report_shippers ON pb_report_shippers_lots.job_id = pb_report_shippers.job_id AND pb_report_shippers_lots.shipper_id = pb_report_shippers.shipper_id WHERE pb_customers.customer_deleted <> 1 AND pb_jobs.job_deleted <> 1 AND pb_jobs_lots.lot_deleted <> 1 AND pb_report_shippers.shipper_date_time between cast('01/01/2003 00:01AM' as datetime) and cast('12/31/2003 23:59PM' as datetime)"
Here is the 2nd query:
SQL = "SELECT ISNULL(sum(case when month(nonconformance.nc_date) = 1 then nonconformance.nc_wafer_qty else 0 end),0) as Jan , ISNULL(sum(case when month(nonconformance.nc_date) = 2 then nonconformance.nc_wafer_qty else 0 end),0) as Feb ,ISNULL(sum(case when month(nonconformance.nc_date) = 3 then nonconformance.nc_wafer_qty else 0 end),0) as Mar ,ISNULL(sum(case when month(nonconformance.nc_date) = 4 then nonconformance.nc_wafer_qty else 0 end),0) as Apr , ISNULL(sum(case when month(nonconformance.nc_date) = 5 then nonconformance.nc_wafer_qty else 0 end),0) as May ,ISNULL(sum(case when month(nonconformance.nc_date) = 6 then nonconformance.nc_wafer_qty else 0 end),0) as Jun ,ISNULL(sum(case when month(nonconformance.nc_date) = 7 then nonconformance.nc_wafer_qty else 0 end),0) as Jul ,ISNULL(sum(case when month(nonconformance.nc_date) = 8 then nonconformance.nc_wafer_qty else 0 end),0) as Aug ,ISNULL(sum(case when month(nonconformance.nc_date) = 9 then nonconformance.nc_wafer_qty else 0 end),0) as Sept ,ISNULL(sum(case when month(nonconformance.nc_date) = 10 then nonconformance.nc_wafer_qty else 0 end),0) as Oct ,ISNULL(sum(case when month(nonconformance.nc_date) = 11 then nonconformance.nc_wafer_qty else 0 end),0) as Nov ,ISNULL(sum(case when month(nonconformance.nc_date) = 12 then nonconformance.nc_wafer_qty else 0 end),0) as Dec FROM nonconformance INNER JOIN nc_department on nonconformance.department_id = nc_department.department_id INNER JOIN nc_major_category ON nonconformance.major_category_id = nc_major_category.major_category_id AND nonconformance.status_id <> '5' WHERE nc_department.scrap_category = '1' AND nonconformance.nc_date between cast('01/01/2004 00:01AM' as datetime) and cast('12/31/2004 23:59PM' as datetime)"
I know there has to be someway to combine these into 1. The issue I have is they are in different databases.
ANY HELP would be appreciated.Hi, Andrew,
You may use union query to merge the two sql statements. Make sure they return the same number of columns. If not, add some dummy columns to make them equal(dummy column could be 0 or empty string '')
the issue of diffeent database can be resolved using sytax like
db_name..table_name.
Kind like fully qualified name:)
Take you first query as example: replace 'pb_customers' with 'DatabaseName..pb_customers'.
The query is too big. I am sorry I can't prototype it in my computer. You have to try youself. Let me know if got error message.
Good Luck
-David J.|||thanks figured it out.
Can anyone explain this processing schedule
Hi,
I have a fairly complicated cube which has:
74 Measure groups
Each measure group contains 12 partitions
= 888 partitions in my cube
I have a parameterized XMLA processing script that processes 2 partitions in each measure group - i.e. 148 partitions. It does this inside a <Parallel></Parallel> element.
When I executed the XMLA script I recorded the progress in Profiler. I saw that, prior to processing the 148 paritions, there was lots and lots of "Progress Report End" EventClass records with a message of:
Finished processing the '<partition name>' partition
There were actually 518 of these records so whatever it is doing, it is not doing it for every single partition. Note that most of the listed partitions were NOT specified in my XMLA processing script.
I also has a trace running against the underlying source data and can see that none of these events resulted in a query being fired against the source.
So, the question is fairly simple. Why am I seeing all these "Finished processing..." events for partitions that:
I never asked to be processed and
Don't result ina query against the source.
Any explanation would be most welcome.
Thanks
Jamie
P.S. The .trc file from tracing AS is 2.14MB. I can provide it if anyone is interested.
It is possible you are seeing Analysis Server as part of preparing to load new data, removing data from the partitions that are no longer valid.
It does that by internally issuing ProcessClear command. ProcessClear will generate ProgressReportBegin and ProgressReportEnd commands.
Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Edward Melomed wrote:
It is possible you are seeing Analysis Server as part of preparing to load new data, removing data from the partitions that are no longer valid.
It does that by internally issuing ProcessClear command. ProcessClear will generate ProgressReportBegin and ProgressReportEnd commands.
Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Thanks Edward but that doesn't yet explain what I am seeing.
In my scenario all the other partitions are perfectly valid. What circumstances might cause AS to think that data in those partitions was NOT valid and thus do a ProcessClear? if this is what IS happening then I am very worried.
Regards
|||
What does you processing command lists?
Does it list entire measure group or it lists individual partitions?
Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Edward Melomed wrote:
What does you processing command lists?
Does it list entire measure group or it lists individual partitions?
Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Partitions only!
It also does a processUpdate on all my dimensions.
-Jamie
|||
That explains it. ProcessUpdate on dimension will case Analysis Server to drop aggregations and indexes from your partitoins. These are the events you are seeing.
To learn more about what to expect during processing you can click on Impact Analysis button in the processing dialog.
Processing dialog sends a kind of "prepare" statement to the sever and recives back a rowset with all objects affected by the processing command.
Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Edward Melomed wrote:
That explains it. ProcessUpdate on dimension will case Analysis Server to drop aggregations and indexes from your partitoins. These are the events you are seeing.
To learn more about what to expect during processing you can click on Impact Analysis button in the processing dialog.
Processing dialog sends a kind of "prepare" statement to the sever and recives back a rowset with all objects affected by the processing command.
Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Edward,
I knew we'd get there in the end! :)
That's great service. Thank you very much.
-Jamie
|||
And I've done a small write-up here: https://blogs.conchango.com/jamiethomson/archive/2006/07/26/4272.aspx
-Jamie
|||
If I understand this correctly, we will lose aggregations on the cube when we do process update against dimensions.
I have a following scenario, what will happen in this case then? I loop through list of dimensions (16) and conduct process update by executing DDL statememt. Once I updated the dimensions I fully process 3 partitions (Current Fiscal Period, Current Fiscal Period-1, Current Fiscal Period-2) which we expect to get new / delta fact data.
I have got 7 years worth of history data loaded into the cube. Aggregations were built based on user reporting requirements.
Question is, will I lose aggregations all together, when I process update on dimensions every night?
Thanks
Sutha
|||
Yes, you might loose some of the aggregations.
For more information about the situation try and search for term "flexible aggregations".
In short: ProcessUpdate of the dimension allows you to move hierarcy member from one paren to another. For example JonD can change city from Seattle to Portland. If you allow such change in your dimension, Analysis Server needs to drop aggregation that sums up data across cities.
If you said that customer cannot move from one city to another by setting attribute relationship between customer attribute and city attribute as Rigid, Analysis Server will not drop aggregation going across the cities. So one way to treat this situation is to set all attribute relationsip types to Rigid across all dimensions.
Another solution is to use Process Add for dimension. This option only adds new members to dimension and can change some dimension member properties, but does not move member from parent to another. So Analysis Server doesnt need to touch aggregations in this case. To use Process Add you need to make sure you build a view restricting to only new members.
And your last option is to run Process Index command across all of your old partitions to make sure you build all aggregations.
Hope that helps.
Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Edward
Thanks. Yes it does help. One quick question though.
In my scenario, I have a measure group with multi billion rows, but I do process 3 partitions daily. Do I have to "Process Index" for those 3 partitions or for the measure group? If I understand you correctly, I need to do Process Index against the measure group not just those 3 partitions I have just processed.
Thanks
Sutha
Thursday, February 16, 2012
Can a DTS package be scripted or transferred to another server?
machine. There is a fairly complex DTS package on the original server
that is used to handle the weekly updates to the database.
Is there a way to export this DTS package in order to set it up on the
new machine as well?
Best Regards,
Warren Wright
Scorex Development Teamwarren.wright@.us.scorex.com (Warren Wright) wrote in message news:<8497c269.0307291200.68fe227b@.posting.google.com>...
> I have production SQL Server database that must be moved to a new
> machine. There is a fairly complex DTS package on the original server
> that is used to handle the weekly updates to the database.
> Is there a way to export this DTS package in order to set it up on the
> new machine as well?
> Best Regards,
> Warren Wright
> Scorex Development Team
http://www.sqldts.com/default.aspx?6,105,204,0,1
The June issue of SQL Server magazine (http://www.sqlmag.com) had a
good article on making DTS packages portable between servers.
Simon|||warren.wright@.us.scorex.com (Warren Wright) wrote in message news:<8497c269.0307291200.68fe227b@.posting.google.com>...
> I have production SQL Server database that must be moved to a new
> machine. There is a fairly complex DTS package on the original server
> that is used to handle the weekly updates to the database.
> Is there a way to export this DTS package in order to set it up on the
> new machine as well?
> Best Regards,
> Warren Wright
> Scorex Development Team
You can, when designing the DTS Package, select "Save As..." and
change the "location" to a structured storage file. You can then
import this file onto your production server. If you scripted all
your local connections as "(local)", then this should be the end of
the story, if not, you'll need to open it and change your local
connections to the production server.
Hope this helps
Hodge|||Warren
Try this link.
http://www.sqldts.com/default.aspx?6,105,204,0,1
Hope that helps
John