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

Tuesday, March 20, 2012

Comparing 2 files

Dear All,
Periodically, i need to copy a file from the source folder to destination
folder. the source file will be updated from time to time. Before copying
the file to destination folder, i need to compare the modified date of the
file, mean only copy the file to destination folder if the source file is
updated. How can we do this in SQL?
I will use the xp_cmdShell to copy the file. If use the xp_getfiledetails,
how can i get the information return fromt the stored procedure to check the
modified date? Or, is there any better method of doing this?
I am using SQL Server 2000.
Thanks & Best Regards,
EdwardInsert as below..and then you can compare ..
CREATE TABLE #FILE
(
name varchar(30) null,
size int null,
creationdate int null,
creationtime int null,
lastwrittendate int null,
lastwrittentime int null,
lastaccesseddate int null,
lastaccessedtime int null,
attributes int null
)
INSERT #FILE EXEC master..xp_getfiledetails @.FILE_NAME
MJKulangara
http://sqladventures.blogspot.com|||Hi
You could do the file copy and comparison using a DTS package and an ActiveX
script. See
http://www.sqldts.com/default.aspx?292
John
"Edward Low" <wc_low@.hotmail.com> wrote in message
news:eRZ8g9qLGHA.3936@.TK2MSFTNGP12.phx.gbl...
> Dear All,
> Periodically, i need to copy a file from the source folder to destination
> folder. the source file will be updated from time to time. Before copying
> the file to destination folder, i need to compare the modified date of the
> file, mean only copy the file to destination folder if the source file is
> updated. How can we do this in SQL?
> I will use the xp_cmdShell to copy the file. If use the xp_getfiledetails,
> how can i get the information return fromt the stored procedure to check
> the modified date? Or, is there any better method of doing this?
> I am using SQL Server 2000.
> Thanks & Best Regards,
>
> Edward
>

Thursday, March 8, 2012

Compare csv file layout to SQL Server table

I am creating a facility whereby you can select a source file (.csv), and a target (SQL table).

Then I call a DTS to copy the csv file to the SQL table.

How can I validate that the two files have the same number of columns ?

Moved to SQL Server Tools forum|||In order to check the number of rows you need to work on DTS with workflow, refer to books online for more information and you can schedule the DTS package a SQLagent job by right-click on selected package.|||I need to validate that the correct file has been selected before scheduling the DTS package. This is why I need to do it in my VB.Net Windows application.|||

You can write a custom Script Task inside the SSIS package that will open the file and check how many columns it has. You can utilize Excel object model for that or just go with regular .NET IO libraries.

Hope that helps.

Maciek Sarnowicz

Compare csv file layout to SQL Server table

I am creating a facility whereby you can select a source file (.csv), and a target (SQL table).

Then I call a DTS to copy the csv file to the SQL table.

How can I validate that the two files have the same number of columns ?

Moved to SQL Server Tools forum|||In order to check the number of rows you need to work on DTS with workflow, refer to books online for more information and you can schedule the DTS package a SQLagent job by right-click on selected package.|||I need to validate that the correct file has been selected before scheduling the DTS package. This is why I need to do it in my VB.Net Windows application.|||

You can write a custom Script Task inside the SSIS package that will open the file and check how many columns it has. You can utilize Excel object model for that or just go with regular .NET IO libraries.

Hope that helps.

Maciek Sarnowicz

Wednesday, March 7, 2012

Company logo in Report Manager - Top Frame

