pgadmin4 upload file option is not understand below picture is for your reference - pgadmin-4

Could you Please let me know what is this option in PgAdmin4

This option is useful when you run pgAdmin4 in SERVER mode where your DATA_DIR directory is on remote web server and you want to import some file for example a CSV file from your local system into your table, Web server can not access your local system files directly so first you have to upload that CSV file on that web server and then you can import that CSV file into your table.
Hope this will be useful.

Related

Azure Data Studio: unable to restore SQL Server database - Access Denied

I'm in the process of migrating the database from one server to another. When I try to select the backup file (.bak) within Docker, I'm getting an 'Access Denied' error. How to provide access permission to the Docker container?
enter image description here
I had the same error, and what I concluded is that the problem is the file is not in the format it should be, to be precise since I have remote access to my Linux server with GUI, I just copied the .bak file from the windows machine to Linux, which I repeat is not advised way to transfer files form one OS to another. I solved the problem by posting .bak on Google Drive and then generating a download link that I typed in the terminal later.
To generate a proper link from Google Drive I recommend the following guide:
https://bytesbin.com/skip-google-drive-virus-scan-warning-large-files/
When you get the link type in the terminal:
$ curl -L -o The_Name.bak "The_link"
For restoring the database follow this tutorial:
https://learn.microsoft.com/en-us/sql/linux/tutorial-restore-backup-in-sql-server-container?view=sql-server-ver16

How to use SQL loader when loading from remote data file?

I am trying to load data in Oracle database from BCP files.
The Oracle database server is located on remote machine. In my control file I have added path to BCP file as - load data INFILE 'C:\path\to\bcpFile.txt'. This does not work if BCP files are not on same machine as DB server. One option I found is to create network mapping on my windows machine to the linux DB server. But this has manual overhead. I learned we can use LOAD DATA LOCAL INFILE to fetch data files, I would like see an example for this.
Install the full Oracle Client which includes SQL Loader on your Windows Computer
SQL Loader is included with full Oracle Client installs.
Once installed, make sure your infile section properly references your datafile using the correct syntax.
With the path you provided, this section would look like this:
INFILE 'C:\path\to\bcpFile.txt'

Informatica Cloud - Picking up files from SFTP and inserting records in Salesforce

Our objective is as follows
a) Pick up a file "Test.csv" from a Secure FTP location.
b) After picking up the file we need to insert the contents of the file into an object in Salesforce.
I created the following connection for the Remote SFTP (the location which will contain "Test.csv")
Step 1
This is as shown below
Step 2
Then I started to build a Data Synchronization Task as below
What we want is for the Informatica Cloud to connect to the secure FTP location and extract the contents from a .csv from that location into our object in Salesforce.
But as you can see in Step 2, it does not allow me to choose .csv from that remote location.
Instead the wizard prompts me to choose a file from a local directory (which is my machine ...where the secure agent is running) and this is not what I want
What should I do in this scenario ?
Can someone help ?
You can write a UNIX script to transfer the file to your secure agent and then use informatica to read the file. Although, I have never tried using sftp in cloud, I have used cloud and I do know that all files are tied up to the location of the secure agent( either server or local computer) .
The local directory is used for template files. The idea is that you set up the task using a local template and then IC will connect to the FTP site when you actually run the task.
The Informatica video below shows how this works at around 1:10:
This video explains how it works at around 1:10:
http://videos.informaticacloud.com/2FQjj/secure-ftp-and-salesforececom-using-informatica-cloud/
Can you elaborate the Secure agent OS as in Windows or Linux.
For Windows environment you will have to call the script using WINSCP or CYGWIN utility I recommend the former.
For Linux the basic commands in script should work.

Upload Images to Azure Storage Using Portal (not programmatically)

I need a SQL Server database that stores images, and their name, category, etc, so the SQL table will have 5 or so columns. I'm using Azure as my SQL Server host. It appears I cannot seem to insert image data into my VARBINARY(MAX) column from SQL Server Management Studio which was my first plan. I cannot do this because I cannot seem to give my user permissions to use BULK LOAD. Azure SQL seems to make this impossible. I think I need to use Azure Storage, and then in the SQL Server database, just store a link to the image.
To be clear, I want the images in the database already, I do not want to add them from within the application I am developing. The application I'm developing will only download the images to the device, not upload them.
So How do I upload the images to Azure Storage using the portal, not using code?
So how do I upload the images to Azure Storage using the portal, not using code?
Short Answer
You cannot. The portal does not have a way to upload an image to a storage container from either the old or the new portal.
Alternative
Use the AzCopy Command-Line Utility by Microsoft. It allows you to do what you want with just two command lines. There is terrific tutorial here.
First, download and install the utility. Second, open a command prompt and navigate to the installation AzCopy install directory. Third, upload a file to your storage account. Here are the second and third steps.
> cd C:\Program Files (x86)\Microsoft SDKs\Azure\AzCopy
> AzCopy /Source:folder /Dest:account /DestKey:key /Pattern:file
And here are what the parameters mean.
Source The folder on your computer that contains the images to upload.
Dest The address of the storage container at which to store the images.
DestKey The primary access key for your storage account.
Pattern The name of the file to upload (or a pattern).
Example
This uploads an image named my-cat.png from the C:\temp folder on my computer to a storage contained called mvp1. If you wanted to upload all the png images in that folder, you could replace my-cat.png with *.png and it work upload them all.
AzCopy /Source:C:\temp /Dest:https://my.blob.core.windows.net/mvp1 /DestKey:tLlbC59ggDdJ+Dg== /Pattern:my-cat.png
You might also what to take a look at the answers to this question: How do I upload some file into Azure blob storage without writing my own program?

How to read a remote xml file from SQL Server 2005

Can I read a XML file from remote server such as
http://dealer.somedomain.com/data/inventory.xml
I need read and get data from this remote XML file and update some local tables.
I use SQL Server 2005.
Thanks in advance.
Your task can be split into two sub-tasks.
Downloading the file over HTTP to your local PC (to a temporary folder).
Importing the XML file into SQL Server.
You can use SSIS for both. Once you look for "SSIS downloading over HTTP" or "SSIS downloading from website" you will find many tutorials for file download.
For the second step you will need data import, there are plenty tutorials as well, here is just an interesting pick.
You can find ready solutions including data download and import all-in-one, like here.

Resources