Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to Import dump file with default value for single column? Post 302816615 by cero on Tuesday 4th of June 2013 10:01:13 AM
Old 06-04-2013
As both are oracle-databases a database link can be used to solve this, given you have the privileges inside the DB to create it.
If you have the privileges in bbbb you can do something like this after you connect:
Code:
create database link aaaa connect to scott identified by tiger using 'aaaa';
insert into your_table (your,field,list)
       select your,field,replace(list,'what','with')
         from your_table@aaaa;
drop database link aaaa;

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Split a single file into several others basing on the last column

Hi folks, Happy new year. I have a file 'filename' that i wd like to split basing on the contents in the last column. The 'filename' content looks like 256772744788,9,11 256772744805,9,11 256772744792,9,11 256775543055,10,12 256782625357,9,12 256772368953,10,13 256772627735,10,13... (3 Replies)
Discussion started by: jerkesler
3 Replies

2. UNIX for Advanced & Expert Users

need to get single column form csv file

hi 2 all i need to get single column from one csv file anyone help me ! >cat file.csv name,age x,1 y,2 z,3 Use code tags please, ty. in this "file.csv" file i need only name column can u help me !:b::b: (7 Replies)
Discussion started by: ponmuthu
7 Replies

3. UNIX for Dummies Questions & Answers

Import dump to database

Hi... I have dump in unix machine...How can I this import dump to Oracle database? Many thanks in advance. (2 Replies)
Discussion started by: agarwal
2 Replies

4. Shell Programming and Scripting

Adding content of two file in a single file column wise

Hi, I am trying to get the file in particular pattern using shell script. I have to add one column to some other file. For example consider two file as below. File1: name1 name2 name3 File2: Add1 age1 Add2 age2 Add3 age3 I want this two file in a single file format something like... (3 Replies)
Discussion started by: diehard
3 Replies

5. UNIX for Dummies Questions & Answers

How can I import a particular schema from full dump in Oracle?

Hi All, I have a full oracle dump file that I have exported from a production server. I want to import a specific schema out of the full dump. Is that possible in oracle. What will be the command for that? (6 Replies)
Discussion started by: Palak Sharma
6 Replies

6. UNIX and Linux Applications

How to import and dump file to remote Oracle server?

Hi All, I have a linux centos instance which has a dump file. I need to import the dump file to the oracle server which is located at some remote location. I have installed the oracle client on my machine and I am able to connect to the remote oracle server. Now how to import the dump to the... (3 Replies)
Discussion started by: Palak Sharma
3 Replies

7. UNIX and Linux Applications

Problem in import & expdp Dump file

Hi all, i face a problem on (oracle database) installed on server Linux i need to export back as dump file, when i try to export give me the below error. # expdp system/oracle directory=test dumpfile=Prodfb20150311.dmp logfile=Prodfb20150311.log FULL=y Export: Release 11.2.0.1.0 -... (2 Replies)
Discussion started by: clerck
2 Replies

8. Shell Programming and Scripting

Paste 2 single column files to a single file

Hi, I have 2 csv/txt files with single columns. I am trying to merge them using paste, but its not working.. output3.csv: flowerbomb everlon-jewelry sofft steve-madden dolce-gabbana-watchoutput2.csv: http://www1.abc.com/cms/slp/2/Flowerbomb http://www1.abc.com/cms/slp/2/Everlon-Jewelry... (5 Replies)
Discussion started by: ajayakunuri
5 Replies

9. Homework & Coursework Questions

Oracle dump file (del format) import into db2

1. The problem statement, all variables and given/known data: are the oracle dump files compatible to direct import into db2? I already tried many times but it always truncated results. anyone can help/ advice or suggest? 2. Relevant commands, code, scripts, algorithms: exp... (3 Replies)
Discussion started by: Sonny_103024
3 Replies

10. Solaris

How to clear a removed single-disk pool from being listed by zpool import?

On an OmniOS server, I removed a single-disk pool I was using for testing. Now, when I run zpool import it will show it as FAULTED, since that single disk not available anymore. # zpool import pool: fido id: 7452075738474086658 state: FAULTED status: The pool was last... (11 Replies)
Discussion started by: priyadarshan
11 Replies
MYSQLI_CHANGE_USER(3)							 1						     MYSQLI_CHANGE_USER(3)

mysqli::change_user - Changes the user of the specified database connection

       Object oriented style

SYNOPSIS
bool mysqli::change_user (string $user, string $password, string $database) DESCRIPTION
Procedural style bool mysqli_change_user (mysqli $link, string $user, string $password, string $database) Changes the user of the specified database connection and sets the current database. In order to successfully change users a valid $username and $password parameters must be provided and that user must have sufficient per- missions to access the desired database. If for any reason authorization fails, the current user authentication will remain. PARAMETERS
o $ link -Procedural style only: A link identifier returned by mysqli_connect(3) or mysqli_init(3) o $user - The MySQL user name. o $password - The MySQL password. o $database - The database to change to. If desired, the NULL value may be passed resulting in only changing the user and not selecting a database. To select a database in this case use the mysqli_select_db(3) function. RETURN VALUES
Returns TRUE on success or FALSE on failure. NOTES
Note Using this command will always cause the current database connection to behave as if was a completely new database connection, regardless of if the operation was completed successfully. This reset includes performing a rollback on any active transactions, closing all temporary tables, and unlocking all locked tables. EXAMPLES
Example #1 mysqli::change_user example Object oriented style <?php /* connect database test */ $mysqli = new mysqli("localhost", "my_user", "my_password", "test"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s ", mysqli_connect_error()); exit(); } /* Set Variable a */ $mysqli->query("SET @a:=1"); /* reset all and select a new database */ $mysqli->change_user("my_user", "my_password", "world"); if ($result = $mysqli->query("SELECT DATABASE()")) { $row = $result->fetch_row(); printf("Default database: %s ", $row[0]); $result->close(); } if ($result = $mysqli->query("SELECT @a")) { $row = $result->fetch_row(); if ($row[0] === NULL) { printf("Value of variable a is NULL "); } $result->close(); } /* close connection */ $mysqli->close(); ?> Procedural style <?php /* connect database test */ $link = mysqli_connect("localhost", "my_user", "my_password", "test"); /* check connection */ if (!$link) { printf("Connect failed: %s ", mysqli_connect_error()); exit(); } /* Set Variable a */ mysqli_query($link, "SET @a:=1"); /* reset all and select a new database */ mysqli_change_user($link, "my_user", "my_password", "world"); if ($result = mysqli_query($link, "SELECT DATABASE()")) { $row = mysqli_fetch_row($result); printf("Default database: %s ", $row[0]); mysqli_free_result($result); } if ($result = mysqli_query($link, "SELECT @a")) { $row = mysqli_fetch_row($result); if ($row[0] === NULL) { printf("Value of variable a is NULL "); } mysqli_free_result($result); } /* close connection */ mysqli_close($link); ?> The above examples will output: Default database: world Value of variable a is NULL SEE ALSO
mysqli_connect(3), mysqli_select_db(3). PHP Documentation Group MYSQLI_CHANGE_USER(3)
All times are GMT -4. The time now is 04:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy