Can't selectively delete image datatype BLOB data on SQL Server
Hi all,
I have a huge amount of BLOB data on an SQL Server 2008 DB (10.0.5500), in a table with an image datatype column. I need to selectively delete it from datafiles using a where filter on the table.
I tried to use UPDATETEXT dbo.TBL_EMAILOUTBOUND_DSC.DESC_RAWDATA
@ptrval 0 NULL;
loading the pointer with a previous filtered select, according
documentation it should work, but it's not true. Do I make any mistake or forget something? If you need I can show the hole script.
Thank you in advance
Andrea
Andrea
Great to hear that it worked out!
Below is detailed data of test. Thank you all.
sp_spaceused
name rows
reserved data
index_size unused
TBL_EMAILOUTBOUND_RD_NEW 4768 --> 8156504 KB
8156128 KB 24 KB
352 KB
update table_name set LOBcolumnName = null;
name rows
reserved data
index_size unused
TBL_EMAILOUTBOUND_RD_NEW 4768 --> 2456 KB
2112 KB 24 KB
320 KB
ALTER INDEX ALL ON tbl REORGANIZE
name rows
reserved data
index_size unused
TBL_EMAILOUTBOUND_RD_NEW 4768 --> 176 KB
144 KB 24 KB
8 KB
Andrea
Similar Messages
-
Hex string upload as blob data to sql server
It need to open a file and read the content and upload to sql server(2005) as blob data.
But it seems give error as the attached screen.
So I tried to convert the file content string to hex string, but it take quite long time.
Is there any way to shorten the time or any other ways.
Any suggestion, thanks.
Attachments:
ss.png 73 KBTry this.
-
Help abt store and delete images as blob & bfile using Visual C++
Hi
Does anyone knows if there is code for visual c++
to store and delete images as blob or bfile?
thanxThe documentation states there are examples in the oracle database distribution: <ORACLE_HOME>/rdbms/demo/cdemolb.c <ORACLE_HOME>/rdbms/demo/cdemolb2.c <ORACLE_HOME>/rdbms/demo/cdemolbs.c
These examples are in c, but can be used in c++
http://otn.oracle.com/doc/server.815/a67846/app_exam.htm#430289 -
Can't select an image to use for a signature in Reader XI
Using Adobe Reader XI, I can't select an image to use as a signature. I have an image saved as a JPEG, but using an image is never an option. I only see the option to use a certificate.
Help!A signature in a PDF is a digital signature. It consists of metadate, and not an image or physical signature.
-
Can't select placeholder image in template
Hello there,
perhaps I'm too stupid and the solution is such easy. But today I wanted to use the template "You're invisited" to style an invitation for a friends birthday party. In iWork '06, I could select the images on the left side on page 1 and 2 to insert an own image. Now, in iWork '08 it seems to be a text box including image and text - I can't select the image only. Consulting the manual did not solve this, so I'm looking here for help. Thanks a lot in advance
KlausI can't duplicate the problem you're having. When I open that "festive invitation" template in Pages 3 I can select either the picture or the text box, they are not grouped or otherwise linked. The picture is a "media" placeholder, same thing as image placeholder in Pages 1 & 2. This one does have a mask applied, but none of that prevented me from inserting a picture of my own choosing.
-
Help! Can't select an image
I am no Photoshop expert but I have been using CS6 for a long time. Suddenly I can't select my image. I always clicked on the icon in the layers palette and it was "marching ants". Not working. I figured out a backdoor way yesterday but if someone can tell me how to reset PS (which I've done twice before but I forget how now) I would appreciate it. Called support but they said I had to wait until Monday and I work.
A signature in a PDF is a digital signature. It consists of metadate, and not an image or physical signature.
-
How to transfer BLOB type of data from SQL Server to Oracle
Hi,
Actually, I create a table with BLOB type data in SQL server. In fact, there is not exact BLOB type in SQL server, it will be separated to image and ntext types. But there is exact BLOB type in Oracle.
I don't know how to transfer this "BLOB" type into Oracle with DTS or any other methods.
Many Thanks for your any suggestions,
CathyJAVA_GREEN wrote:
No i haven't mixed up.But the file from where i have to retrieve the data is in csv format.Even though i created another csv driver.and tried but i cud not find a solution to load/transfer a set of records from one file(in Excel/csv format) to another file(in mdb format).plz help me.Is there any other methods for this data transfer.A csv file is NOT an excel file.
The fact that Excel can import a csv file doesn't make it an excel file.
If you have a csv file then you must use a csv driver or just use other code (not jdbc) to access it. There is, normally, a ODBC (nothing to do with java) text driver that can do that. -
How to select data from Sql server 2005 database tableinto oracle database table
Hi,
I have table text1 in sql server database and text2 in oracle database (11g). Now how to move data from SQL Server table into oracle table. So please help me how to do it.
Thanks a lot in advance.
rk
OS: Windows 7 professionalHi,
you can use export/import wizard and specify sql server as a source and oracle as destination.
I hope this is helpful.
Please Mark it as Answered if it answered your question
OR mark it as Helpful if it help you to solve your problem
Elmozamil Elamir Hamid
MCSE Data Platform
MCITP: SQL Server 2008 Administration/Development
MCSA SQL Server 2012
MCTS: SQL Server Administration/Development
MyBlog -
How can I migrate data from SQL Server 6,5 to Oracle 8?
We have a web site based on Microsoft SQL Server 6.5.Now we plan
to migrate the database to Oracle 8.
We have redesigned the tables structure and created tables under
Oracle 8, so we only need to migrate data from SQL Server.
We've exported data from SQL Server to text files.
How can we import data from files and restore to Oracle tables.
Is there a solution which let us to import data for particular
table columns,not all columns?
We'll be appreciated if somene can give suggestions.
Regards
Michael
nullThank you for your reply.
I'll try the Oracle sqlloader utility first.
Regards
Micahel
Oracle Migration Workbench Team wrote:
: Michael,
: Oracle sqlloader is user for this sort of operation, see
: Oracle8i Utilities
: Release 8.1.5
: A67792-01
: available online through Oracle Technology Network.
: The Oracle Migration Workbench can be used to create bcp and
: sqlloader scripts, though since you have altered the schema
these
: scripts would need to be altered by hand after generation.
: Some thought has been put into redesigning table structures in
: the Oracle Migration Workbench, but currently it looks like
this
: reengineering will be left to be done by other tools, eg
Oracle
: Designer, once the SQLServer database has been duplicated with
as
: little change as possible onto Oracle.
: Hope that helps,
: Turloch
: Oracle Migration Workbench Team
: Michael (guest) wrote:
: : We have a web site based on Microsoft SQL Server 6.5.Now we
: plan
: : to migrate the database to Oracle 8.
: : We have redesigned the tables structure and created tables
: under
: : Oracle 8, so we only need to migrate data from SQL Server.
: : We've exported data from SQL Server to text files.
: : How can we import data from files and restore to Oracle
tables.
: : Is there a solution which let us to import data for
particular
: : table columns,not all columns?
: : We'll be appreciated if somene can give suggestions.
: : Regards
: : Michael
: Oracle Technology Network
: http://technet.oracle.com
null -
Can you tell me how I can put the data of sql server into SAP to auto gener
Dear all,
Can you tell me how I can put the data of sql server into SAP to auto generate PR?
Best regards,
Merry zhangMany thanks ,it is ok now.
-
Error while exporting data from sql server to excel
Hi,
I am trying to export data from sql server to excel.
The query that I used is s follows
INSERT INTO OPENROWSET( 'Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=C:\Folder1\abc.xls','select * from [Sheet1$A1:IV65000]')
select
column1,column2.... from Table1
I get the following error message while doing so..
String or binary data would be truncated.
The statement has been terminated.
One of the column's holds data more than 225 characters.
What is the way to correct this, i want the whole data of the colum in the excel sheet.I haven't had great luck with the INSERT INTO OPENROWSET method. Can you try one of the many samples from one of these 3 links?
http://www.excel-sql-server.com/excel-sql-server-import-export-using-vba.htm#Excel%20Data%20Export%20to%20SQL%20Server%20Test%20Code
http://www.mssqltips.com/sqlservertip/1540/insert-update-or-delete-data-in-sql-server-from-excel/
https://www.simple-talk.com/sql/database-administration/getting-data-between-excel-and-sql-server-using-odbc--/
Knowledge is the only thing that I can give you, and still retain, and we are both better off for it. -
How to compare 2 dates in SQL Server 2000 DB using Java?
How do you compare 2 dates in SQL Server 2000 DB using Java?
Let's say we have two fields: Date Reported and Target Finish Date.
Date Reported is 09-10-2004 09:55:55: PM
Target Finish Date is 09-12-2004 11:59:59: PM
What i want to happen is i want to convert both dates to days and get the difference of the two.
can SQL Server 2000 DB do this?it doesnt wrk.
ok here's what i did:
iv tested a simple code for this case.
I created a table name tblDate which has 3 columns namely date_ID, date_From (datatype datetime), date_To (datatype datetime).
I inserted 1 row: date_ID has the value 1, date_From has the value 10/22/2004, and date_To has the value 10/24/2004.
i run the java code below:
int days = 0;
String query = "SELECT date_From, date_To cast(date_From-date_To AS int) AS Diff FROM tblZoo WHERE date_ID = '1'";
try
DBConnect db = new DBConnect();
db.openCon();
ResultSet rs = db.execute(query);
while(rs.next())
days = rs.getInt("Diff");
db.closeCon();
catch (Exception ex)
System.out.println("Error on Execution: " + ex);
return days;___________
an error occurred: Error on Execution: java.lang.nullpointerexception -
Import data from SQL Server to Oracle
I have created a dblink in oracle to access the SQL database. I am able to run queries through the dblink and it works fine. I have created a test table on Oracle Server to import the data. The field named "description" has CLOB data type. The corresponding datatype on SQL Server is varchar(7000).
When I insert the data from SQL Server, it completes successfully without any error but it truncates the data on CLOB field.
If I run the select query in SQLPlus I can see the entire description.
Select "description" from sql_view@dblink;
-- the above works fine.
CREATE table test
(description CLOB);
INSERT INTO TEST
Select "description" from sql_view@dblink;
-- this works but it truncates the data after 256 characters
My question is, how to get the data from SQL Server without truncating characters.
Thanks in advance,
GopalI hear the same from other friend that sql server truncated the leading zeros from the id column.
I really don't have a solution for this but you can try the work around. Export the data to flat file and upload in oracle using SQL loader, as this would be much faster and efficient. -
Error while reversing data from SQL Server to ODI
hi,
I was reversing data from SQL Server Java 1.6_022 in ODI Java 1.5, I was getting error Version Mismatch and I updated ODI Java version to 1.6_022.
And now, I am getting the below error while reversing the data from SQL Server database.
0 : 08001 : java.sql.SQLException: No suitable driver
Looking for the assistance on the same.
Thanks,
AbhayIf everything is fine the reversing should be fine. I would say check again if the Technology of the Model and the also the dataserver is created under the right Technology in topology too.
also if this doesn't help , Please tell us the steps you have carried so far . Also can you try selective reverse is it showing the tables. -
Migrating a table with BLOB field from SQL-Server to Oracle.
Hi All,
I'm trying to create a Class to migrate data from SQL-Server to Oracle, this table has a BLOB field.
The Code:
package br.com.infox;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Statement;
public class Migrador {
public static void main(String[] args){
try {
// Conex�o com o SQL Server
Class.forName("net.sourceforge.jtds.jdbc.Driver");
Connection conSQL = DriverManager.getConnection ("jdbc:jtds:sqlserver://10.10.2.9/protocolo","prot","suinf2002");
// Conex�o com o Oracle
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection conORA = DriverManager.getConnection ("jdbc:oracle:thin:@10.10.2.2:1521:des","protocolo","protocolo");
Statement stSQL = conSQL.createStatement();
String querySQL = "SELECT * FROM DOC_INCORPORADO";
ResultSet rsSQL = stSQL.executeQuery(querySQL);
String queryORA = "INSERT INTO PROT_VITALICIAMENTO (NU_PROCESSO, ANO_PROCESSO, CD_USUARIO, DT_ENVIO," +
"DE_COMPLEMENTO, NM_ARQUIVO, ARQUIVO, NU_SEQ, CD_TIPO_ARQUIVO, MES, ANO) VALUES (?,?,?,?,?,?,?,?,?,?,?)";
PreparedStatement psORA = conORA.prepareStatement(queryORA);
while (rsSQL.next()){
System.out.println("Linha: " + rsSQL.getRow());
psORA.setInt(1, rsSQL.getInt("nu_processo"));
psORA.setInt(2, rsSQL.getInt("ano_processo"));
psORA.setInt(3, rsSQL.getInt("cd_usuario"));
psORA.setDate(4, rsSQL.getDate("dt_incorporacao"));
psORA.setString(5, rsSQL.getString("complemento"));
psORA.setString(6, rsSQL.getString("nm_arquivo"));
psORA.setBinaryStream(7, rsSQL.getBinaryStream("arquivo"), (int)rsSQL.getBlob("arquivo").length());
psORA.setInt(8, rsSQL.getInt("num_seq"));
psORA.setInt(9, rsSQL.getInt("cd_tipo_arquivo"));
psORA.setInt(10, rsSQL.getInt("mes"));
psORA.setInt(11, rsSQL.getInt("ano"));
psORA.executeUpdate();
stSQL.close();
psORA.close();
conORA.close();
conSQL.close();
} catch (Exception e){
e.printStackTrace();
The ERROR:
java.sql.SQLException: Exce��o de E/S: Connection reset
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:334)
at oracle.jdbc.ttc7.TTC7Protocol.handleIOException(TTC7Protocol.java:3668)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1119)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2191)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2064)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2989)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:658)
at br.com.infox.Migrador.main(Migrador.java:41)
What's the problem of these Class?
Thank's.Depending on the version of the database you have, you could use transportable tablespaces.
http://download-east.oracle.com/docs/cd/B10501_01/server.920/a96524/c04space.htm#9370
Maybe you are looking for
-
Inverse Color iTunes - 2 of 2 iTunes issues in 10.9
This is happening only on my MB Air: Since on Maverick, the iTunes windows have a black background. The main window has text that has the color that the background is supposed to have, i.e. that bland extra-light Apple-gray we all have to love. This
-
Adobe Application Manager error when installing for Photoshop Elements 11
Unable to install AAM on Windows 7 system. Error message: "Failure to install AAM"
-
I need urgent help to remove unwanted adware from my iMac. Help!
I need urgent help to remove unwanted adware from my iMac. I have somehow got green underline in text ads, pop up ads that come in from the sides of the screen and ads that pop up selling similar products all over the page wherever I go. Its getting
-
After burning cds on iTunes using my Mac, every track seems to skip
I've been always burning cds on iTunes. Lately, I burned about 3 cds and everytime I play them, every track seems to skip. Is there a solution for this? I'm not sure if it's the burner or something else. Please help!
-
Adding Custom Fields for Change Request in EHS
Hi, I need to add custom fields in Change request screen, where I am not able to identify for BO and node to do same. Its Configuration name /MOC/F_ISS_ROOT_OBJECT_INFO. I tried with /IAM/ISSUE and /IAM/ACTIVITY BO.. but it is not working. Not able