Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [varbinary]

The tag has no usage guidance.

1
vote
1answer
39 views

Insert String Value To Binary(64) Column

I am attempting to use a stored procedure to insert data into a table. The DDL of my table is like this: CREATE TABLE [dbo].[data1]( [ID] [int] IDENTITY(1,1) NOT NULL, [fname] [varchar](100) ...
0
votes
2answers
207 views

BLOB or VARBINARY to store simple Strings that are converted into byte[ ]?

I've read that In MySQL, BLOBs are often used to store image files, file path pointers, video & audio files, and any other big data objects. But can BLOBs be used for simple Strings that are ...
3
votes
1answer
334 views

GZip existing varbinary(max) column in Sql Server 2008+

I have an existing legacy table that is ~180GB in size due to a client application storing PDF files as varbinary. I'd like to be able to compress that column for all rows using GZIP to help save ...
5
votes
2answers
1k views

Please enlighten me about FILESTREAM and BLOB files

This is a really confusing topic for me. I can understand what a BLOB is, I can easily use it. I can understand what FILESTREAM is. I can easily implement in on a database, I can backup the database ...
8
votes
1answer
531 views

Best way to shrink a DB after nulling data from varbinary(max)?

We have a database with a large amount of data stored in a field of type varbinary(max). At some point we can purge that data for most rows, but not all. Our plan is to make that field nullable, and ...
0
votes
2answers
67 views

Database Choice

I am developing a desktop application where an embedded database is required. I need to choose database based on a few requirements: Ability to store binary data. Ability to encrypt data at rest. ...
0
votes
1answer
510 views

How to handle the junk characters upon conversion of the data from image datatype to varchar?

We are trying to convert the column of type image to column of type varchar(max). We tried the below way to do the conversion. --col1 is of type image --col2 is of type varchar(max) set col2 = ...
1
vote
1answer
52 views

Exporting Stored PDF into an Email

Just a quick question on whether something is possible to do. Database: MSSQL We have a customer that we generate emails for based on sales (e.g. Sales Person X sold Y amount of stock). Against ...
0
votes
2answers
366 views

Store Mesh in database

I hope this is the correct forum but will ask anyway: I have lots of Mesh data I want to store. Mesh is actually triangles. I hope it's not too of beginner question but wouldn't Geometry type of SQL ...
1
vote
1answer
541 views

Does IMAGE column affect query performance even if it's not included in the query?

Given the following table storing multiple milions of rows: CREATE TABLE [dbo].[files] ( [ID] UNIQUEIDENTIFIER CONSTRAINT [a] DEFAULT(NEWID()) NOT NULL, [OOUID] UNIQUEIDENTIFIER ...
2
votes
3answers
1k views

Index Maintenance for varbinary

We have a SQL 2016 database that has a 1.9bn row table which has a varbinary(255) column which we use to store the HashBytes of an nvarchar(2000) field in the same table. We have a Non-Clustered ...
3
votes
1answer
10k views

SQL Server - How can varbinary(max) store > 8000 bytes?

In SQL Server 2005 and 2008 R2, I'm calling into a stored procedure that has an out parameter defined as varbinary(max). The out parameter returns 10020 bytes according to DATALENGTH. However, SQL ...
0
votes
1answer
81 views

SQL Server Transaction Commits but results are missing

I am not sure how to describe the problem, so I will do the best I can and answer any questions. My project is a Database Project for SQL Server 2008 (client dependent). Within that project I have a ...
0
votes
2answers
6k views

Update a binary field

How to update a binary field from 0x54 to 0x46 (T to F)? Update dbo.table1 set field = convert(varchar,field,0x46) where fieldID = '1'
1
vote
1answer
397 views

Why does updating a large VARBINARY break replication (MSSQL_REPL21100)?

We have replication set up on a VARBINARY(MAX) column that stores image data (yes, yes, I know - don't blame me, I didn't design it). Recently, we started inserting larger images (around 200kb) and ...
0
votes
1answer
973 views

Update image using dynamic sql

I have been battling with this statement: ALTER PROCEDURE [dbo].[transact_image_update] -- Add the parameters for the stored procedure here @transact_recordID_int int, @image1_bin image, @...
4
votes
1answer
4k views

Convert Byte Array From XML to VARBINARY

I receive image files as XML data, each byte of the image being a node with its decimal value, e.g. for this example .png file, , the xml I get is: DECLARE @xml XML = N'<?xml version="1.0" ...
3
votes
2answers
1k views

8Kb row size limits ignored - but only sometimes!

As a result of poorly tested code (not mine!) I've ended up with a table containing 319 VARBINARY(MAX) fields, plus two DATETIME fields and two UNIQUEIDENTIFIER fields. Obviously this is not ideal, ...
1
vote
1answer
82 views

sql server replication - how to get combination of values from a binary(8) field?

I am using the table sysschemaarticles to collect information in my transactional replication. It is used for a variety of things including adding new articles and finding out who are the subscriber ...
0
votes
0answers
680 views

Export a varbinary column to file system using existing authentication

I want to export a varbinary column to a file system. I can use BCP command to export data from a varbinary column, which requires username and password being sent along with BCP command. I can use ...
0
votes
1answer
4k views

converting then outputting varbinary(max) FOR XML PATH

I have a vendor application that has stored some of its text data in a varbinary(max) column. I am exporting this data (from several tables with different data types), ideally using FOR XML PATH. What ...
1
vote
2answers
1k views

Trying to filter msdb..sysjobs by job_id

I'm attempting to determine the name of the SQL Server Agent Job that is currently running by comparing the output of master.sys.dm_exec_sessions.program_name to msdb..sysjobs.job_id I'm using the ...
16
votes
2answers
125k views

Converting a VARCHAR to VARBINARY

I've been keeping a log of expensive running queries, along with their query plans, in a table to allow us to monitor trends in performance and identify areas that need optimising. However, it's come ...
5
votes
2answers
7k views

Comparing binary 0x and 0x00 turns out to be equal on SQL Server

It seems that SQL Server considers 0x and 0x00 equal values: SELECT CASE WHEN 0x = 0x00 THEN 1 ELSE 0 END This outputs 1. How can I get true binary bit-for-bit comparison behavior? Also, what are ...
1
vote
2answers
1k views

How do I migrate varbinary data to Netezza?

I got a warning message while migrating DDL from SQL Server to Netezza: Warning: [dbo].[spec_binarymessage].[blobdata] data type [varbinary] is not supported the target system and will be scripted ...
6
votes
3answers
4k views

SQL Server - Varbinary Column - Extremely Slow Statistics Update

I have a table in my database that we use as a filestore, the file itself is stored in a varbinary column, which all seemed to work well until recently, we noticed one of our instances of this table ...