bcp | A convenient block copy program
kandi X-RAY | bcp Summary
kandi X-RAY | bcp Summary
A convenient block copy program. bcp is intended to copy contiguous chunks of files from point A to point B. Want to cookie-cutter a piece out of of a file and plop it down in the middle of another file? Here you go. The main use case I want for myself is doing light surgery to disk images, such as "copy this bootloader block into the image at this offset".
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of bcp
bcp Key Features
bcp Examples and Code Snippets
Community Discussions
Trending Discussions on bcp
QUESTION
I'm trying to import data from semicolon separated csv file into a SQL Server database. Here is the table structure
...ANSWER
Answered 2022-Mar-12 at 12:06The SQL Server import facilities are very intolerant of bad data and even just formatting variations or options. In my career, I have literally spent thousands of work-hours trying to develop and debug import procedures for customers. I can tell you right now, that trying to fix this with SQL alone is both difficult and time-consuming.
When you have this problem (bad data and/or inconsistent formatting) it is almost always easier to find or develop a more flexible tool to pre-process the data into the rigid standard that SQL expects. So I would say that if Excel can parse it then just use Excel automation to pre-process them and then use SQL to import the Excel output. If that's not practical for you, then I'd advise writing your own tool in some client language (C#, Vb, Java, Python, etc.) to pre-process the files.
You can do it in SQL (and I have done it many times), but I promise you that it is a long complicated trek.
SSIS has more flexible error-handling for problems like this, but if you are not already familiar and using it, it has a very steep learning curve and your first SSIS project is likely to be very time-consuming also.
QUESTION
I am a self-confessed beginner level when it comes to RHEL and I can navigate around, find things, run things etc. And I only have basic permissions on my DEV, INT, PROD and BCP servers at my client as most of my time is taken up in complex development.
I use ksh scripts to launch Tomcat, and for the new version of my project it is a SpringBoot launchable JAR file. New deployments will feature a dynamically changing jar/file name deployed from Nexus such that instead of the fixed name (in the older Tomcat setup for exploded folder in /webapps) I will need to look it up as it'll have a changing version number at the end.
I came up with this:
...ANSWER
Answered 2022-Mar-01 at 16:32Change:
QUESTION
I have ndjson
file Patients.ndjson
ANSWER
Answered 2022-Feb-22 at 12:04See the section about variables for jinja2, you only need a small change:
main.py
QUESTION
I've been researching a way to automate extraction of blob columns to files, and this blog details a few ways to do it.
Via BCP, larger files extract from my database very quickly. I'm able to extract a 2 gigabyte file in under 20 seconds. Here's the sample command line I used, based on the examples in the blog:
...ANSWER
Answered 2021-Oct-13 at 07:41You don't need the BinaryWriter at all. That class is only meant to write primitive types like integers, doubles, strings etc in a .NET-specific format. It's rarely used.
If you want to write bytes to a file all you need is to use Stream.Write :
QUESTION
As part of BCP/Disaster Recover planning, we want to simulate a restoration scenario of the application gateway template we have in bitbucket.
I have the json template as well as parameters file in the repository, but I also see a WAF rule template files for the gateway.
So basically there are 4 files....but the New-AzResourceGroupDeployment
only takes in the main template file (-TemplateUri
) as well as parameters file (-TemplateParameterUri
). so how would i be able to specify the WAF templates as part of the gateway creation?
I do see references to the WAF rules in the main gateway template file but is that enough?
sku information:
...ANSWER
Answered 2022-Jan-03 at 09:41You can add WAF policies while creating the WAF v2 Gateway by just adding the below in the Template file in the same way it has been done in this Microsoft Documentation
and providing the values as per your requirement :
QUESTION
I want to create format file (.fmt) for SQL server for bulk insert from azure blob storage. I'm using the following code:
...ANSWER
Answered 2021-Dec-02 at 06:40Error suggests that, you have an issue with PATH in environment variable.
"'bcp' is not recognized as an internal or external command, operable program or batch file."
You can resolve above error by setting correct path in environment variable settings.
BCP_PATH = ODI_HOME\oracledi\client\odi\bin\odi.conf
should be added in environment variable settings.
Refer - https://community.oracle.com/tech/apps-infra/discussion/4140433/bcp-is-not-recognized-on-odi-12c
QUESTION
I'm trying to figure out how to fix this issue but I'm not really sure on what needs to be changed,
Here is the code:
...ANSWER
Answered 2021-Dec-01 at 15:20Let's start with the second error: This happens because your delegate in bcp.SqlRowsCopied += delegate (object sender,SqlRowsCopiedEventArgs e)
has a arguments named sender
and e
which are equal to an enclosing method's arguments. Rename both arguments to something else.
The first error is probably a followup. Unless you have manually edited the method declaration, it should automatically be created when you added the event handler in the XAML editor.
QUESTION
Downloading a file from SharePoint using VBA results in a corrupt file
Hi working from the above question I have been trying to download a file from our Teams Sharepoint to a server location on our Local Network. However, the file is not opening correctly, even before I try and download it (see my code below). The excel file does open but no data or grid is displayed
My observation is my file link looks different from the example, but as it is generated by the "Copy Link" button in sharepoint I am assuming (which can be dangerous) it is ok. I can open the file manually
The other observation is that another user maybe accessing the file at the same time
Any advice please or suggestions.
The aim of the macro is to open a sheet, remove any filters other users may have put on the export to a local network as a csv (The file will be picked up by bcp for SQL server)
My starting code is
...ANSWER
Answered 2021-Nov-26 at 15:28You need to be authenticated to SharePoint (logged in). Your code in this and in the previous topic does not seem to include any kind of authentication.
File is probably not corrupt, it is just "access denied" page you are downloading instead of the file. You can check the content of your file using notepad for example.
URLDownloadToFile
is great for internet download, but you need to authenticate user against SharePoint. This is not trivial with VBA. I would recommend you use some tools that are more appropriate for the task instead of VBA, like power automate for example.
QUESTION
I am loading data into SQL Server using bcp command line utility. The problem is data is coming is like below. Every field in double quotes and I have to skip last three rows because it has some trailers. How can i solve this? Thanks in Advance. I appreciate if you could help in this.
...ANSWER
Answered 2021-Nov-19 at 23:02If you want to:
unconditionally remove all
"
chars.unconditionally skip the last 3 lines:
QUESTION
I am a bit struggling to find the best approach to achieve this.
I am trying to achieve a full automated process to spin up a Microsoft sql server, a SQL Database using terraform, and ultimately, when I have all the infra in place, to release a *.dacpac
against the SQL Database to create tables and column and ultimately seed some data inside this database.
So far I am using azure pipeline to achieve this and this is my workflow:
- terraform init
- terraform validate
- terraform apply
- database script (to create the tables and script
The above steps works just fine and everything falls in place perfectly. Now I would like to implement another step to seed the database from a csv
or excel
.
A did some research on google and read Microsoft Documentation but apparently there are different ways of doing this but all those approaches, from bulk insert
to bcp sqlcmd
, are documented with a local server and not a cloud server.
Can anyone please advice me about how to achieve this task using azure pipeline and a cloud SQL Database? Thank you so so much for any hint
UPDATE: If I create a task in release pipeline for cmd script. I get the following error:
...ANSWER
Answered 2021-Nov-12 at 16:31It should be actually quite simple:
The following example imports data using Azure AD Username and Password where user and password is an AAD credential. The example imports data from file c:\last\data1.dat into table bcptest for database testdb on Azure server aadserver.database.windows.net using Azure AD User/Password:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install bcp
Rust is installed and managed by the rustup tool. Rust has a 6-week rapid release process and supports a great number of platforms, so there are many builds of Rust available at any time. Please refer rust-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page