For xml query not creating xml file in SQL Server 2016 - sql-server

I have created a SSIS package which functions in following manner:
Pick a .csv file from DFS location separate out error records and put error records in DFS path error folder as .csv file.
Proceed with the correct records and dump them into a database, where for XML query is used to create a XML file and store again in the DFS location.
To summarize:
Picks csv, generates (error records) csv and xml (correct data).
Issue:
My package is working fine locally creating both csv and xml files in the DFS location but when deployed on SQL Server 2016, only csv is getting created but not xml.. even logs does not show any error.
I tried these steps as a solution:
Checked I have all the access to DFS location
Created proxy account having database and DFS permissions
Created SQL Server Agent job and executed the package on server
Changed SQL Server configurations of DFS path to see anything wrong with configurations
Major concerns:
My package works fine locally creating both csv and xml.
Also I created the same environment of database tables which are used by my package in SQL Server 2012. Deployed it and ran through SQL Server Agent job and it worked correct creating both csv and xml.
I even created a dummy package having select * from abc for xml raw and deployed on both servers 2012 and 2016 and again it created XML for 2012 but not for 2016.
I am not sure what is the issue, is it database access issue, DFS permissions, proxy accounts or SQL Server versions.

Related

SSIS Package fails on Excel Source when run as a job from SQL Server Agent but it succeds when run in local from Visual Studio 2019

I have a SSIS Package that reads an excel file located in a NAS folder.
The excel file has multiple sheets, but I'm interested in only one named "GDP".
The SSIS package correctly runs and loads data to a table in the SQL Database.
I deployed the package and added it as a step in a SQL Server Agent job.
The job fails giving the following error:
Opening a rowset for "GDP$" failed. Check that the object exsists in the database.
Any suggestion about fixing this issue?

SSIS Project Deployment with excel

I created an SSIS project with multiple packages. One of my package has a data flow task using Excel as data source. After deploying the project to SQL SSISDB, I can see the .dtsx files in SSMS. But where should the excel file reside? Should it still be in my local machine. The SQL resides on another server and not my local machine. Where is the deployed packages stored?
Can someone explain these?
Excel file
If the excel connection manager are pointing to a fixed path on your local machine. It will throw an error when executed from different server since the excel file path is not found.
You have to use dynamic excel connections to fix this issue, or to use an excel file on a shared network location (UNC path).
Package deployment
After deployment, the packages are stored within SSISDB database:
Deploying Packages to SQL Server Integration Services Catalog (SSISDB)
Ways to use and execute SQL Server Integration Services packages
SSISDB for SQL Server Integration Services

SSIS Package (SQL 2016) getting failed from batch execution

We have developed SSIS package which had target framework SQL Server 2014.
Package has 2 states:
1. Which truncates the required SQL Table.
2. Pull data from SharePoint list data by hitting Service call and dumps data to truncated sql server table.
Latter on some SQL Server 2016 upgrades been done on server from IT department. So Dev team has to change target version in SSIS to SQL Server 2016. Which is working fine from SSDT tool (All states executes perfect).
The generated ".dtsx" I found in "~/obj/Development" path in source code directory. Then we developed the the batch file which is targeting to execute generated .dtsx file. If we executes the batch file as administrator it doesn't works, takes amount of time and shows "Operation TimeOut" at the end. Why should this is happening, any clue ?

Transfer json files from dropbox to SQL Server 2016 database tables

I have a requirement to automatically copy/transfer .json files that are located on dropbox to a SQL Server 2016 database. How can this be done, code examples. I have SQL Server 2016 but I am new to all of this.
If the .json files are in dropbox can SQL Server get them, then parse them into the database automatically or do I need something to copy the files down from dropbox first, then import these files directly or first parse then to some format (e.g. .csv) to populate tables in the SQL Server database?
SQL Server cannot directly access dropbox account. However, if you synchronize dropbox on some local folder or network path that is accessible by SQL Server, you can use OPENROWSET to read file and parse content with OPENJSON, see example in:
https://blogs.msdn.microsoft.com/sqlserverstorageengine/2015/10/07/bulk-importing-json-files-into-sql-server/

Is SSIS able to query flat files from another Windows Server?

I pretty new SQL Server Integration Server (SSIS) user. Is SSIS able to query data from text files located in another Windows Server? I mean that when SSIS is installed on Windwos Server A, is SSIS able to query data from e.g. one folder containing text files in Windows Server B (under same domain)? I have used only SAP BO Data Integrator ETL tool and it cannot query flat files from another Server: during execution, all files must be located on the Job Server machine that executes the job.
Yes, you can access text files on another server using SSIS by using a fileshare and accessing the files using the share name i.e. \\ServerB\MySSISFiles\.
You need to make sure that the account the SSIS is running under has access to the file share.

Resources