Showing posts with label files. Show all posts
Showing posts with label files. Show all posts

Friday, March 30, 2012

How to FTP

How to automate FTP files to unix server from Windows server ? I dont want t
o
use SQL Server but run a bat file that migth ftp files to unix serverHi
You can use the FTP.exe program which comes with windows. Type in ftp -h at
a command prompt to get the options or look in windows help file.
If you are calling from a stored procedure this can be called using
xp_cmdshell.
John
"Disney" wrote:

> How to automate FTP files to unix server from Windows server ? I dont want
to
> use SQL Server but run a bat file that migth ftp files to unix server

how to free the memory occupied by "blob" in MS sql server

i'm working in microsoft sql server and i got following problem:

I have a text files Asia.txt in E:\ folder with some data in it as shown below

Asia.txt

1, Mizuho, Fukushima, Tokyo
2, Minika, Pang, Taipei
3, Jen, Ambelang, India
4, Jiang, Hong, Shangai
5, Ada, Koo, HongKong

And I have a table Region, in the database Companies, as shown below.

1>CREATE TABLE REGION (ID INT,REGION VARCHAR(25),DATA varbinary(MAX))
2>GO

I queried all the data from Asia.txt, using the OPENROWSET function.

1>INSERT INTO REGION (ID, REGION, DATA)
2>SELECT 1 AS ID, 'ASIA' AS REGION,
3> * FROM OPENROWSET( BULK 'E:\Asia.txt',SINGLE_BLOB)
4>AS MYTABLE
5>GO

it occupied some memory then i deleted this record using follwoing query

1>DELETE REGION
2>GO

then it deletes the record successfully but memory is not getting freed

can anyone help me out on this problem

When you delete from SQL server the memory will not be removed until the database is truncated. If you want to store data temporarily create a temporary table with a prefix of #

CREATE TABLE #TEMPTABLE|||

i want to remove one record from the table, and i did it by using "DELETE" statement with WHERE clause,

now i want to free memory which was occupied by recently deleted record.

what i know about TRUNCATE statement is that it deletes the whole table and we cannot use WHERE clause with TRUNCATE.

and i don't want to create temporary table.

so how can i use truncate?.

thanks for your suggestion

|||

Hi,

This problem make me concentrate to it ! I have the same problem, please read this article :

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=947545&SiteID=1

Althought I use temporary table, but, it does not free memory when I delete temp table, I do not know why ! For someone, they said that : "In AS, it free memory not well and Microsoft company does not anonounce this problem in a clear way !".

Can you tell me more,

Regards,

Tran Quang Phuong.

how to free the memory occupied by "blob" in MS sql server

i'm working in microsoft sql server and i got following problem:

I have a text files Asia.txt in E:\ folder with some data in it as shown below

Asia.txt

1, Mizuho, Fukushima, Tokyo
2, Minika, Pang, Taipei
3, Jen, Ambelang, India
4, Jiang, Hong, Shangai
5, Ada, Koo, HongKong

And I have a table Region, in the database Companies, as shown below.

1>CREATE TABLE REGION (ID INT,REGION VARCHAR(25),DATA varbinary(MAX))
2>GO

I queried all the data from Asia.txt, using the OPENROWSET function.

1>INSERT INTO REGION (ID, REGION, DATA)
2>SELECT 1 AS ID, 'ASIA' AS REGION,
3> * FROM OPENROWSET( BULK 'E:\Asia.txt',SINGLE_BLOB)
4>AS MYTABLE
5>GO

it occupied some memory then i deleted this record using follwoing query

1>DELETE REGION
2>GO

then it deletes the record successfully but memory is not getting freed

can anyone help me out on this problem

When you delete from SQL server the memory will not be removed until the database is truncated. If you want to store data temporarily create a temporary table with a prefix of #

CREATE TABLE #TEMPTABLE
|||

i want to remove one record from the table, and i did it by using "DELETE" statement with WHERE clause,

now i want to free memory which was occupied by recently deleted record.

what i know about TRUNCATE statement is that it deletes the whole table and we cannot use WHERE clause with TRUNCATE.

