oracle10g

Write a file to SFTP using Oracle PL/SQL

时间秒杀一切 提交于 2019-12-01 09:14:15
I wrote a PL/SQL procedure to connect to an FTP server. I am able to write a file to that FTP server. Using the same code I tried to connect to an SFTP server, but it failed. How do I connect to SFTP using PL/SQL? You can try the commercial ORA_SFTP package provided from DidiSoft: connection_id := ORA_SFTP.CONNECT_HOST(... ORA_SFTP.UPLOAD(connection_id, data, 'remote_file.dat'); Disclaimer: I work for DidiSoft SFTP requires SSH plus the implementation of a protocol . As far as my PL/SQL knowledge reaches and Google's, there are currently no available implementation of SSH or this protocol in

Binding int64 (SQL_BIGINT) as query parameter causes error during execution in Oracle 10g ODBC

北战南征 提交于 2019-12-01 08:40:45
I've got an insert into a table using ODBC 3.0 on Oracle 10g that is failing and I have no idea why. The database is on Windows Server 2003. The client is on Windows XP. The table: CREATE TABLE test ( testcol NUMBER(20,0) NULL ); The ODBC calls: SQLAllocHandle(SQL_HANDLE_STMT) = SQL_SUCCESS SQLPrepare(INSERT INTO test (testcol) VALUES (?);) = SQL_SUCCESS SQLINTEGER nStrLen = 0; __int64 nInt64 = 99; SQLBindParameter(hStatement, 1, SQL_PARAM_INPUT, SQL_C_SBIGINT, SQL_BIGINT, 20, 0, &nInt64, 0, &nStrLen) = SQL_SUCCESS SQLExecute() = SQL_ERROR SQLGetDiagRec(1) = SQL_NO_DATA SQLBindParameter

Comparing list of values against table

北城以北 提交于 2019-12-01 08:21:08
问题 I tried to find solution for this problem for some time but without success so any help would be much appreciated. List of IDs needs to be compared against a table and find out which records exist (and one of their values) and which are non existent. There is a list of IDs, in text format: 100, 200, 300 a DB table: ID(PK) value01 value02 value03 ..... -------------------------------------- 100 Ann 102 Bob 300 John 304 Marry 400 Jane and output I need is: 100 Ann 200 missing or empty or

Find the most child node of a parent (any level) in oracle

有些话、适合烂在心里 提交于 2019-12-01 08:09:36
问题 My Table structure is | Parent ID | ID | |-------------|-------------| | a | b | | b | c | | b | d | | b | e | | c | f | | d | g | | e | h | I want to get the most child node for all parent . In a other table I have a , b and c . Then I want to get the below result . | Parent_ID | Child | |-------------|-------------| | a | f | | a | g | | a | h | | b | f | | b | g | | b | h | | c | f | f , g , h are the lowest granular . 回答1: By "most child node" I expect you mean the leaf nodes of the tree.

What can cause Oracle to ignore an APPEND hint requesting it to perform a direct path load?

限于喜欢 提交于 2019-12-01 08:08:17
I wish to do a serial, logging insert of bulk data from one table to another. This is once-of as part of a data migration so swapping partitions, etc is not an answer. The SQL will be of the following structure: INSERT /*+ APPEND */ ... SELECT FROM .... What might cause Oracle to run this a convential insert rather than a direct path insert? For example, I believe having a trigger on the table will cause Oracle to conduct a convential insert. Is there a definitive list of restrictions? Daniel Haviv A quote from http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID

Oracle 10g: Can CLOB data lengths be less than 4,000?

本小妞迷上赌 提交于 2019-12-01 07:50:00
问题 We have three databases: dev, staging, and production. We do all our coding in the dev environment. We then push all our code and database changes to staging so the client can see how it works in a live environment. After they sign off, we do the final deployment to the production environment. Now, about these CLOB columns: When using desc and/or querying the all_tab_columns view for the dev database, CLOBs show a data length of 4,000. However, in the staging and production databases, data

图文并茂——Oracle 10g Client与PLSQL Developer工具安装配置

ε祈祈猫儿з 提交于 2019-12-01 07:22:48
昨天我们演示了Oracle database 10g在Windows下的安装,今天我们来看一下Oracle客户端和PLSQL Developer软件的安装。 首先下载Oracle client客户端,下载地址为: http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/10201winsoft.html 解压缩后,生成client的文件夹,双击里面的setup.exe图标。 出现四种安装类型,分别为InstantClient(即时客户端)、管理员、运行时和自定义。这里我们选择管理员,点击下一步继续。 此时需要指定数据库客户端的名称以及安装的完整路径,这里我们选择默认即可,点击下一步继续。(熊熊用的是D盘,哪个盘符根据自己需要即可) 现在进入到与安装Oracle 10g软件一样的产品先决条件检查选项卡,这里我们的检查总体结构为:通过,点击下一步继续(如果出现问题,一定要仔细排查出错原因)。 现在出现一个安装的概要信息,包括了客户端软件的具体安装路径、产品语言、安装所需空间及具体安装的客户端组件,确认无误后,点击安装即可。 软件安装完毕后,也会进入到配置助手选项,客户端的配置助手只需要配置网络部分。 如无特殊需求,选择执行典型配置即可,点击下一步继续 到此,Oracle

Write a file to SFTP using Oracle PL/SQL

霸气de小男生 提交于 2019-12-01 07:10:26
问题 I wrote a PL/SQL procedure to connect to an FTP server. I am able to write a file to that FTP server. Using the same code I tried to connect to an SFTP server, but it failed. How do I connect to SFTP using PL/SQL? 回答1: You can try the commercial ORA_SFTP package provided from DidiSoft: connection_id := ORA_SFTP.CONNECT_HOST(... ORA_SFTP.UPLOAD(connection_id, data, 'remote_file.dat'); Disclaimer: I work for DidiSoft 回答2: SFTP requires SSH plus the implementation of a protocol. As far as my PL

Search value in all tables of database

别说谁变了你拦得住时间么 提交于 2019-12-01 07:07:52
问题 I need to find table which contains some value in my Oracle database. I found two queries. The first query I tried: declare l_pattern varchar2(100) := 'По какому вопросу звонили?'; cursor cf is select table_name,column_name from user_tab_columns where data_type = 'VARCHAR2' order by table_name; t_str varchar2(2000) := 'select count(*) from dual where exists( select null from '; l_str varchar2(2000); l_where_clause varchar2(2000) := ' where 1=0'; l_last_table varchar2(100) := ''; l_cnt number

SQL - Missing right parenthesis

吃可爱长大的小学妹 提交于 2019-12-01 06:54:58
I am trying to execute this script in Oracle 11g and getting the following error, I dont know where I am missing the paranthesis or what is the mistake kindly help me figure this out. Script: CREATE TABLE User_Role ( user_role_id INT NOT NULL , Users_user_id INT FOREIGN KEY REFERENCES Users(user_id), User_Types_user_type VARCHAR(20) FOREIGN KEY REFERENCES User_Types(user_type), PRIMARY KEY(user_role_id) ) Error: ORA-00907: missing right parenthesi Delete FOREIGN KEY clause. Rewrite your CREATE TABLE statement as follows: CREATE TABLE User_Role ( user_role_id INT NOT NULL , Users_user_id INT