We are trying to work out if it is possible to access the source code for the
Report Manager interface, so that we can configure the design.
For example, we would like to put the company logo in as a watermark in the
space at the top section of Report Manager (behind 'SQL Server Reporting
Services Home')
We have been able to set the background colour etc using the style sheet,
but would like to know if it is possible to have greater control over the
look and feel at the base level.Yes you can. The images for instance can be changed... I have forgotten the
details, but they are discussed in The Hitchikers Guide to Reporting
Services... The issue is that you must place your images in a RS directory,
and change some RS files. This puts you in a position where you might have
to re-do this work at each Service Pack or upgrade...
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Darren" <Darren@.discussions.microsoft.com> wrote in message
news:17084FC0-0C20-41B4-A7EC-9CA49D3A0F99@.microsoft.com...
> We are trying to work out if it is possible to access the source code for
> the
> Report Manager interface, so that we can configure the design.
> For example, we would like to put the company logo in as a watermark in
> the
> space at the top section of Report Manager (behind 'SQL Server Reporting
> Services Home')
> We have been able to set the background colour etc using the style sheet,
> but would like to know if it is possible to have greater control over the
> look and feel at the base level.|||Thanks Wayne, much appreciated.
Darren
"Wayne Snyder" wrote:
> Yes you can. The images for instance can be changed... I have forgotten the
> details, but they are discussed in The Hitchikers Guide to Reporting
> Services... The issue is that you must place your images in a RS directory,
> and change some RS files. This puts you in a position where you might have
> to re-do this work at each Service Pack or upgrade...
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "Darren" <Darren@.discussions.microsoft.com> wrote in message
> news:17084FC0-0C20-41B4-A7EC-9CA49D3A0F99@.microsoft.com...
> > We are trying to work out if it is possible to access the source code for
> > the
> > Report Manager interface, so that we can configure the design.
> >
> > For example, we would like to put the company logo in as a watermark in
> > the
> > space at the top section of Report Manager (behind 'SQL Server Reporting
> > Services Home')
> >
> > We have been able to set the background colour etc using the style sheet,
> > but would like to know if it is possible to have greater control over the
> > look and feel at the base level.
>
>|||This doesnt work in 2005 Report Manager.
The Report Manager in 2005 is little differern from 2000. Im not able to do
the customization as explined in Hitchikers Guide. any help'
have you tried any customization for Report Manager in 2005.
any feedback appricated..
Thanks
Bava
"Wayne Snyder" wrote:
> Yes you can. The images for instance can be changed... I have forgotten the
> details, but they are discussed in The Hitchikers Guide to Reporting
> Services... The issue is that you must place your images in a RS directory,
> and change some RS files. This puts you in a position where you might have
> to re-do this work at each Service Pack or upgrade...
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "Darren" <Darren@.discussions.microsoft.com> wrote in message
> news:17084FC0-0C20-41B4-A7EC-9CA49D3A0F99@.microsoft.com...
> > We are trying to work out if it is possible to access the source code for
> > the
> > Report Manager interface, so that we can configure the design.
> >
> > For example, we would like to put the company logo in as a watermark in
> > the
> > space at the top section of Report Manager (behind 'SQL Server Reporting
> > Services Home')
> >
> > We have been able to set the background colour etc using the style sheet,
> > but would like to know if it is possible to have greater control over the
> > look and feel at the base level.
>
>

Compact Edition not in Data Source List

After I installed the SQL Server Compact Edition, I start a new VS 2005 Basic project. When I try to create a new connection I do not see the Compact Edition in the list of data sources.

I have installed previously SQL Server CE, Everywhere, Mobile, 2005 Mobile but I uninstalled them all.

Can anyone give me an idea why I can't see the Compact Edition as a data source?

Thanks.

Hello

From what you'r saying maybe you need to re-install the SQL Server CE.
I have the same problem but it's because I'm using VB.NET Express Edition.

see ya

Saturday, February 25, 2012

Communication link failure

I am running an SSIS packsge across 2 servers. There at 33 Mil rows being copied over. At 5.6 mil rows I get this

[OLE DB Source [1]] Error: An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available.Source: "Microsoft SQL Native Client"Hresult: 0x80004005Description: "Protocol error in TDS stream". An OLE DB record is available.Source: "Microsoft SQL Native Client"Hresult: 0x80004005Description: "Communication link failure". An OLE DB record is available.Source: "Microsoft SQL Native Client"Hresult: 0x80004005Description: "TCP Provider: An existing connection was forcibly closed by the remote host. ". An OLE DB record is available.Source: "Microsoft SQL Native Client"Hresult: 0x80004005Description: "Communication link failure". An OLE DB record is available.Source: "Microsoft SQL Native Client"Hresult: 0x80004005Description: "TCP Provider: An existing connection was forcibly closed by the remote host. ". An OLE DB record is available.Source: "Microsoft SQL Native Client"Hresult: 0x80004005Description: "Communication link failure". An OLE DB record is available.Source: "Microsoft SQL Native Client"Hresult: 0x80004005Description: "TCP Provider: The specified network name is no longer available. ".

[DTS.Pipeline] Error: The PrimeOutput method on component "OLE DB Source" (1) returned error code 0xC0202009. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.

Is there any known cause of this?

Thanks

Looks like a connection problem and that something, somewhere starts to drop packets or even the connection. You might have to enlist the help of the network guys if such people exist where you're at.

Friday, February 24, 2012

Communication between tasks in an SSIS Package

Hi,
I have a Flat File Source and I want to retrieve few properties of it in an Script Component. How do I?

Also, How could I make the file path of Flat File Source or Connection manager dynamic or configurable through some file ?

any input is appreciated.

Fahad

Fahad349 wrote:

Hi,
Also, How could I make the file path of Flat File Source or Connection manager dynamic or configurable through some file ?

Fahad

Look at package configurations. The forum search will be your friend.

Common DTS Source & Multiple Destinations

I want to run multiple DTS packages which export data into text files.
There is only one Data Source ..and multiple destinations.
When i write a code for this in VB ,for each Package i need to define the source connectioninividually. Can't i use the same Source connection which i used for the first package in the subsequent packages?http://www.sqldts.com/default.aspx?200