Friday, March 30, 2012
Proprties not imported with Table
Look at DTS transfer Database Task option
Or better yet, script the objects then build them...I prefer this method, and use bcp|||Originally posted by joejcheng
If you use DTS, make usre you use the Copy object(s) instead of Copy table(s) option.
The copy object worked ... Thanks
Monday, March 26, 2012
Proper use of Event Notifications
Hi.
I'm developing an app that uses Service Broker queues to allow a customer to create "events" that fire using a timer or a query notification. When these events fire, a message is sent to a Service Broker queue for processing. Because there is much managed code involved in processing these messages, I decided to use the External Activator application and an Event Notification to process these messages. My question is "what is the difference between using the External Activator application to launch another application (which simply RECEIVEs a message from the target queue and processes it) and creating a windows service that simply monitors the target queue (with a WAITFOR = -1 clause) and processes it?"
I guess I'm not sure how using the QUEUE_ACTIVATION Event Notification is really helping me.
Thanks,
Chris
If all you need is a single instance of your service and don't mind it running all the time, you could implement this as a Windows Service that does a WAITFOR with no timeout. But if you want multiple instances of your service to be dynamically activated depending on the rate of incoming messages and how quickly your service is able to consume them, the external activator becomes useful. The main purpose of the external activator is to make services scalable.
The external activator is also capable of monitoring multiple queues, each configured with its own service program. So if you had 10 services, you do not need to have 10 windows services running even when queues are idle. You will have a single external activator running which will dynamically launch the service programs as messages arrive.
Hope that helps,
Rushi
|||Rushi,
After doing some more digging into the External Activator, I understand more clearly now. It seems that the scalability benefits are the real key for us. That and doing a WAITFOR with an indefinite timeout isn't so easy in a Windows Service.
Thanks,
Chris
|||The external activator does some of the hard things, like maintaining a recovery log so that if the process was to terminate and it came back up, it would recover state and not miss any notifications thus ensuring that queued messages do not get orphaned.Friday, March 23, 2012
Prompting a User ID and Pwd
I am developing reports using Reporting Server.With these reports i am
going to run in ASP.Net, but its prompting SQL Server User ID and Password.
Can any one knows the solution for without prompting the User ID and Password.
Is this Possible?
Regards,
Mallihi,
while creating the Data source , in the credentials give
ur sqlserver database username and passwork. and chk the
button allow saving password. then it will not ask u for
any password
>--Original Message--
>Hi,
> I am developing reports using Reporting Server.With
these reports i am
>going to run in ASP.Net, but its prompting SQL Server
User ID and Password.
>Can any one knows the solution for without prompting the
User ID and Password.
>Is this Possible?
>Regards,
>Malli
>
>.
>|||Hi,
I tried as you said, but its not working.whenever i am running the report
in browser it prompts user id and password.can you give me the solution.
Thanking you.
Regards,
Malli.
"anonymous@.discussions.microsoft.com" wrote:
> hi,
> while creating the Data source , in the credentials give
> ur sqlserver database username and passwork. and chk the
> button allow saving password. then it will not ask u for
> any password
> >--Original Message--
> >Hi,
> > I am developing reports using Reporting Server.With
> these reports i am
> >going to run in ASP.Net, but its prompting SQL Server
> User ID and Password.
> >Can any one knows the solution for without prompting the
> User ID and Password.
> >
> >Is this Possible?
> >
> >Regards,
> >Malli
> >
> >
> >
> >.
> >
>
Tuesday, March 20, 2012
Project question.
Hi, I'm developing a DB that is as follow:
This DB is for control the Credit Cards information. Then it has a lot of
movement.
1-I have a client.
2-This client has an account
3-This account can has a many cards ( for exemple: credit card
international, credit card gold.) each one whit your rules (like: limit,
date of pay.)
4- And I have a table that receives all transactions, for example: (very
simplified)
Client '1010 1010 1010 1010' buy product that have cost of $100,00 ,date
05/05/05
Client '1010 1010 1010 1010' buy product that have cost of $50,00 , date
05/20/05
.
Client '2020 2020 2020 2020' buy product that have cost of $80,00 ,date
05/04/05
Client '2020 2020 2020 2020' buy product that have cost of $50,00 , date
05/18/05
.
I need made calculations to generate a bill for each client each month.
My question is: When I have 1 million of client (consequently 5 million of
transaction in this table to month) and I need make calculations, this table
will work. (It won't be locked)
How I should do this.
Anyone have experience with a lot of data. How work with a lot of data that
need be calculate.
Any think is important to me.
Thank you very much.Hello,
You may want to consider use Horizontal partitioning
http://msdn.microsoft.com/library/d...-us/optimsql/od
p_tun_1_11ev.asp
http://www.sqlteam.com/Item.ASP?ItemID=684
Also, general query optimation is necesary for each specific query:
HOW TO: Troubleshoot Slow-Running Queries on SQL Server 7.0 or Later
http://support.microsoft.com/?id=243589
http://www.sql-server-performance.com/mr_indexing.asp
INF: Index Tuning Wizard Best Practices
http://support.microsoft.com/?id=311826
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner 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.
| From: "ReTF" <re.tf@.newsgroup.nospam>
| Subject: Project question.
| Date: Wed, 3 Aug 2005 09:32:57 -0300
| Lines: 74
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
| Message-ID: <OjmzhbCmFHA.3256@.TK2MSFTNGP12.phx.gbl>
| Newsgroups: microsoft.public.sqlserver.programming
| NNTP-Posting-Host: 200-211-161-64-amr.cpe.vivax.com.br 200.211.161.64
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.programming:109244
| X-Tomcat-NG: microsoft.public.sqlserver.programming
|
| Project question.
|
|
|
| Hi, I'm developing a DB that is as follow:
|
|
|
| This DB is for control the Credit Cards information. Then it has a lot of
| movement.
|
|
|
| 1-I have a client.
|
| 2-This client has an account
|
| 3-This account can has a many cards ( for exemple: credit card
| international, credit card gold.) each one whit your rules (like: limit,
| date of pay.)
|
| 4- And I have a table that receives all transactions, for example: (very
| simplified)
|
|
|
| Client '1010 1010 1010 1010' buy product that have cost of $100,00 ,date
| 05/05/05
|
| Client '1010 1010 1010 1010' buy product that have cost of $50,00 , date
| 05/20/05
|
| .
|
| Client '2020 2020 2020 2020' buy product that have cost of $80,00 ,date
| 05/04/05
|
| Client '2020 2020 2020 2020' buy product that have cost of $50,00 , date
| 05/18/05
|
| .
|
|
|
| I need made calculations to generate a bill for each client each month.
|
|
|
| My question is: When I have 1 million of client (consequently 5 million
of
| transaction in this table to month) and I need make calculations, this
table
| will work. (It won't be locked)
|
|
|
| How I should do this.
|
|
|
| Anyone have experience with a lot of data. How work with a lot of data
that
| need be calculate.
|
|
|
|
|
| Any think is important to me.
|
|
|
| Thank you very much.
|
|
|
|
|
Monday, March 12, 2012
Programming Subscription Options
Hello,
We are developing our own ASP.NET 2.0 (C#) front-end for Reporting Services. We are trying to create an interface for setting up standard subscriptions that is similar to Report Manager.
On Report Manager's Report Server File Share options page, there are two options Render Format and Overwrite options that we need help with. Can we query the ReportServer and get the available Render Formats to populate a dropdownlist? Or, do we have to hard-code the values?
Same for the Overwrite options, are these hard-coded? Or, can the valid values be retreived from ReportServer?
Finally, on the Report Server E-mail setup page, there is a Priority field that we need to replicate. Again, are the valid values hard-coded into the dropdownlist or retreived from the ReportServer?
Thanks.I answered this in the newsgroup but will post my answer here as well.
You can call GetExtensionSettings to get the settings that a delivery
extension accepts. The extensions will return a populated list of renders
that it supports as well as the full set of options that it supports.
Programming Subscription Options
We are developing our own ASP.NET 2.0 (C#) front-end for Reporting Services.
We are trying to create an interface for setting up standard subscriptions
that is similar to Report Manager.
On Report Manager's Report Server File Share options page, there are two
options Render Format and Overwrite options that we need help with. Can we
query the ReportServer and get the available Render Formats to populate a
dropdownlist? Or, do we have to hard-code the values?
Same for the Overwrite options, are these hard-coded? Or, can the valid
values be retrieved from ReportServer?
Finally, on the Report Server E-mail setup page, there is a Priority field
that we need to replicate. Again, are the valid values hard-coded into the
dropdownlist or retrieved from the ReportServer?
Thanks.You can call GetExtensionSettings to get the settings that a delivery
extension accepts. The extensions will return a populated list of renders
that it supports as well as the full set of options that it supports.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"sam" <nospam@.company.com> wrote in message
news:uDhn8VD$FHA.140@.TK2MSFTNGP12.phx.gbl...
> Hello,
> We are developing our own ASP.NET 2.0 (C#) front-end for Reporting
> Services.
> We are trying to create an interface for setting up standard subscriptions
> that is similar to Report Manager.
> On Report Manager's Report Server File Share options page, there are two
> options Render Format and Overwrite options that we need help with. Can
> we
> query the ReportServer and get the available Render Formats to populate a
> dropdownlist? Or, do we have to hard-code the values?
> Same for the Overwrite options, are these hard-coded? Or, can the valid
> values be retrieved from ReportServer?
> Finally, on the Report Server E-mail setup page, there is a Priority field
> that we need to replicate. Again, are the valid values hard-coded into
> the
> dropdownlist or retrieved from the ReportServer?
> Thanks.
>|||Thanks Daniel!
Another quick question for you...
How does Report Manager validate that the Path is in Uniform Naming
Convention (UNC) format? More than likely, our end users will enter
something like: D:\Product\Reports, and I guess we'll need to validate it.
"Daniel Reib [MSFT]" <danreib@.online.microsoft.com> wrote in message
news:%23wXU5iE$FHA.216@.TK2MSFTNGP15.phx.gbl...
> You can call GetExtensionSettings to get the settings that a delivery
> extension accepts. The extensions will return a populated list of renders
> that it supports as well as the full set of options that it supports.
> --
> -Daniel
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> "sam" <nospam@.company.com> wrote in message
> news:uDhn8VD$FHA.140@.TK2MSFTNGP12.phx.gbl...
> > Hello,
> > We are developing our own ASP.NET 2.0 (C#) front-end for Reporting
> > Services.
> > We are trying to create an interface for setting up standard
subscriptions
> > that is similar to Report Manager.
> >
> > On Report Manager's Report Server File Share options page, there are two
> > options Render Format and Overwrite options that we need help with. Can
> > we
> > query the ReportServer and get the available Render Formats to populate
a
> > dropdownlist? Or, do we have to hard-code the values?
> >
> > Same for the Overwrite options, are these hard-coded? Or, can the valid
> > values be retrieved from ReportServer?
> >
> > Finally, on the Report Server E-mail setup page, there is a Priority
field
> > that we need to replicate. Again, are the valid values hard-coded into
> > the
> > dropdownlist or retrieved from the ReportServer?
> >
> > Thanks.
> >
> >
>|||We don't validate all UNC paths, I believe it just checks that it starts
with \\
No real magic. :)
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"sam" <nospam@.company.com> wrote in message
news:%236XyizE$FHA.1312@.TK2MSFTNGP09.phx.gbl...
> Thanks Daniel!
> Another quick question for you...
> How does Report Manager validate that the Path is in Uniform Naming
> Convention (UNC) format? More than likely, our end users will enter
> something like: D:\Product\Reports, and I guess we'll need to validate it.
>
> "Daniel Reib [MSFT]" <danreib@.online.microsoft.com> wrote in message
> news:%23wXU5iE$FHA.216@.TK2MSFTNGP15.phx.gbl...
>> You can call GetExtensionSettings to get the settings that a delivery
>> extension accepts. The extensions will return a populated list of
>> renders
>> that it supports as well as the full set of options that it supports.
>> --
>> -Daniel
>> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>>
>> "sam" <nospam@.company.com> wrote in message
>> news:uDhn8VD$FHA.140@.TK2MSFTNGP12.phx.gbl...
>> > Hello,
>> > We are developing our own ASP.NET 2.0 (C#) front-end for Reporting
>> > Services.
>> > We are trying to create an interface for setting up standard
> subscriptions
>> > that is similar to Report Manager.
>> >
>> > On Report Manager's Report Server File Share options page, there are
>> > two
>> > options Render Format and Overwrite options that we need help with.
>> > Can
>> > we
>> > query the ReportServer and get the available Render Formats to populate
> a
>> > dropdownlist? Or, do we have to hard-code the values?
>> >
>> > Same for the Overwrite options, are these hard-coded? Or, can the
>> > valid
>> > values be retrieved from ReportServer?
>> >
>> > Finally, on the Report Server E-mail setup page, there is a Priority
> field
>> > that we need to replicate. Again, are the valid values hard-coded into
>> > the
>> > dropdownlist or retrieved from the ReportServer?
>> >
>> > Thanks.
>> >
>> >
>>
>
Friday, March 9, 2012
Programmatically developing an entire package..
Hi all,
I am trying to write a program that creates packages on the fly depending on the variables you pass. for eg. It should create connection managers on the fly specific to a certain file in the variable (eg. sample.csv). the package has a dataflow task and it has flat file source and oledb destination.The problem I am facing is the flat file source when assigned to a flat file connection manager(dynamically), it is not giving any source output columns. i.e, the value for DFSource.OutputCollection(0).OutputColumnCollection.Count is Zero. But when I use the same code and reverse the source and destination(oledb as source and flatfile as destination), it is working fine. I searched everywhere for resources on how to develop packages programmatically, but could not find any except one example on msdn. If anyone knows about this prob or any useful resources on this subject, it would be really helpful.
Thanks,
Prithvi.
This is the code for creating connections and adding dataflow task. I need to add a script component transformation, but initially I wanted to see if a one-to-one mapping works fine.
Public Sub CreateConnections()
'Add the OLE DB and Flat File Connection Managers
Console.WriteLine("Creating the MyOLEDBConnection")
Dim cnOLEDB As ConnectionManager = myPackage.Connections.Add("OLEDB")
cnOLEDB.Name = "MyOLEDBConnection"
cnOLEDB.ConnectionString = "<connection string>"
Console.WriteLine("Creating the MyFlatFileConnection")
Dim cnFile As ConnectionManager = myPackage.Connections.Add("FLATFILE")
cnFile.Name = "MyFlatFileConnection"
cnFile.Properties("ConnectionString").SetValue(cnFile, "C:\sample.csv")
cnFile.Properties("Format").SetValue(cnFile, "Delimited")
cnFile.Properties("ColumnNamesInFirstDataRow").SetValue(cnFile, False)
cnFile.Properties("DataRowsToSkip").SetValue(cnFile, 0)
cnFile.Properties("RowDelimiter").SetValue(cnFile, vbCrLf)
cnFile.Properties("TextQualifier").SetValue(cnFile, """")
End Sub
Public Sub AddDataFlowTask()
'Add a Data Flow Task
Console.WriteLine("Adding a Data Flow Task")
Dim e As Executable = myPackage.Executables.Add("DTS.Pipeline")
Dim taskDF As TaskHost = CType(e, TaskHost)
taskDF.Name = "DataFlow"
Dim DTP As MainPipe
DTP = CType(taskDF.InnerObject, MainPipe)
' Add the FLAT FILE Source
Console.WriteLine("Adding the File Source")
Dim DFSource As IDTSComponentMetaData90
DFSource = DTP.ComponentMetaDataCollection.New()
DFSource.ComponentClassID = "DTSAdapter.FlatFileSource.1"
DFSource.Name = "FlatFileSource"
' Connect, populate the Input collections and disconnect
Dim SourceInst As CManagedComponentWrapper = DFSource.Instantiate()
SourceInst.ProvideComponentProperties()
DFSource.RuntimeConnectionCollection(0).ConnectionManagerID = myPackage.Connections("MyFlatFileConnection").ID
DFSource.RuntimeConnectionCollection(0).ConnectionManager = DtsConvert.ToConnectionManager90(myPackage.Connections("MyFlatFileConnection"))
SourceInst.AcquireConnections(vbNull)
SourceInst.ReinitializeMetaData()
SourceInst.ReleaseConnections()
'checking If the external metadata columns are available as source output columns and the output is 0 which means no columns are being passed as output from source
Dim column As IDTSOutputColumn90
Try
Console.WriteLine("connection name: " & DFSource.RuntimeConnectionCollection(0).Name.ToString)
Console.WriteLine("output collection name: " & DFSource.OutputCollection(0).Name)
Console.WriteLine("output collection description :" & DFSource.OutputCollection(0).Description)
Console.WriteLine("source output columns count :" & DFSource.OutputCollection(0).OutputColumnCollection.Count.ToString
Catch ex As Exception
Console.WriteLine(ex.InnerException.Message.ToString)
End Try
'tried to print col names but it does not print any
For Each column In DFSource.OutputCollection(0).OutputColumnCollection
Console.WriteLine(column.Name.ToString)
Console.WriteLine(column.DataType.ToString)
Next
' Add the OLEDB Destination
Console.WriteLine("Adding OLEDB Destination")
Dim DFDestination As IDTSComponentMetaData90
DFDestination = DTP.ComponentMetaDataCollection.New()
DFDestination.ComponentClassID = "DTSAdapter.OLEDBDestination"
DFDestination.Name = "OLEDBDestination"
' Create an instance of the component
Dim DestInst As CManagedComponentWrapper = DFDestination.Instantiate()
DestInst.ProvideComponentProperties()
If DFDestination.RuntimeConnectionCollection.Count > 0 Then
DFDestination.RuntimeConnectionCollection(0).ConnectionManagerID = myPackage.Connections("MyOLEDBConnection").ID
DFDestination.RuntimeConnectionCollection(0).ConnectionManager = DtsConvert.ToConnectionManager90(myPackage.Connections("MyOLEDBConnection"))
End If
DestInst.SetComponentProperty("AccessMode", 0)
DestInst.SetComponentProperty("OpenRowset", "tempSSIS")
DestInst.SetComponentProperty("FastLoadKeepNulls", True)
' Map a connection between the source and destination
Dim path As IDTSPath90 = DTP.PathCollection.New()
path.AttachPathAndPropagateNotifications(DFSource.OutputCollection(0), DFDestination.InputCollection(0))
Dim InColumns As IDTSVirtualInputColumnCollection90 = DFDestination.InputCollection(0).GetVirtualInput().VirtualInputColumnCollection()
' the number of input columns to destination is zero
Console.WriteLine("input columns : " & InColumns.Count.ToString)
Try
DestInst.AcquireConnections(vbNull)
Catch ex As Exception
Console.WriteLine(ex.InnerException.Message)
End Try
DestInst.ReinitializeMetaData()
'Console.WriteLine("input columns : " & DFDestination.InputCollection(0).InputColumnCollection.Count.ToString)
For Each input As IDTSInput90 In DFDestination.InputCollection
' Get the virtual input column collection for the input.
Dim vInput As IDTSVirtualInput90 = input.GetVirtualInput()
' Iterate through the virtual column collection.
For Each vColumn As IDTSVirtualInputColumn90 In vInput.VirtualInputColumnCollection
' Call the SetUsageType method of the design time instance of the component.
Console.WriteLine(vColumn.Name.ToString)
Console.WriteLine(vColumn.DataType)
DestInst.SetUsageType(input.ID, vInput, vColumn.LineageID, DTSUsageType.UT_READONLY)
Next
Dim exCol As IDTSExternalMetadataColumn90
For Each col As IDTSInputColumn90 In DFDestination.InputCollection(0).InputColumnCollection
exCol = DFDestination.InputCollection(0).ExternalMetadataColumnCollection(col.Name)
DestInst.MapInputColumn(DFDestination.InputCollection(0).ID, col.ID, exCol.ID)
Next
DestInst.ReleaseConnections()
End Sub
Please see if i did wrong any where(which I always happen to do). But based on the msdn material, the above code should work, i guess.