and i don't want to create temporary table.

so how can i use truncate?.

thanks for your suggestion

|||

Hi,

This problem make me concentrate to it ! I have the same problem, please read this article :

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=947545&SiteID=1

Althought I use temporary table, but, it does not free memory when I delete temp table, I do not know why ! For someone, they said that : "In AS, it free memory not well and Microsoft company does not anonounce this problem in a clear way !".

Can you tell me more,

Regards,

Tran Quang Phuong.

Friday, March 9, 2012

How to find oldest file in a folder

I may have one or several files in a folder that act as source files.

How do I loop through the folder, picking the oldest dated file according to its 'Date Modifield' attribute.

Do I have to use a Script Task or similar as I can't seem to find a way to do it with normal tasks.

If so, does anyone have example code.

Thanks

P R W.

I have not done that; but I think this thread can help you:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=632171&SiteID=1

Make sure you vote on that suggestion...

How to find my rdl filesn the sql server?

Hello.
I have a few reports that I've published to my reportserver.
Now, my rdl files have been delete from my local computer.
Is there a way to find the rdl files on the server so I can download
them to my local pc so I can continue working on them?
I have full access to the report server of course (and the the sql
server itself).
I'm useing rs2005.
Thanks.RS stores the rdl in the database. There is no rdl file on the server.
However, you can get the rdl file via report manager out of the database.
Not real intuitive on how to do it however. Go to report manager, click on
the report, then the properties tab. There is an Edit link under Report
Definition. Click on that, give it a directory on your local PC. Then open
up (or create) a report project. Right click on report and add an existing
item (this is from memory). Anyway there is a right mouse click menu for
adding an existing item. It will copy it over from wherever you put it into
the directory for your project.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"nicknack" <roezohar@.gmail.com> wrote in message
news:1194968402.018507.270610@.19g2000hsx.googlegroups.com...
> Hello.
> I have a few reports that I've published to my reportserver.
> Now, my rdl files have been delete from my local computer.
> Is there a way to find the rdl files on the server so I can download
> them to my local pc so I can continue working on them?
> I have full access to the report server of course (and the the sql
> server itself).
> I'm useing rs2005.
> Thanks.
>|||You can also get the rdl file from SQL Server Management Studio. Log on to
the Reporting Services service. Go to te folde where your report is
deployed. Right-click on the report and select Edit. You will prompted to
save the rdl file somewhere on your disk.
--
Alain Quesnel
alainsansspam@.logiquel.com
www.logiquel.com
"nicknack" <roezohar@.gmail.com> wrote in message
news:1194968402.018507.270610@.19g2000hsx.googlegroups.com...
> Hello.
> I have a few reports that I've published to my reportserver.
> Now, my rdl files have been delete from my local computer.
> Is there a way to find the rdl files on the server so I can download
> them to my local pc so I can continue working on them?
> I have full access to the report server of course (and the the sql
> server itself).
> I'm useing rs2005.
> Thanks.
>

How to find my rdl filesn the sql server?

Hello.
I have a few reports that I've published to my reportserver.
Now, my rdl files have been delete from my local computer.

Is there a way to find the rdl files on the server so I can download them to my local pc so I can continue working on them?

I have full access to the report server of course (and the the sql server itself).
I'm useing rs2005.

Thanks.

Hi there - this isnt documented very well, but you can actually just re-download the report directly from the report server

browse tohttp://reportingserver/reports

replace reportingserver with the name of your server.

click a folder - then a report to view it (like you were going to run it), then click the properties tab at the top.

About half way down the page, there will be an "edit" linkbutton, under the "Report Deffinition" heading, clicking that will give you the option to download the RDL

|||

That's great to know, because the rdl files do not exist on the reports server. They are in the database. I spent hours and hours trying to figure that one out. :(

|||

Hi Freakyuno.

Thanks for the reply. I get that question in a few other forum so I guss thats the way to do it :)

I also found a nice tool to do this (from the msdn ssrs forum):
http://sqldbatips.com/showarticle.asp?ID=62

Still didn't try it out my self but I read about it and it sound like another way.

Thanks.