SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 FTP result
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

peace
Constraint Violating Yak Guru

410 Posts

Posted - 04/02/2013 :  05:49:08  Show Profile  Reply with Quote
is there any sql script where i can FTP over to another location?

select * from #temp result to FTP over.

is that possible?

MIK_2008
Flowing Fount of Yak Knowledge

Pakistan
1054 Posts

Posted - 04/02/2013 :  05:50:34  Show Profile  Reply with Quote
Do you mean to have result of a table which is on any other server?

Cheers
MIK
Go to Top of Page

peace
Constraint Violating Yak Guru

410 Posts

Posted - 04/02/2013 :  06:04:57  Show Profile  Reply with Quote
to push the result into txt format and FTP over
Go to Top of Page

peace
Constraint Violating Yak Guru

410 Posts

Posted - 04/02/2013 :  06:06:00  Show Profile  Reply with Quote
i try this

https://kb.hivelocity.net/ftp-through-an-mssql-stored-procedure/

but where to input to run my store proc?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52317 Posts

Posted - 04/02/2013 :  07:10:27  Show Profile  Reply with Quote
one way is to use ssis package with Execute SQL task to execute procedure and save results and then a FTP task to FTP it to your required server



------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

MIK_2008
Flowing Fount of Yak Knowledge

Pakistan
1054 Posts

Posted - 04/02/2013 :  08:35:58  Show Profile  Reply with Quote
Another way around could be using xp_cmdShell in combination of "bcp" command. If you're not famaliar with them then explore them. As a matter of fact I had utlized them for exporting data into excel files and them moving those files from my sql server machine to another machine. But in my case the destination machine was on the same domain.

Cheers
MIK
Go to Top of Page

peace
Constraint Violating Yak Guru

410 Posts

Posted - 04/02/2013 :  09:24:31  Show Profile  Reply with Quote
FTP sql script not possible?
Go to Top of Page

MIK_2008
Flowing Fount of Yak Knowledge

Pakistan
1054 Posts

Posted - 04/02/2013 :  13:21:27  Show Profile  Reply with Quote
I would not say "not possible" but at least I am not aware of "FTP sql Script" terminology. However the solution/idea I provided earlier is what I had implemented via stored procedures and was simply calling those procedures.

Cheers
MIK
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52317 Posts

Posted - 04/02/2013 :  13:40:07  Show Profile  Reply with Quote
quote:
Originally posted by peace

FTP sql script not possible?


possible if you can use third party tools like WinSCP which has command line .But you still need to use xp_cmdshell to call it though

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000