SSRS - Windows File Share - sql-server

I have a report that I am trying to drop in a certain folder on my local machine. The issue is that I run SSRS on our virtual server. Is there a way in the "path" section of the report to have it publish outside of the server? Thank you in advance!

If you are referring to the File Share subscription, you can have the path be any valid UNC path. As long as you can refer to a drive or folder on your local machine from your VM, it should work fine.
MS File Share

Related

SSIS Project - Catalog Deployment - Environment Variable (for location) accessing file server mapped to a local Z drive - SQL Server Agent issue

I have an SSIS package that reads a number of files using a For Each Loop Container. There are a number
of parameters in this package, and in the Integration Services Catalog in the SSMS, I have created an
environment with many variables for this project/package.
There are a number of environment variables for this package. There is a particular environment variable for Source Location.
While in my DEV setting, I was able to pass the Source Location environment variable as :
C:\Data Repository\Files (in a local machine).
Everything fine. Package runs perfectly, and For Each Loop Container works reads the files.
However, in the PROD setting, I have to use a file server, mapped to a Z drive.
For example:
This PC > Data Repository (\\tordfs) (Z:) > Data Repository > X
becomes
Z:\Data Repository\X
when I copy the path.
Inside the SSIS package, I am able to set the parameter value for Source Location as Z:\Data Repository\X
and the For Each Loop Container works fine from the SSDT/Visual Studio.
Now after the SSIS package/project is deployed to the SSMS Catalog, when I feed Z:\Data Repository\X as a value for the Source Location environment variable, and I Execute the package manually from the Catalog, it works fine.
However, when I use the SQL Server Agent for the above process, I get the following error:
For Each Loop Container:Warning: The For Each File enumerator is empty.
The For Each File enumerator did not find any files that
matched the file pattern, or the specified directory was
empty.
Is there anything I need to do in the For Each Loop Container or the SSIS Catalog to eliminate the above error during execution from the Catalog using SQL Server Agent?
Let me know.
In Windows mapped drives are user-specific. So you would have to map the drive for the account running the package. Instead use a UNC Path in both cases, and not a drive letter.
So something like:
\\tordfs\Data Repository\Files
The account running the package will still need permissions to the share, and permissions to the folder, but won't need a drive letter mount.
I have 2 suggestions:
Try giving read/write permissions to the SQL Database Engine Service account NT SERVICE\MSSQL$<Instance Name> (Where <Instance Name> should be replaced by the installed instance name):
Configure File System Permissions for Database Engine Access
Try to Map the Z:\ network drive within SQL Server:
Make Network Path Visible For SQL Server Backup and Restore in SSMS
Thanks a lot guys. Appreciate it.
I think I have fixed the issue:
In the environment variable, you cannot have Z:\Data Repository\X
The variable must have the values such as this:
\\tordfs\Data Repository\Data Repository\X
While manual execution from SSMS Integration Services Catalog can accept Z:\Data Repository\X as a value of an environment variable,
the SQL Server Agent needs \\tordfs\Data Repository\Data Repository\X
If the SQL Server Agent when reading from the environment in Catalog reads Z:\Data Repository\X,
I get the For Each Loop Container posted above!
This said, I am using a proxy for the SQL Server Agent to resolve other access issues such as moving a file into a folder using the File System Task.

How do I move 2 csv files from my local machine to a remote machine (both are windows machines) ?

I'm looking for a one click solution like a vbs or batch file which would copy 2 csv files from my local machine to a remote server on a particular location. This is primarily what I'm looking for.
Also, I would like to know if the same is possible if my account is not added into the server users list (I don't have access). Is there some way by which just that particular location will be shared?
You can try and share the specific folder on the server with your network. After that go to your client and open up the explorer. navigate to 'computer' and on the bottom you should find your network ressources. right click and add the server with his IP address. If done correctly you should have access to the servers folder as if it was one of your client. So you should now be able to create a desktop shortcut to the servers folder and be able to add files to the folder by drag & drop. Of course now you could write a simple batch file that copies all the contents of one of your folders to the servers folder.

Access to SQL Server FileTable from IIS

After creating filetable I've got a shared folder
\\<my domain>\mssqlserver\<filestream directory>\<my table>
I've made all nesessary settings in SqlServer Configuration manager to make it available and added couple of files with database stored proc.
I made virtual folder for my web site
http://localhost/<my ewb site>/<virtual folder>/
referencing shared table folder.
When I try to get file from folder I get en error:
HTTP 500.19 - Internal Server Error
Code 0x80070032
I found something in answer of this question
Access Denied when inserting file into Sql Server 2012 FileTable using File.CreateFile in ASP.NET website
But it's only a database part of configuring.
I don't understand how to configure IIS and virtual folder to grant access to shared folder.
Not sure if this is relevant to your situation, but I came across the same problem. 2 out of 3 sites that I setup worked fine with the UNC path virtual directory pointing to the SQL filetable share, but the 3rd site got the error above. The reason was because this site was had both IIS and SQL on the same server, and using the server name in the UNC path was causing a reparse and checking for directory change notifications, which mentioned in the comments above aren't supported by SQL. So I changed the UNC path to use localhost instead of the server name and it worked! So, instead of:
\\<my domain>\mssqlserver\<filestream directory>\<my table>
use:
\\localhost\mssqlserver\<filestream directory>\<my table>

reporting services physical path of the folder

I created a folder using the Report Manager URL but I would like to copy all the files to the different folder. Where is my folder located? I searched it but couldn't find it. Please let me know.
They aren't stored as physical files. They are stored in the Reporting Services database (called ReportServer by default if you don't have a named instance.)
You can't directly copy the files, but you can move them with the Report Manager interface.
To copy the files, use the RS scripting utility, or download and then upload the .rdl files to the new location.

Can I create a shared folder on remote machine?

I am trying to automate the Account Creation process in Active Directory and I want to create the user home directory on a server and then I want it to become a shared folder with some user permissions.
I can create folder on that machine (remote machine) but I cannot convert it to a shared folder. Is there a way I can do that. Note I can create shared folder locally and can set permissions but cannot do that when the machine is different.
Which language are you using to script ?
You can do exactly what you are doing localy, on a remote computer using psExec from SysInternals. You'll find at th end of this post how to do it in ldap mixed in with WMI.

Resources