Showing posts with label location. Show all posts
Showing posts with label location. Show all posts

Friday, March 9, 2012

File transfer

I have to make a process/stored procedure that will either send or receive from a specific location (parameters: ftp server, username, password, filename, etc). Ne direction/help in order to do this. Or if anyone has done this before please help.
thxCould you supply some more specifics?|||The specifies are:

I have to make a sp that will send/receive files to/from an ip address or ftp site.
The sp will query the information such as (filename, send_time, receive/send, servername, usernid, password, size_of_file, etc).
Once this info is queried, the script should transfer the file to respective location using, either exec xp_cmdshell or ne other way.

Since it's critical that the file being sent/received, must succesfully be sent/received. The script must also handle that.

This script will be running on SQL server. Any sample code?
thx|||I guess you're going to use ftp...

OK...build an ftp script...and execute it from a bat file with xp_cmdshell...don't forget to redirect the output...maybe load it to a log table...

I guess you'll interogate a directory..

Use xp_cmdshell 'DIR D;\whatever\*.*

and load that to a table to interogate that...

something like that?

Wednesday, March 7, 2012

File System Task in SSIS

Wanting to use File System Task in SSIS to move files from

one location to another for archiving. I can't seem to figure out how to use a

wild card for the file name. It seems that I must specify the actual file name

which is a problem because only the first 4 letters in the file name remain a

constant.

Does anyone know how to use a wild card or a way to work

this in?

Darrin Turner wrote:

Wanting to use File System Task in SSIS to move files from one location to another for archiving. I can't seem to figure out how to use a wild card for the file name. It seems that I must specify the actual file name which is a problem because only the first 4 letters in the file name remain a constant.

Does anyone know how to use a wild card or a way to work this in?

Yes. use a ForEach loop to loop over the files (which you can specify with a wildcard) and then use the FileSystem task on each iterated file.

-Jamie

|||Ok, thank you. I will give that a try.

File System Task - relative location ?

hi,

I am using "File System Task" to copy files from one pre-defined location to another.

Is there a way to provide a "relative path" for the corresponding connections? If yes, how to set it up for deployment?

If not, I guess the option will be to update the "connection string" property for the file connections using package configurations.

thanks,
NiteshAnother option is to store the "root" location in a folder (it can be populated from a configuration) and you can then use property expressions on your file connection manager connection strings to use that variable.

-Jamie

Sunday, February 26, 2012

File Share Subscription

I have been trying, unsuccessfully, to set up a File Share Subscription. (The path is a location not on the report server.) On the destination server, the network permissions are set to full and the NTFS permissions are set to modify.

I found a post that said a Shared Schedule had to be used for this to work, so I tried that with no luck either. This is the error message I'm receiving:

"Logon failure: unknown user name or bad password. "

However, I can manually map a drive from my machine to that network drive.

And we've also been able to set up the File Share subscription to deliver to a different location on the network w/o issue.

I found something on a blog but I'm not sure that it is accurate. I can't find anything in the help files that indicate this is true. Can anyone confirm or deny?

"...if it fails using any account other than the account that the account Reporting Services is running under

just run your app pools and the reporting services windows service under the same account.

then change the Reports (Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportManager) and ReportServer (Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer) web.config files so the “impersonation” is to false."|||

In the file share subscription,use your login name and your password as stored credentials, and test the subscription.

Local server accounts may not be in Active Directory and they may not have permissions to write files on another share.

file properties

Hi all,

I'm having a problem need your help:

I can see all properties of datafile (FilegroupName, FileID, FileType,
Location, CurrentSize, Space Used) by Enterpise Manager.

Please tell me how do I see all those properties by SQL Query Analyzer.
I want to know actual space used in data file to shrink file.

Thanks in advanced,
TNThere's a bunch of system procedures that can get your started; sp_helpfile and sp_spaceused.|||thanks for your help
but I want to know exactly used space in data file to shrink to.
because I have a DB:
current size : 10000MB
space used : 814 MB

I want ot shrink the data file down around 850 MB.

Thanks
TN|||The best way is to query sysindexes system table. Look into sp_spaceused code to see how the used space is computed.|||See BOL
DBCC SHRINKDATABASE|||use master;
select
'Data device'=fileproperty('master', 'spaceused'),
'Log device'=fileproperty('mastlog', 'spaceused')

Friday, February 24, 2012

File Location Change

Hello, I was wondering how to change the default storage location for the
data and log files. I relaize that as I create new tables, I can override
th "default" location, but I was wanting to change the "default" value to
be the new location where most SQL databases will be stored. How do I
accomplish this?In SQL 2000 Right click on your Server in EM and choose
Properties. Select the Database settings tab and you will
see the input boxes for Default data and default log file location
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Jim Heavey" <JHeavey@.nospam.com> wrote in message
news:Xns949578AF4C7E7JHeaveyBDUP@.207.46.248.16...
> Hello, I was wondering how to change the default storage location for the
> data and log files. I relaize that as I create new tables, I can override
> th "default" location, but I was wanting to change the "default" value to
> be the new location where most SQL databases will be stored. How do I
> accomplish this?

File Location Change

Hello, I was wondering how to change the default storage location for the
data and log files. I relaize that as I create new tables, I can override
th "default" location, but I was wanting to change the "default" value to
be the new location where most SQL databases will be stored. How do I
accomplish this?In SQL 2000 Right click on your Server in EM and choose
Properties. Select the Database settings tab and you will
see the input boxes for Default data and default log file location
--
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Jim Heavey" <JHeavey@.nospam.com> wrote in message
news:Xns949578AF4C7E7JHeaveyBDUP@.207.46.248.16...
> Hello, I was wondering how to change the default storage location for the
> data and log files. I relaize that as I create new tables, I can override
> th "default" location, but I was wanting to change the "default" value to
> be the new location where most SQL databases will be stored. How do I
> accomplish this?