Transfer json files from dropbox to SQL Server 2016 database tables - database

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/

Related

For xml query not creating xml file in SQL Server 2016

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.

Azure SQL Server to .sql dump file

I have an Azure SQL Server which I would like to dump out into a .sql file. How can I achieve this most easily, and preferably only using the provided tools? I have tried using the export functionality on the azure portal but that only seems to be for backing up the DB to another part of Azure. I need it to be a .sql dump file such that I can reconstruct this DB in postgres
Are you looking for something different than generating scripts with data?
This post discusses it:
Script all data from SQL Server database

How to create BAK file from azure sql db

I want to move my azure sql db to another host. However my new host allows to import sql db backup-files (.BAK) only;
I found out how to generate .BACPAK files with SQL Server Management Studio but I could not find a way to create a BAK-file from my azure sql db.
Please help.
However my new host allows to import sql db backup-files (.BAK) only;
SQL Azure doesn't provide a native way to generate '.bak' format backup file. If you did need this format file, you could import the BACPAC File to a local SQL Server which supports importing BACPAC File. After that, a new User Database will be created. Then you could generate a '.bak' format file from the local SQL Server.
In addition, you also could try a tool named SqlAzureBakMaker which could make '.bak' file for you easily.

Microsoft one drive to SQl Server using SSIS

can i use microsoft 1 drive to store the flat file and can i load the files from one drive to sql server database suing SSIS.Can any one share a thought on an alternative.Keeping the master data flat file on cloud and making it available on sql server.We do not want to download those files stored in cloud.The thing is would like to create ssis package to read the files on the cloud

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