f



Inserting a binary file into a Long Raw column

Hi

Is there anybody who can give me some sample code for inserting a large
binary file into a LONG RAW column?  I have managed to do it if the file is
less than 32Kb.

Any jelp will be appreciated.

Regards
Ozzy


0
ozzyknox (1)
7/5/2003 6:52:41 PM
comp.databases.oracle.server 22978 articles. 1 followers. Post Follow

0 Replies
413 Views

Similar Articles

[PageSpeed] 22

Reply:

Similar Artilces:

Inserting the binary data into the oracle database
Hi, I'm a newbie to oracle. I'm trying to insert the binary data using the c interface OCI. The field i am inserting in database table is of type RAW(16). int main(int argc, char* argv[]) { String uuidStr = _T("33958A21AAEF3378890201F695868FF9") ; /* some how we are converting the uuidStr to 16bytes hex value and put into buf as binary */ text *insert_sql=(text *)"insert into table(uuid) values (: 1)"; if(OCIStmtPrepare(stmthp, errhp, insert_sql, strlen((char*)insert_sql), (ub4) OCI_NTV_SYNTAX, (ub4) OCI_DEFAULT)) { printf("Error\n"); } /* binding the position with the buffer containing the binary data */ if (OCIBindByPos(stmthp, &bindnps[0], errhp, 1, (dvoid *)buf, (sb4)buflen, SQLT_BIN, (dvoid *) &indps[0], (ub2 *) 0, (ub2 *) &rcodes[0],0,0, OCI_DEFAULT)) { printf("Error\n"); } if(OCIStmtExecute(svchp, stmthp, errhp, (ub4) 1, (ub4) 0, (CONST OCISnapshot *) NULL, (OCISnapshot *) NULL, OCI_STMT_SCROLLABLE_READONLY )) { my_printerror(errhp);/* text msgbuf[1024]=""; int errcode=0; ...

How to read long raw column data into a file
Hi all, What would be easier way to read long raw column "data" into a file? Oracle version 9.2.0.7 Thanks in advance SS Simo Silmu wrote: > Hi all, > > What would be easier way to read long raw column "data" into a file? > > Oracle version 9.2.0.7 > > Thanks in advance > > SS C, C++, or Java ... Depends on which one you know best. -- Daniel A. Morgan University of Washington damorgan@x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.org ...

Insert large binary file in database (MySQL)
Hello! Probably a stupid question ... How can i insert large binary file in MySQL using IO stream? For example, 'Sequel' can do 'insert' as: dataset << {:name => 'a name', :value => 'some value'} i need something like: File.open('path_to_binary_file'){|file| dataset << {:name => 'a name', :value => file} } Thanks! -- Posted via http://www.ruby-forum.com/. In Java it can be done this way: File file = new File("/home/sumedha/sumedha.jpg"); fis = new FileInputS...

insert values in text file to Oracle database
Hi I have values in a text file for example; A;100 B;200 C;300 D;400 .......... It is time consumming to type insert into table values ('A',100); insert into table values ('B',200); ..... Is there any mechanism in Oracle to insert automatically from a text file? Thanks Ngoc "ngoc" <linh@chello.no> wrote in message news:5HKNb.268$O41.874@amstwist00... > Hi > I have values in a text file for example; > A;100 > B;200 > C;300 > D;400 > ......... > It is time consumming to type > insert into table values ('A',100); > insert into table values ('B',200); > .... > Is there any mechanism in Oracle to insert automatically from a text file? > > Thanks > Ngoc > Yes, and much faster. Look in the documentation for SQLLoader. Also in 9i you can use an external table. Jim ...

Create XML file from XMLTYPE column in oracle database #2
Hi All, Could someone please help me how to create xml doc from database with xmltype datatype? I want something like utl_file.put_line. Help appreciated. Thanks! ...

Restoring Oracle 9.0.1 database from original files (server was rebuilt)
Here's my issue ... our database server was rebuilt but all the original files were backed up before the server was rebuilt. The server was shutdown correctly so I'm not worried about a bad shutdown but I've never done this before. It's on a Windows2000 box. I've reconfigured the server to the same way it was before, but I'm unsure which files and I should exclude and/or include to get the box running the way it was before. Can anyone point me in the right direction to an article that outlines how to do this? I'm more a developer than DBA, but I set up the original box and it ran great. Thanks, Joe On Mar 5, 7:01 pm, sandoval....@gmail.com wrote: > Here's my issue ... our database server was rebuilt but all the > original files were backed up before the server was rebuilt. The > server was shutdown correctly so I'm not worried about a bad shutdown > but I've never done this before. It's on a Windows2000 box. I've > reconfigured the server to the same way it was before, but I'm unsure > which files and I should exclude and/or include to get the box running > the way it was before. > > Can anyone point me in the right direction to an article that outlines > how to do this? I'm more a developer than DBA, but I set up the > original box and it ran great. > > Thanks, > Joe Define 'all the original files'. If these include your controlfiles you should be set, and ...

Can't database files of Oracle 9i be set up on raw volume device?
The Oracle 9i installer displayed it can't be written when I set up database files on /dev/md/rdsk/d1 or /dev/md/dsk/d1. $ showrev Hostname: sun01 Hostid: 83f6d985 Release: 5.9 Kernel architecture: sun4u Application architecture: sparc Hardware provider: Sun_Microsystems Domain: amkor.com.cn Kernel version: SunOS 5.9 Generic 117171-07 Jun 2004 how to fix the issue? Thanks. "newbie" <cd@hotmail.com> wrote in message news:e1kdip$lqo$1@news.yaako.com... > The Oracle 9i installer displayed it can't be written when I set up > database > files on /dev/md/r...

select LONG RAW column into BLOB column?
Hi all, and thanks in advance... What's the clever way to create and populate a new table from the contents of an old table, but converting the LONG RAW columns in the old table to BLOB columns in the new one? Ie: What is the conversion function I could use to do: insert into mynewtable (select convert_to(BLOB, myLongCol) from myoldtable). thanks. Joe Joe Weinstein schrieb: > Hi all, and thanks in advance... > What's the clever way to create and populate a new > table from the contents of an old table, but converting > the LONG RAW columns in the old table to BLOB columns > in the new one? Ie: What is the conversion function > I could use to do: > > insert into mynewtable (select convert_to(BLOB, myLongCol) from > myoldtable). > > thanks. > Joe > There is the function to_lob() which can do this conversion. http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/functions185.htm#i79464 Best regards Maxim Maxim Demenko wrote: > Joe Weinstein schrieb: > >> Hi all, and thanks in advance... >> What's the clever way to create and populate a new >> table from the contents of an old table, but converting >> the LONG RAW columns in the old table to BLOB columns >> in the new one? Ie: What is the conversion function >> I could use to do: >> >> insert into mynewtable (select convert_to(BLOB, myLongCol) from >> myoldtable). >> >> thanks. &g...

moving oracle database server into a new server
Hi all I will be moving oracle from one Solaris server into another Solaris server, the IP address and box name will be changed. Oracle version is 8.1.7 and O/S is 5.8 on both servers ( just different O/S patch). Does any one know what I need to do in order to get oracle up and running again on the new server. I know that I will need to change the tnsnames.ora and listner.ora, but is there anything else that I need to do? Thanks Teresa Teresa wrote: > Hi all > > I will be moving oracle from one Solaris server into another Solaris > server, the IP address and box name will be changed. Oracle version is > 8.1.7 and O/S is 5.8 on both servers ( just different O/S patch). > Does any one know what I need to do in order to get oracle up and > running again on the new server. I know that I will need to change the > tnsnames.ora and listner.ora, but is there anything else that I need > to do? > > Thanks > Teresa When I do this with windows boxes I either: #1 Install oracle on the new box, create a new database and export/import from old db to new db #2 Copy datafiles, init, sqlnet, tns.. etc over from coldbackup or shutdown old_database, startup nomount and recreate the controlfile to fit new environment. #3 Restore from online backup of old_database and apply redo logs, again recreating the controlfile to fit the new env. (I usually only do this for "practice" and for creating a development copy of a prod db) #2 ...

Copying tables with Long Raw column and conversion of those columns
Hi, I am attemtping to copy a table from an Oralce 8.1.7 database to a 9.I database via a DBLINK. I don't have access to the source server to do an export. The table has its last column as a long raw(7000). I want to both copy the table and then to convert the long raw data to a column type from which I can extract the text only data. I have tried some suggestions found on the Oracle groups, but with no luck. Any and all help would be greatly appreciated. bill.brennum@grainger.com wrote in news:1107555035.994138.28930@g14g2000cwa.googlegroups.com: > Hi, > > I am attemtping to copy a table from an Oralce 8.1.7 database to a 9.I > database via a DBLINK. I don't have access to the source server to do > an export. The table has its last column as a long raw(7000). I want > to both copy the table and then to convert the long raw data to a > column type from which I can extract the text only data. > > I have tried some suggestions found on the Oracle groups, but with no > luck. > > Any and all help would be greatly appreciated. > > You could always try RTFM http://download- west.oracle.com/docs/cd/A87860_01/doc/server.817/a82950/ch6.htm#1003261 ...

Oracle 9i Database Server on Windows 2003 Server
I am wondering if we can install this Server on Windows 2003 Server without any problems. Is there anybody that did that before? Thanks in advance if someone know the answer. Yvon Bouchard, B. Sc. Computer Science Teacher http://info.cegepat.qc.ca/siteyvon I've installed it on windows 2003 enterprise ed. about 1 month ago without any problem. I've installed the version 9.2.0.1 with the patch to 9.2.0.3. 9.2.0.3 is the only version certified by oracle for win 2003. Ciao "Yvon Bouchard" <yvon.bouchard@cablevision.qc.ca> ha scritto nel messaggio news:QCLvb.21605$ZF1.2102185@news20.bellglobal.com... > I am wondering if we can install this Server on Windows 2003 Server without > any problems. > Is there anybody that did that before? > Thanks in advance if someone know the answer. > > Yvon Bouchard, B. Sc. Computer Science > Teacher > http://info.cegepat.qc.ca/siteyvon > > > Yvon Bouchard wrote: > > I am wondering if we can install this Server on Windows 2003 Server without > any problems. > Is there anybody that did that before? > Thanks in advance if someone know the answer. > Although I have not installed on Windows 2003 myself, I know of several such installations and all occurred without issue. I do note that Oracle has a separate download (CD set) for the WIndows 2003 compared to NT/2000/XP, so I suspect the install for the latter may not be ...

How do I check which Oracle Patches are appplied to an Oracle DataBase Server
I would like to know if someone could help me with this topic, I'm traying to analize and chek which Oracle Patches are appplied to an Oracle DataBase Server >chek which Oracle Patches are appplied to an Oracle DataBase Server If they were applied with oPatch, then "opatch lsinventory" should show you what's there. If you did not use oPatch, then I have no clue. ;-) BD wrote: > >chek which Oracle Patches are appplied to an Oracle DataBase Server > > If they were applied with oPatch, then "opatch lsinventory" should show > you what's there. > > If you did not use oPatch, then I have no clue. ;-) For better or worse ( we know the answer ) opatch is the tool that install patches from oracle support. "If you did not use oPatch" ... what? >"If you did not use oPatch" ... what? In my 8i environments, there are separate scripts that are run - for example, for a cpu, it would be 'install_cpu.sh'. In those cases, I really don't know how (if) one can confirm which patches have been applied to an environment. ...

ORA-01461: can bind a LONG value only for insert into a LONG column
I am using Baltimore CAO to log into an oracle database, and I get this error. The only opinion i've heard is that it's a java problem. I had java 1.5 installed, then installed Oracle 8i client for windows, which installs java 1.1.7 (why won't java 1.5 do what 1.1.7 does?) so i have 2 JREs installed, registry shows current version is 1.1, but I get this error when trying to log in. Any ideas? On Oct 20, 10:15 am, simian.subvers...@gmail.com wrote: > I am using Baltimore CAO to log into an oracle database, and I get this > error. The only opinion i've heard is that it's a java problem. I had > java 1.5 installed, then installed Oracle 8i client for windows, which > installs java 1.1.7 (why won't java 1.5 do what 1.1.7 does?) so i have > 2 JREs installed, registry shows current version is 1.1, but I get this > error when trying to log in. Any ideas? Yes. Replace the Oracle JDBC driver with a much more recent one you can download from them independently. I believe that is the cause. (An old driver bug). Joe Weinstein at BEA Systems Well, I'm not sure if this is what you had in mind, but I found a newer JDBC driver in zip form with the Baltimore product, (same as one available from oracle) and I extracted it to the directory it was in, but still get the same issue. joeNOSPAM@BEA.com wrote: > On Oct 20, 10:15 am, simian.subvers...@gmail.com wrote: > > I am using Baltimore CAO to log into an oracle database, and I ...

How to find SQL Servers & Databases in Each server using BATCH File?
Hi, I need help from you... I want to find SQL Servers which are available in Network and Databases in Each Server Using Batch file. If i run this Batch file it should find SQL Servers & Databases in each server and out put should send to txt file... Is it possible to do this using Batch file??? if possible hw can i??? Plz send me details hw to do... Thanx in Advance, Regards, Raghu Tumma... Mail to: raghutumma@gmail.com ...

Opening files from one server to another (connect to Apache/Oracle server)
Hi, We have a web setup where we're using two servers, one of which is using an ASP application running a SQL Server database, the other is using Oracle with Apache. Basically, we want users to be able to open files such as Adobe Acrobat PDF documents (which are stored on the Oracle server) via clicking links in pages on the other (SQL) server. We have security set up that each site requires a user ID and password to access site content, so we need to figure out how we can make the sites communicate that when the file link is clicked, the file is opened. We currently get a 404 (Forbidden) message. I've been told that there are stored settings in some header section (not sure if this would be Apache or Oracle doing this) to handle the user ID and password security, so my guess is we need info as to how we can make the sites handshake with this protocol. Any help would be appreciated. Thanks! Brian ...

proper file format, attributes for non-binary files served by a web server
I have several files (.txt, .html, .htmlx) from various sources which are served by the OSU server. At least as far as I can tell, all seem to work. Does that mean that they should work with any standard-conforming browser? What about with a different web server on VMS? Is there such a thing as a preferred/recommended format for .txt files or html files on VMS? On Sat, 21 Jan 2012 15:37:09 +0000, Phillip Helbig---undress to reply wrote: > I have several files (.txt, .html, .htmlx) from various sources which > are served by the OSU server. At least as far as I can tell, all seem...

Oracle databases on a server
I have Oracle installation on a SUN UNIX server. I tappears that it is running Oracle 10.2 and Solaris 8. I want to find out how many databases are installed on this server. Would it be true to say that all databases installed on this server are listed in tnsnames.ora where the 'HOST' entry points to this server? On Feb 20, 9:00=A0am, p...@qantas.com.au wrote: > I have Oracle installation on a SUN UNIX server. I tappears that it is > running Oracle 10.2 and Solaris 8. > > I want to find out how many databases are installed on this server. > > Would it be true to say that all databases installed on this server > are listed in tnsnames.ora where the 'HOST' entry points to this > server? No, these might be different *services* served by the same instance. The first place to look at is /var/opt/oracle/oratab file, which should list all Oracle instances on your host. If your Oracle installation follows OFA (Optimal Flexible Architecture,) which is usually true, count $ORACLE_BASE/admin/<dbname> directories - each database should have its own directory under admin. Alternatively, you can also count spfile<SID>.ora files in $ORACLE_HOME/dbs directory. Hth, Vladimir M. Zakharychev N-Networks, makers of Dynamic PSP(tm) http://www.dynamicpsp.com On 20 Feb, 06:00, p...@qantas.com.au wrote: > I have Oracle installation on a SUN UNIX server. I tappears that it is > running Oracle 10.2 and Solaris 8. > > I want...

Can I create a file-based standby database for a RAC database on raw device?
RDBMS Version: 9.2.0.5 Operating System and Version: Solaris 8 Error Number (if applicable): Product (i.e. SQL*Loader, Import, etc.): Data Guard Product Version: 9.2.0.5 Can I create a file-based standby database for a RAC database on raw device? We want to setup a disaster recovery site for a RAC database on raw device. For reducing the work of configurations, we consider to use a file-based datbase as the remote standby database. Is there any problem or compatible issue to do this ? Regards, William On Thu, 30 Sep 2004 05:28:55 +0200, William wrote (in article <544e016e.0409291928.33e736a2@posting.google.com>): > RDBMS Version: 9.2.0.5 > Operating System and Version: Solaris 8 > Error Number (if applicable): > Product (i.e. SQL*Loader, Import, etc.): Data Guard > Product Version: 9.2.0.5 > > Can I create a file-based standby database for a RAC database on raw > device? > > We want to setup a disaster recovery site for a RAC database on raw > device. For reducing the work of configurations, we consider to use a > file-based datbase as the remote standby database. > > Is there any problem or compatible issue to do this ? > > Regards, > William Sure, this can be done, no problem at all, as long as the disks are fast enough to handle the logs. With kind regards / met vriendelijke groeten, Ronald http://ronr.nl/unix-dba http://homepage.mac.com/ik_zelf/oracle ...

ORA-00997: Annoying LONG/LONG RAW columns when alter table .. move tablespace
If you get an "ORA-00997: illegal use of LONG datatype" error, metalink (note 165901.1) advises you to 1. Export the table. 2. Recreate the table in the new tablespace. 3. Import the table. This is annoying, because you have - a table outage (manual read only table lock needed) - more admin work (more steps than just "alter table .. move tablespace ...") Oracle allows you to ".. move tablespace" for any other object - tables - table partitions - indexes - index partitions - index organized tables - lob segments - ... Does somebody know a more comfortable method to move tables with LONG columns? - Will this feature be implemented by Oracle in the future? - LONG column type is out-dated according to Oracle. Can you convert LONG and LONG RAW to BLOB,CLOB,... without the need of testing. Is it 100% interoperable? Thanx for your discussion On 17 Sep 2006 18:19:20 -0700, "NitelyJoy" <nitelyjoy@ist-einmalig.de> wrote: >If you get an "ORA-00997: illegal use of LONG datatype" error, metalink >(note 165901.1) advises you to > >1. Export the table. >2. Recreate the table in the new tablespace. >3. Import the table. > >This is annoying, because you have >- a table outage (manual read only table lock needed) >- more admin work (more steps than just "alter table .. move tablespace >..") > >Oracle allows you to ".. move tablespace" for any other object >- tables >...

SqlSpec
Do you wish you had comprehensive, easily navigable documentation for your SQL Server, Oracle, Analysis Server, MySQL, and Access databases? Are you a SQL Developer or DBA that just inherited a huge, complex database with no supporting docs and don't know where to start learning how it's put together? Are you an independent contractor working with SQL Server, Oracle, Analysis Server, MySQL, or Access? Your clients would LOVE you if you could provide comprehensive documentation about the databases you build. Are you a Project Manager who is tired of developers making changes to databases on live servers and not updating the corresponding spec? SqlSpec will make sense of it all and generate easy-to-read docs for you for any database on the following platforms: * SQL Server 2000/2005 * Oracle 9i (and above) * MySQL 5.0 (and above) * Analysis Server 2005 * Access 97/2000/XP/2003 SqlSpec generates documentation in two formats: HTML or CHM. HTML is useful for publishing your documents on the web or an intranet site. CHM is useful if you want a single, compact file containing all your documentation about one or more databases. The CHM is indexed so it is easily searchable for any keyword. This way you can easily determine which objects reference the "EmployeeID" column, for example. You can download a fully featured trial version here: http://www.elsasoft.org ...

automate startup /shutdown oracle database server 9i on redhat advance server 3.0
how i automate the oracle database 9i on RedHat Advance server 3.0 automatic startup and shutdown database in linux advance server 3.0 On Mon, 2 Aug 2004 17:06:37 +0500, "Kashif Hameed" <kashifh@shoa.net> wrote: >how i automate the oracle database 9i on RedHat Advance server 3.0 automatic >startup and shutdown database in linux advance server 3.0 > as usual: just read the documentation http://download-uk.oracle.com/docs/pdf/A96167_01.pdf (and please do so prior to posting as to avoid this type of questions) -- Sybrand Bakker, Senior Oracle DBA ...

Error inserting into iSeries DB2 table with long name via SQL Server 2000 linked Server
I have a IBM iSeries (aka AS-400) running v5r3 of OS/400 that I access via a linked server from SQL Server 2000. The following select works fine: select * from prod400db.test.meldbf.InventoryHistory However, this insert statement fails: insert into prod400db.TEST.MELDBF.InventoryHistory (plantId, itemnumber, transactionType, transactionQty, fromStockRoom, fromStatusCode, fromBinLocation, toStockRoom, toStatusCode, toBinLocation, transactionReason, transactionSourceSystem) values ('100','CMW21','R',11, NULL, NULL, NULL, 'WIP',' ', NULL,'...

it's compatible oracle 8i client, compatible whith oracle 9i server (or oracle 10g server)
Hi all, I have a client/server application that work on the client with oracle 8i client connected to oracle 8i server, Im going to upgrade the server to oracle 9i (or oracle10g) , and I wonder if the client will work fine without upgrade version. Thanks Angel R. wrote: > Hi all, > I have a client/server application that work on the client with oracle 8i > client connected to > oracle 8i server, Im going to upgrade the server to oracle 9i (or oracle10g) > , and > I wonder if the client will work fine without upgrade version. > > Thanks If you have access to the metalink then check the connect matrix at http://metalink.oracle.com/metalink/plsql/showdoc?db=NOT&id=207303.1 Regards /Rauf ...

Inserting binary data to an column
Hi, i want to make a proof of concept about handling "binary data". Background: I want to get a binary decription (or hex etc) of a data stored in an column. Later i want to insert this binary/hex etc data directly in a column (by code in plsql). If i can make this, imable to insert any data intependent from its data type. Questions: 1. How can i get the right data representation (binary/hex etc for later insert)? 2. What are the correct statements to insert this data representation? For example: the hex representation of 'Technical Writer' is '546563686e6963616c20577269746572' so i want to get the hex number and later i want to insert it (and the database (i my case Oracle 10g) understand it as 'Technical Writer' Greets Micha Micha schrieb: > Hi, > i want to make a proof of concept about handling "binary data". > Background: > I want to get a binary decription (or hex etc) of a data stored in an > column. Later i want to insert this binary/hex etc data directly in a column > (by code in plsql). > If i can make this, imable to insert any data intependent from its data > type. > > Questions: > 1. How can i get the right data representation (binary/hex etc for later > insert)? > 2. What are the correct statements to insert this data representation? > > For example: > the hex representation of 'Technical Writer' is &...

Web resources about - Inserting a binary file into a Long Raw column - comp.databases.oracle.server

Inserting Kate
jurvetson posted a photo: the speaking GPS avatar that we came to love.. more prep photos below... You can hear her voice in the video compilation ...

Inserting the Galaxy Note 5’s S Pen backwards can permanently damage the device
One of the features Samsung highlighted when it unveiled the Galaxy Note 5 was the device's new S Pen slot design. The Note 5 features a spring-loaded ...

How the Shift from Swiping to Inserting Cards Will Accelerate Mobile Payments
... this shift is to protect consumers and merchants from fraud. What the industry refers to as "dipping" and consumers and cashiers call "inserting" ...


Inserting Slavery Into The Climate Debate
Chris Hayes compares the fight against fossil fuels to the abolitionist movement. He states plainly that “there is absolutely no conceivable ...

Samsung smart TVs inserting ads into third-party apps
... playback have pissed off a number of consumers. People with smart TVs from Samsung have been complaining that the electronics maker is inserting ...

Samsung: Inserting the S Pen backwards will not break new Galaxy Note 5 units
... according to the company. "Samsung can confirm that the Note 5 internal S Pen mechanism has been changed to avoid the issue caused by inserting ...

Gawker tells Steven Crowder to "stop whining, take your licks, and accept that getting hit in the face ...
"... in the middle of an argument between billionaire-funded know-nothing ideologues and people whose livelihoods and stability are being threatened ...

Gmail's New Interface for Inserting Photos
Gmail has a new interface for adding images to a message. When you click the "insert images" icon, Gmail now shows all the photos highlighted ...

Now Samsung SmartTVs are interrupting users' videos by inserting random ads
... room. Now Samsung is dealing with a new headache: Gigaom reports that Samsung SmartTVs are interrupting users' own video content by inserting ...

Resources last updated: 3/20/2016 9:02:58 AM