Showing posts with label source. Show all posts
Showing posts with label source. Show all posts

Friday, March 30, 2012

Replacing FTP with Service Broker

Hi there

Could you use service broker to replace FTP? We currently move hundreds of files around from source systems to destination systems. Some systems share the same files, some only recieve a subset of the data in the files.

This typically takes place early morning the next day.

Would it be possible, and I guess more importantly, has anyone done this;

Use service broker on all the source systems,sending to a central routing server that determines which destination servers require which piece of data and then forward it onto those servers. It would need to handle very high volumes of data.

The central server would also be required to transform some of the data as it passes through.

This would completely change the way in which we would exchange data around our network, allowing us to process more realtime than 1 day late.

Is there anyone who has done this, are their any case studies on this?

Thank you in advance.

Mark S

Service Broker could provide reliability for such a service (automatic fragmentation of files, automated resuming of intrerupts, guaranteed delivery of files) and secure trafic (encryption of files during tranfer).

However, FTP is a well known protocol and there are numerous tools and utilities to manage and monitor FTP, and you will miss this environment of familiar tools.

Frankly, altough I'm a big SSB fan, I wouldn't replace a ageneric FTP service with SSB lightly. The biggest advantage of FTP is that it does not require any write operation on the file location, only on the client. With SSB, to 'send' a file (the equivalent of a FTP GET) would require writing the file in sys.transmission_queue (database + log write) and then deleting this file from sys.transmsision_queue (again database+log write). All these writes add up to the needed disk space (altough both the database and the log space eventually get reused, everything 'in flight needs space) and as well to the necessary I/O bandwith. Also, the fragmentation logic, automatic retry and encryption all have a CPU cost, considerably higher than a FTP server would cosume.

So the SSB reliability guarantee comes at a price (primarily I/O + CPU cost), depending on the expected troughput this can range from an insignificant issue to a show stopper.

Wednesday, March 21, 2012

Replace column value with MAX() query in dataflow before insert

Hi,

We have a dataflow task that imports data from excel to a sql2005 database table. One of the columns is never filled in in the excel source. For updates we can use the lookup transformation to fill in that column, but for new values we need to calculate a new value for it (it's a PK) with MAX(column) +1 and replace the null value in the dataflow with this new value.

Just to be clear:
column id (int)
column name (string)

Based on the 'name' column, we can look up existing ids, and update these in the table. Ids that don't exist yet need to be filled in with the maximum value of the column + 1 (we can't use identity columns) and inserted in the table

Which transformation do I use to replace the value of the id column with this new id?

thanks,

Stephane

Hi Stephane,

You would first need to get the maximum value of the id column into another column (called maxid, for the purposes of this example). You could do this with a script component, or by splitting the flow and using an Aggregate transform,and merging it back. Then, you can then use a derived column transform to replace the value of the column by setting a replace expression such as the following:

ISNULL(id) ? maxid + 1 : id

Mark

|||

Hi Mark,

Thanks for your reply.

Your solution would work if all the data was in the dataflow, which unfortunately it isn't for me (we iterate over excel files with one row per file). We now do a select max() ... at the start of the control flow and store it in a variable. When we detect a new row, we increment the value and use a derived column transform like you suggested as well to put the value in the column.

Thanks,

Stephane

sql

Monday, March 12, 2012

Repeatedly starting databases

Hi all,

I've been handed a SQL Server that is used as an MIS source. There are 4 databases that carry out the task of importing data from various sources, then manipulting that data, and offering the data for reporting purposes.

The vendor has also created several other databases (of which there are also 4), but no-one in my company seems to know the purpose of these dbs.

In the logs, there are approximately 8/9 messages per second - not every second, but numberous seconds per minute - stating...

Starting up database 'db_name'.

... each time, all 4 of the mysterious dbs appear.

I've checked the spid that is running this job this morning, and it seems to be NT AUTHORITY\SYSTEM connected to one of the original 4 report databases.

Does this have any affect on the performance of the server, or the specific db attached to the user?

Thanks in advance.

Duncancheck the AUTO CLOSE option, i bet it is checked.|||Hi Duncan,

The first thing I would do is get in touch with the vendor and find out what the purpose of these databases is?

Cheers|||Thanks guys

Yes auto close is checked.

And yes, I'll contact the vendor to find out why they've done this.

Before I do, could there be any benefit to this since the databases are used at least once a second (or maybe two seconds at most) throughout the day?|||Originally posted by zinedunc
Thanks guys

Yes auto close is checked.

And yes, I'll contact the vendor to find out why they've done this.

Before I do, could there be any benefit to this since the databases are used at least once a second (or maybe two seconds at most) throughout the day?

What this option does is closes the database connection after the last user disconnects from the database. when a user tries to acces the databases again and requests for the same, then the database has to be reopened, which takes time and overhead.
Since your database is accessed frequentl, it has to be closed and reopened frequently which puts a large performance on the server and the users or the application which is using it.|||Thanks harshal_in

I knew that that's what was happening, I just wanted a second opinion before I go banging some heads :-)

Friday, March 9, 2012

Repeat List across page, not just down?

I want to use a List (or similar), but I want the fields from each row of the source datatable to repeat across the page before wrapping to the next line. For example:

row1-FieldA row1-FieldB row2-FieldA row2-FieldB
row3-FieldA row3-FieldB row4... etc

Is this possible?

Quick and dirthy is to write the expression

select the required report item(table in ur list)

choose expression for property(value)

==Iif(RowNumber("table") mod 2,FieldA,"")

Wednesday, March 7, 2012

Repairing 'The shared data source reference is no longer valid' is long winded in report m

Would be great to be able to multi select reports in report manager and set data sources etc. as tasks like that take a long time when done individually.

Yes, that would be a nice feature.

You might consider using RS.exe scripts if you have to do this for lots of reports, or for a few reports on a regular basis.

Monday, February 20, 2012

Rendering PDF format in Chinese character.

Hi,
I have used render method to render the data from data source to PDF format
in chinese character by using MS Gothic font family, but few character in
chinese words are printing as @. symbol.(ie. that character which has single
cote embeded)
Help is requried to print chinese character correctly in PDF format.
Did i need to set any other font family to print chinese character correctly
in PDF? Which font family help in printing chinese character correctly in PDF
file?.
Thanks in advance for the helpers.
Regards,
AnithaHi,
I got the solution, i had set MingLiU font family instead of MS Gothic, now
its working fine.
"Anitha Naidu" wrote:
> Hi,
> I have used render method to render the data from data source to PDF format
> in chinese character by using MS Gothic font family, but few character in
> chinese words are printing as @. symbol.(ie. that character which has single
> cote embeded)
> Help is requried to print chinese character correctly in PDF format.
> Did i need to set any other font family to print chinese character correctly
> in PDF? Which font family help in printing chinese character correctly in PDF
> file?.
> Thanks in advance for the helpers.
> Regards,
> Anitha
>