What is SQLDEVELOPER_CLOB_7 col
Hi!
while migrating from sqlserver 2005 to oracle 11g r2 xe it is creating extra cols like
SQLDEVELOPER_CLOB_7 for each blob column which is getting created for image col in sqlserver .
what are they?
can i delete it, as i do not need them.
yours sincerely
Edited by: 944768 on Sep 18, 2012 12:52 AM
Edited by: 944768 on Sep 18, 2012 3:39 AM
As confirmed by SQLDeveloper development team, Here is some information on this:
When migrating SQL Server/Sybase IMAGES to Oracle in 'offline' mode, we cant upload the data using SQL Loader directly into the BLOB column because:
1. IMAGEs in SQL Server/Sybase dumped out in HEX.
2. Oracle s HEXTORAW function can only take 4000 chars
3. So data gets uploaded in chunks against the CLOB
4. Then a procedure is run with HEXTORAW to convert it to BLOB
5. After the data load is over, this additional CLOB column can be dropped from the table as Oracle allows you to drop a column.
All this happens in automated fashion for offline data load process. For On-line data move, this is not required.
Hope this helps
Prakash
Similar Messages
-
What is SQLDEVELOPER_CLOB_7
Hi!
( wanted to changed the category so i asked the question again.)
while migrating from sqlserver 2005 to oracle 11g r2 xe it is creating extra cols like
SQLDEVELOPER_CLOB_7 for each blob column which is getting created for image col in sqlserver .
what are they?
can i delete it, as i do not need them.
yours sincerely
Edited by: 944768 on Sep 18, 2012 12:52 AM
Edited by: 944768 on Sep 18, 2012 3:39 AMAs confirmed by SQLDeveloper development team, Here is some information on this:
When migrating SQL Server/Sybase IMAGES to Oracle in 'offline' mode, we cant upload the data using SQL Loader directly into the BLOB column because:
1. IMAGEs in SQL Server/Sybase dumped out in HEX.
2. Oracle s HEXTORAW function can only take 4000 chars
3. So data gets uploaded in chunks against the CLOB
4. Then a procedure is run with HEXTORAW to convert it to BLOB
5. After the data load is over, this additional CLOB column can be dropped from the table as Oracle allows you to drop a column.
All this happens in automated fashion for offline data load process. For On-line data move, this is not required.
Hope this helps
Prakash -
I originally posted this in the wrong forum, and was advised
to continue the discussion here. Thanks to Danillo Celic, I have a
partial understanding of what's ocurring, but my problem hasn't
been resolved, so here goes again, with more detail.
Original post (somewhat edited):
> Using Dreamweaver CS4 on a Mac
>
> Upon opening some of my pages, I get a box showing HTML
Corrections:
> "Corrected invalid HTML" then in the box it shows "Line
94 Col
> 179 : Closed a <img> tag that was left unclosed."
This box has a "Continue"
> button that I click on to dismiss it; however, the same
message occurs each
> time I open that page and nothing ever seems to actually
get corrected, even
> after working on the page and saving it.
>
> I understand the Line 94 portion, but the Col 179
portion baffles me, because there are not that many characters on
that line, only 97 characters.
>My question then is twofold.
> 1. What is the Col 179 referring to if there are not
that many characters on the line in question?
> 2. How do I get the Line/Col correction to actually
_stay_ corrected? The tag looks closed to me.
I don't want to turn off the auto-correction. I'd just like
to have the corrections stick once I've been informed that they
have been corrected. I haven't uploaded the page in question yet,
but have included the line of code that is being referred to, and
can upload the page if it needs to be viewed in its entirety for
someone to help. Thanks.I originally posted this in the wrong forum, and was advised
to continue the discussion here. Thanks to Danillo Celic, I have a
partial understanding of what's ocurring, but my problem hasn't
been resolved, so here goes again, with more detail.
Original post (somewhat edited):
> Using Dreamweaver CS4 on a Mac
>
> Upon opening some of my pages, I get a box showing HTML
Corrections:
> "Corrected invalid HTML" then in the box it shows "Line
94 Col
> 179 : Closed a <img> tag that was left unclosed."
This box has a "Continue"
> button that I click on to dismiss it; however, the same
message occurs each
> time I open that page and nothing ever seems to actually
get corrected, even
> after working on the page and saving it.
>
> I understand the Line 94 portion, but the Col 179
portion baffles me, because there are not that many characters on
that line, only 97 characters.
>My question then is twofold.
> 1. What is the Col 179 referring to if there are not
that many characters on the line in question?
> 2. How do I get the Line/Col correction to actually
_stay_ corrected? The tag looks closed to me.
I don't want to turn off the auto-correction. I'd just like
to have the corrections stick once I've been informed that they
have been corrected. I haven't uploaded the page in question yet,
but have included the line of code that is being referred to, and
can upload the page if it needs to be viewed in its entirety for
someone to help. Thanks. -
How to compare two oracle database schemas
hi all,
i want to compare and find out differences between two oracle databases. The comparison should be made on between table definition,table data,primary and foreign keys, packages and functions.
Is there any management console or tool embedded in the oracle enterprise manger?
it is really appreciate if anyone can point me towards wright direction asap.Hi ,
This script would help u a lot in comparing 2 schemas and generate a report on them.
Script:
This script will compare two Oracle schemas and generate a report of
discrepencies and this script has been used against Oracle 7.3.4, 8.0.5,
REM and 8.1.7 databases, but it should also work with other versions.
REM
REM Please note that the following schema object types and attributes are
REM not compared by this script at this time:
REM
REM cluster definitions
REM comments on tables and columns
REM nesting, partition, IOT, and temporary attributes of tables
REM snapshots/materialized views, logs, and refresh groups
REM foreign function libraries
REM object types
REM operators
REM indextypes
REM dimensions
REM auditing information
REM new schema attributes added for Oracle 9i
REM
REM Version 02-04-2002
REM
PROMPT
PROMPT Schema Comparison
PROMPT =================
PROMPT
PROMPT Run this script while connected to one Oracle schema. Enter the Oracle
PROMPT username, password, and SQL*Net / Net8 service name of a second schema.
PROMPT This script will compare the two schemas and generate a report of
PROMPT differences.
PROMPT
PROMPT A temporary database link and table will be created and dropped by
PROMPT this script.
PROMPT
ACCEPT schema CHAR PROMPT "Enter username for remote schema: "
ACCEPT passwd CHAR PROMPT "Enter password for remote schema: " HIDE
ACCEPT tnssvc CHAR PROMPT "Enter SQL*Net / Net8 service for remote schema: "
PROMPT
ACCEPT report CHAR PROMPT "Enter filename for report output: "
SET FEEDBACK OFF
SET VERIFY OFF
CREATE DATABASE LINK rem_schema CONNECT TO &schema IDENTIFIED BY &passwd
USING '&tnssvc';
SET TRIMSPOOL ON
SPOOL &report
SELECT SUBSTR (RPAD (TO_CHAR (SYSDATE, 'mm/dd/yyyy hh24:mi:ss'), 25), 1, 25)
"REPORT DATE AND TIME"
FROM SYS.dual;
COL local_schema FORMAT a35 TRUNC HEADING "LOCAL SCHEMA"
COL remote_schema FORMAT a35 TRUNC HEADING "REMOTE SCHEMA"
SELECT USER || '@' || C.global_name local_schema,
A.username || '@' || B.global_name remote_schema
FROM user_users@rem_schema A, global_name@rem_schema B, global_name C
WHERE ROWNUM = 1;
SET PAGESIZE 9999
SET LINESIZE 250
SET FEEDBACK 1
SET TERMOUT OFF
PROMPT
REM Object differences
REM ==================
COL object_name FORMAT a30
PROMPT SUMMARY OF OBJECTS MISSING FROM LOCAL SCHEMA
SELECT object_type, COUNT (*)
FROM
SELECT object_type,
DECODE (object_type,
'INDEX', DECODE (SUBSTR (object_name, 1, 5),
'SYS_C', 'SYS_C', object_name),
'LOB', DECODE (SUBSTR (object_name, 1, 7),
'SYS_LOB', 'SYS_LOB', object_name),
object_name)
FROM user_objects@rem_schema
MINUS
SELECT object_type,
DECODE (object_type,
'INDEX', DECODE (SUBSTR (object_name, 1, 5),
'SYS_C', 'SYS_C', object_name),
'LOB', DECODE (SUBSTR (object_name, 1, 7),
'SYS_LOB', 'SYS_LOB', object_name),
object_name)
FROM user_objects
GROUP BY object_type
ORDER BY object_type;
PROMPT SUMMARY OF EXTRANEOUS OBJECTS IN LOCAL SCHEMA
SELECT object_type, COUNT (*)
FROM
SELECT object_type,
DECODE (object_type,
'INDEX', DECODE (SUBSTR (object_name, 1, 5),
'SYS_C', 'SYS_C', object_name),
'LOB', DECODE (SUBSTR (object_name, 1, 7),
'SYS_LOB', 'SYS_LOB', object_name),
object_name)
FROM user_objects
WHERE object_type != 'DATABASE LINK'
OR object_name NOT LIKE 'REM_SCHEMA.%'
MINUS
SELECT object_type,
DECODE (object_type,
'INDEX', DECODE (SUBSTR (object_name, 1, 5),
'SYS_C', 'SYS_C', object_name),
'LOB', DECODE (SUBSTR (object_name, 1, 7),
'SYS_LOB', 'SYS_LOB', object_name),
object_name)
FROM user_objects@rem_schema
GROUP BY object_type
ORDER BY object_type;
PROMPT OBJECTS MISSING FROM LOCAL SCHEMA
SELECT object_type,
DECODE (object_type,
'INDEX', DECODE (SUBSTR (object_name, 1, 5),
'SYS_C', 'SYS_C', object_name),
'LOB', DECODE (SUBSTR (object_name, 1, 7),
'SYS_LOB', 'SYS_LOB', object_name),
object_name) object_name
FROM user_objects@rem_schema
MINUS
SELECT object_type,
DECODE (object_type,
'INDEX', DECODE (SUBSTR (object_name, 1, 5),
'SYS_C', 'SYS_C', object_name),
'LOB', DECODE (SUBSTR (object_name, 1, 7),
'SYS_LOB', 'SYS_LOB', object_name),
object_name) object_name
FROM user_objects
ORDER BY object_type, object_name;
PROMPT EXTRANEOUS OBJECTS IN LOCAL SCHEMA
SELECT object_type,
DECODE (object_type,
'INDEX', DECODE (SUBSTR (object_name, 1, 5),
'SYS_C', 'SYS_C', object_name),
'LOB', DECODE (SUBSTR (object_name, 1, 7),
'SYS_LOB', 'SYS_LOB', object_name),
object_name) object_name
FROM user_objects
WHERE object_type != 'DATABASE LINK'
OR object_name NOT LIKE 'REM_SCHEMA.%'
MINUS
SELECT object_type,
DECODE (object_type,
'INDEX', DECODE (SUBSTR (object_name, 1, 5),
'SYS_C', 'SYS_C', object_name),
'LOB', DECODE (SUBSTR (object_name, 1, 7),
'SYS_LOB', 'SYS_LOB', object_name),
object_name) object_name
FROM user_objects@rem_schema
ORDER BY object_type, object_name;
PROMPT OBJECTS IN LOCAL SCHEMA THAT ARE NOT VALID
SELECT object_name, object_type, status
FROM user_objects
WHERE status != 'VALID'
ORDER BY object_name, object_type;
REM Table differences
REM =================
PROMPT TABLE COLUMNS MISSING FROM ONE SCHEMA
PROMPT (NOTE THAT THIS REPORT DOES NOT LIST DISCREPENCIES IN COLUMN ORDER)
SELECT table_name, column_name, 'Local' "MISSING IN SCHEMA"
FROM user_tab_columns@rem_schema
WHERE table_name IN
SELECT table_name
FROM user_tables
MINUS
SELECT table_name, column_name, 'Local' "MISSING IN SCHEMA"
FROM user_tab_columns
UNION ALL
SELECT table_name, column_name, 'Remote' "MISSING IN SCHEMA"
FROM user_tab_columns
WHERE table_name IN
SELECT table_name
FROM user_tables@rem_schema
MINUS
SELECT table_name, column_name, 'Remote' "MISSING IN SCHEMA"
FROM user_tab_columns@rem_schema
ORDER BY 1, 2;
COL schema FORMAT a15
COL nullable FORMAT a8
COL data_type FORMAT a9
COL data_length FORMAT 9999 HEADING LENGTH
COL data_precision FORMAT 9999 HEADING PRECISION
COL data_scale FORMAT 9999 HEADING SCALE
COL default_length FORMAT 9999 HEADING LENGTH_OF_DEFAULT_VALUE
PROMPT DATATYPE DISCREPENCIES FOR TABLE COLUMNS THAT EXIST IN BOTH SCHEMAS
SELECT table_name, column_name, 'Remote' schema,
nullable, data_type, data_length, data_precision, data_scale,
default_length
FROM user_tab_columns@rem_schema
WHERE (table_name, column_name) IN
SELECT table_name, column_name
FROM user_tab_columns
MINUS
SELECT table_name, column_name, 'Remote' schema,
nullable, data_type, data_length, data_precision, data_scale,
default_length
FROM user_tab_columns
UNION ALL
SELECT table_name, column_name, 'Local' schema,
nullable, data_type, data_length, data_precision, data_scale,
default_length
FROM user_tab_columns
WHERE (table_name, column_name) IN
SELECT table_name, column_name
FROM user_tab_columns@rem_schema
MINUS
SELECT table_name, column_name, 'Local' schema,
nullable, data_type, data_length, data_precision, data_scale,
default_length
FROM user_tab_columns@rem_schema
ORDER BY 1, 2, 3;
REM Index differences
REM =================
COL column_position FORMAT 999 HEADING ORDER
PROMPT INDEX DISCREPENCIES FOR INDEXES THAT EXIST IN BOTH SCHEMAS
SELECT A.index_name, 'Remote' schema, A.uniqueness, A.table_name,
B.column_name, B.column_position
FROM user_indexes@rem_schema A, user_ind_columns@rem_schema B
WHERE A.index_name IN
SELECT index_name
FROM user_indexes
AND B.index_name = A.index_name
AND B.table_name = A.table_name
MINUS
SELECT A.index_name, 'Remote' schema, A.uniqueness, A.table_name,
B.column_name, B.column_position
FROM user_indexes A, user_ind_columns B
WHERE B.index_name = A.index_name
AND B.table_name = A.table_name
UNION ALL
SELECT A.index_name, 'Local' schema, A.uniqueness, A.table_name,
B.column_name, B.column_position
FROM user_indexes A, user_ind_columns B
WHERE A.index_name IN
SELECT index_name
FROM user_indexes@rem_schema
AND B.index_name = A.index_name
AND B.table_name = A.table_name
MINUS
SELECT A.index_name, 'Local' schema, A.uniqueness, A.table_name,
B.column_name, B.column_position
FROM user_indexes@rem_schema A, user_ind_columns@rem_schema B
WHERE B.index_name = A.index_name
AND B.table_name = A.table_name
ORDER BY 1, 2, 6;
REM Constraint differences
REM ======================
PROMPT CONSTRAINT DISCREPENCIES FOR TABLES THAT EXIST IN BOTH SCHEMAS
SET FEEDBACK OFF
CREATE TABLE temp_schema_compare
database NUMBER(1),
object_name VARCHAR2(30),
object_text VARCHAR2(2000),
hash_value NUMBER
DECLARE
CURSOR c1 IS
SELECT constraint_name, search_condition
FROM user_constraints
WHERE search_condition IS NOT NULL;
CURSOR c2 IS
SELECT constraint_name, search_condition
FROM user_constraints@rem_schema
WHERE search_condition IS NOT NULL;
v_constraint_name VARCHAR2(30);
v_search_condition VARCHAR2(32767);
BEGIN
OPEN c1;
LOOP
FETCH c1 INTO v_constraint_name, v_search_condition;
EXIT WHEN c1%NOTFOUND;
v_search_condition := SUBSTR (v_search_condition, 1, 2000);
INSERT INTO temp_schema_compare
database, object_name, object_text
VALUES
1, v_constraint_name, v_search_condition
END LOOP;
CLOSE c1;
OPEN c2;
LOOP
FETCH c2 INTO v_constraint_name, v_search_condition;
EXIT WHEN c2%NOTFOUND;
v_search_condition := SUBSTR (v_search_condition, 1, 2000);
INSERT INTO temp_schema_compare
database, object_name, object_text
VALUES
2, v_constraint_name, v_search_condition
END LOOP;
CLOSE c2;
COMMIT;
END;
SET FEEDBACK 1
SELECT REPLACE (TRANSLATE (A.constraint_name,'012345678','999999999'),
'9', NULL) constraint_name,
'Remote' schema, A.constraint_type, A.table_name,
A.r_constraint_name, A.delete_rule, A.status, B.object_text
FROM user_constraints@rem_schema A, temp_schema_compare B
WHERE A.table_name IN
SELECT table_name
FROM user_tables
AND B.database (+) = 2
AND B.object_name (+) = A.constraint_name
MINUS
SELECT REPLACE (TRANSLATE (A.constraint_name,'012345678','999999999'),
'9', NULL) constraint_name,
'Remote' schema, A.constraint_type, A.table_name,
A.r_constraint_name, A.delete_rule, A.status, B.object_text
FROM user_constraints A, temp_schema_compare B
WHERE B.database (+) = 1
AND B.object_name (+) = A.constraint_name
UNION ALL
SELECT REPLACE (TRANSLATE (A.constraint_name,'012345678','999999999'),
'9', NULL) constraint_name,
'Local' schema, A.constraint_type, A.table_name,
A.r_constraint_name, A.delete_rule, A.status, B.object_text
FROM user_constraints A, temp_schema_compare B
WHERE A.table_name IN
SELECT table_name
FROM user_tables@rem_schema
AND B.database (+) = 1
AND B.object_name (+) = A.constraint_name
MINUS
SELECT REPLACE (TRANSLATE (A.constraint_name,'012345678','999999999'),
'9', NULL) constraint_name,
'Local' schema, A.constraint_type, A.table_name,
A.r_constraint_name, A.delete_rule, A.status, B.object_text
FROM user_constraints@rem_schema A, temp_schema_compare B
WHERE B.database (+) = 2
AND B.object_name (+) = A.constraint_name
ORDER BY 1, 4, 2;
REM Database link differences
REM =========================
PROMPT DATABASE LINK DISCREPENCIES
COL db_link FORMAT a40
SELECT db_link, 'Remote' schema, username, host
FROM user_db_links@rem_schema
MINUS
SELECT db_link, 'Remote' schema, username, host
FROM user_db_links
UNION ALL
SELECT db_link, 'Local' schema, username, host
FROM user_db_links
WHERE db_link NOT LIKE 'REM_SCHEMA.%'
MINUS
SELECT db_link, 'Local' schema, username, host
FROM user_db_links@rem_schema
ORDER BY 1, 2;
REM Sequence differences
REM ====================
PROMPT SEQUENCE DISCREPENCIES
SELECT sequence_name, 'Remote' schema, min_value, max_value,
increment_by, cycle_flag, order_flag, cache_size
FROM user_sequences@rem_schema
MINUS
SELECT sequence_name, 'Remote' schema, min_value, max_value,
increment_by, cycle_flag, order_flag, cache_size
FROM user_sequences
UNION ALL
SELECT sequence_name, 'Local' schema, min_value, max_value,
increment_by, cycle_flag, order_flag, cache_size
FROM user_sequences
MINUS
SELECT sequence_name, 'Local' schema, min_value, max_value,
increment_by, cycle_flag, order_flag, cache_size
FROM user_sequences@rem_schema
ORDER BY 1, 2;
REM Private synonym differences
REM ===========================
PROMPT PRIVATE SYNONYM DISCREPENCIES
SELECT synonym_name, 'Remote' schema, table_owner, table_name, db_link
FROM user_synonyms@rem_schema
MINUS
SELECT synonym_name, 'Remote' schema, table_owner, table_name, db_link
FROM user_synonyms
UNION ALL
SELECT synonym_name, 'Local' schema, table_owner, table_name, db_link
FROM user_synonyms
MINUS
SELECT synonym_name, 'Local' schema, table_owner, table_name, db_link
FROM user_synonyms@rem_schema
ORDER BY 1, 2;
REM PL/SQL differences
REM ==================
PROMPT SOURCE CODE DISCREPENCIES FOR PACKAGES, PROCEDURES, AND FUNCTIONS
PROMPT THAT EXIST IN BOTH SCHEMAS
SELECT name, type, COUNT (*) discrepencies
FROM
SELECT name, type, line, text
FROM user_source@rem_schema
WHERE (name, type) IN
SELECT object_name, object_type
FROM user_objects
MINUS
SELECT name, type, line, text
FROM user_source
UNION ALL
SELECT name, type, line, text
FROM user_source
WHERE (name, type) IN
SELECT object_name, object_type
FROM user_objects@rem_schema
MINUS
SELECT name, type, line, text
FROM user_source@rem_schema
GROUP BY name, type
ORDER BY name, type;
PROMPT SOURCE CODE DISCREPENCIES FOR PACKAGES, PROCEDURES, AND FUNCTIONS
PROMPT THAT EXIST IN BOTH SCHEMAS (CASE INSENSITIVE COMPARISON)
SELECT name, type, COUNT (*) discrepencies
FROM
SELECT name, type, line, UPPER (text)
FROM user_source@rem_schema
WHERE (name, type) IN
SELECT object_name, object_type
FROM user_objects
MINUS
SELECT name, type, line, UPPER (text)
FROM user_source
UNION ALL
SELECT name, type, line, UPPER (text)
FROM user_source
WHERE (name, type) IN
SELECT object_name, object_type
FROM user_objects@rem_schema
MINUS
SELECT name, type, line, UPPER (text)
FROM user_source@rem_schema
GROUP BY name, type
ORDER BY name, type;
REM Trigger differences
REM ===================
PROMPT TRIGGER DISCREPENCIES
SET FEEDBACK OFF
TRUNCATE TABLE temp_schema_compare;
DECLARE
CURSOR c1 IS
SELECT trigger_name, trigger_body
FROM user_triggers;
CURSOR c2 IS
SELECT trigger_name, trigger_body
FROM user_triggers@rem_schema;
v_trigger_name VARCHAR2(30);
v_trigger_body VARCHAR2(32767);
v_hash_value NUMBER;
BEGIN
OPEN c1;
LOOP
FETCH c1 INTO v_trigger_name, v_trigger_body;
EXIT WHEN c1%NOTFOUND;
v_trigger_body := REPLACE (v_trigger_body, ' ', NULL);
v_trigger_body := REPLACE (v_trigger_body, CHR(9), NULL);
v_trigger_body := REPLACE (v_trigger_body, CHR(10), NULL);
v_trigger_body := REPLACE (v_trigger_body, CHR(13), NULL);
v_trigger_body := UPPER (v_trigger_body);
v_hash_value := dbms_utility.get_hash_value (v_trigger_body, 1, 65536);
INSERT INTO temp_schema_compare (database, object_name, hash_value)
VALUES (1, v_trigger_name, v_hash_value);
END LOOP;
CLOSE c1;
OPEN c2;
LOOP
FETCH c2 INTO v_trigger_name, v_trigger_body;
EXIT WHEN c2%NOTFOUND;
v_trigger_body := REPLACE (v_trigger_body, ' ', NULL);
v_trigger_body := REPLACE (v_trigger_body, CHR(9), NULL);
v_trigger_body := REPLACE (v_trigger_body, CHR(10), NULL);
v_trigger_body := REPLACE (v_trigger_body, CHR(13), NULL);
v_trigger_body := UPPER (v_trigger_body);
v_hash_value := dbms_utility.get_hash_value (v_trigger_body, 1, 65536);
INSERT INTO temp_schema_compare (database, object_name, hash_value)
VALUES (2, v_trigger_name, v_hash_value);
END LOOP;
CLOSE c2;
END;
SET FEEDBACK 1
SELECT A.trigger_name, 'Local' schema, A.trigger_type,
A.triggering_event, A.table_name, SUBSTR (A.referencing_names, 1, 30)
referencing_names, SUBSTR (A.when_clause, 1, 30) when_clause,
A.status, B.hash_value
FROM user_triggers A, temp_schema_compare B
WHERE B.object_name (+) = A.trigger_name
AND B.database (+) = 1
AND A.table_name IN
SELECT table_name
FROM user_tables@rem_schema
MINUS
SELECT A.trigger_name, 'Local' schema, A.trigger_type,
A.triggering_event, A.table_name, SUBSTR (A.referencing_names, 1, 30)
referencing_names, SUBSTR (A.when_clause, 1, 30) when_clause,
A.status, B.hash_value
FROM user_triggers@rem_schema A, temp_schema_compare B
WHERE B.object_name (+) = A.trigger_name
AND B.database (+) = 2
UNION ALL
SELECT A.trigger_name, 'Remote' schema, A.trigger_type,
A.triggering_event, A.table_name, SUBSTR (A.referencing_names, 1, 30)
referencing_names, SUBSTR (A.when_clause, 1, 30) when_clause,
A.status, B.hash_value
FROM user_triggers@rem_schema A, temp_schema_compare B
WHERE B.object_name (+) = A.trigger_name
AND B.database (+) = 2
AND A.table_name IN
SELECT table_name
FROM user_tables
MINUS
SELECT A.trigger_name, 'Remote' schema, A.trigger_type,
A.triggering_event, A.table_name, SUBSTR (A.referencing_names, 1, 30)
referencing_names, SUBSTR (A.when_clause, 1, 30) when_clause,
A.status, B.hash_value
FROM user_triggers A, temp_schema_compare B
WHERE B.object_name (+) = A.trigger_name
AND B.database (+) = 1
ORDER BY 1, 2, 5, 3;
REM View differences
REM ================
PROMPT VIEW DISCREPENCIES
SET FEEDBACK OFF
TRUNCATE TABLE temp_schema_compare;
DECLARE
CURSOR c1 IS
SELECT view_name, text
FROM user_views;
CURSOR c2 IS
SELECT view_name, text
FROM user_views@rem_schema;
v_view_name VARCHAR2(30);
v_text VARCHAR2(32767);
v_hash_value NUMBER;
BEGIN
OPEN c1;
LOOP
FETCH c1 INTO v_view_name, v_text;
EXIT WHEN c1%NOTFOUND;
v_text := REPLACE (v_text, ' ', NULL);
v_text := REPLACE (v_text, CHR(9), NULL);
v_text := REPLACE (v_text, CHR(10), NULL);
v_text := REPLACE (v_text, CHR(13), NULL);
v_text := UPPER (v_text);
v_hash_value := dbms_utility.get_hash_value (v_text, 1, 65536);
INSERT INTO temp_schema_compare (database, object_name, hash_value)
VALUES (1, v_view_name, v_hash_value);
END LOOP;
CLOSE c1;
OPEN c2;
LOOP
FETCH c2 INTO v_view_name, v_text;
EXIT WHEN c2%NOTFOUND;
v_text := REPLACE (v_text, ' ', NULL);
v_text := REPLACE (v_text, CHR(9), NULL);
v_text := REPLACE (v_text, CHR(10), NULL);
v_text := REPLACE (v_text, CHR(13), NULL);
v_text := UPPER (v_text);
v_hash_value := dbms_utility.get_hash_value (v_text, 1, 65536);
INSERT INTO temp_schema_compare (database, object_name, hash_value)
VALUES (2, v_view_name, v_hash_value);
END LOOP;
CLOSE c2;
END;
SET FEEDBACK 1
SELECT A.view_name, 'Local' schema, B.hash_value
FROM user_views A, temp_schema_compare B
WHERE B.object_name (+) = A.view_name
AND B.database (+) = 1
AND A.view_name IN
SELECT view_name
FROM user_views@rem_schema
MINUS
SELECT A.view_name, 'Local' schema, B.hash_value
FROM user_views@rem_schema A, temp_schema_compare B
WHERE B.object_name (+) = A.view_name
AND B.database (+) = 2
UNION ALL
SELECT A.view_name, 'Remote' schema, B.hash_value
FROM user_views@rem_schema A, temp_schema_compare B
WHERE B.object_name (+) = A.view_name
AND B.database (+) = 2
AND A.view_name IN
SELECT view_name
FROM user_views
MINUS
SELECT A.view_name, 'Remote' schema, B.hash_value
FROM user_views A, temp_schema_compare B
WHERE B.object_name (+) = A.view_name
AND B.database (+) = 1
ORDER BY 1, 2;
REM Job queue differences
REM =====================
COL what FORMAT a30
COL interval FORMAT a30
PROMPT JOB QUEUE DISCREPENCIES
SELECT what, interval, 'Remote' schema
FROM user_jobs@rem_schema
MINUS
SELECT what, interval, 'Remote' schema
FROM user_jobs
UNION ALL
SELECT what, interval, 'Local' schema
FROM user_jobs
MINUS
SELECT what, interval, 'Local' schema
FROM user_jobs@rem_schema
ORDER BY 1, 2, 3;
REM Privilege differences
REM =====================
PROMPT OBJECT-LEVEL GRANT DISCREPENCIES
SELECT owner, table_name, 'Remote' schema, grantee, privilege, grantable
FROM user_tab_privs@rem_schema
WHERE (owner, table_name) IN
SELECT owner, object_name
FROM all_objects
MINUS
SELECT owner, table_name, 'Remote' schema, grantee, privilege, grantable
FROM user_tab_privs
UNION ALL
SELECT owner, table_name, 'Local' schema, grantee, privilege, grantable
FROM user_tab_privs
WHERE (owner, table_name) IN
SELECT owner, object_name
FROM all_objects@rem_schema
MINUS
SELECT owner, table_name, 'Local' schema, grantee, privilege, grantable
FROM user_tab_privs@rem_schema
ORDER BY 1, 2, 3;
PROMPT SYSTEM PRIVILEGE DISCREPENCIES
SELECT privilege, 'Remote' schema, admin_option
FROM user_sys_privs@rem_schema
MINUS
SELECT privilege, 'Remote' schema, admin_option
FROM user_sys_privs
UNION ALL
SELECT privilege, 'Local' schema, admin_option
FROM user_sys_privs
MINUS
SELECT privilege, 'Local' schema, admin_option
FROM user_sys_privs@rem_schema
ORDER BY 1, 2;
PROMPT ROLE PRIVILEGE DISCREPENCIES
SELECT granted_role, 'Remote' schema, admin_option, default_role, os_granted
FROM user_role_privs@rem_schema
MINUS
SELECT granted_role, 'Remote' schema, admin_option, default_role, os_granted
FROM user_role_privs
UNION ALL
SELECT granted_role, 'Local' schema, admin_option, default_role, os_granted
FROM user_role_privs
MINUS
SELECT granted_role, 'Local' schema, admin_option, default_role, os_granted
FROM user_role_privs@rem_schema
ORDER BY 1, 2;
SPOOL OFF
SET TERMOUT ON
PROMPT
PROMPT Report output written to &report
SET FEEDBACK OFF
DROP TABLE temp_schema_compare;
DROP DATABASE LINK rem_schema;
SET FEEDBACK 6
SET PAGESIZE 20
SET LINESIZE 80 -
Hii,
i am trying write some code to transfer data from csv file to a database.
my problem is to determine the datatype of various column values in the csv file. I read the csv file column wise and have to determine what datatype each col. contains, so to map it to correct type for creating tables in the DB.
Can someone provide me any reference for determining datatype of a col. value read from csv file, (my google search couldn't yield exact results); i can't figure out how should i determine the type of each column data
thanksbit confused now, here is an example csv file
21.10.2003;6;0.99;Feb 96;1
22.10.2003;5;0.99;Feb 66;1
23.10.2003;10;0.99;Feb 34;1
24.10.2003;3;1;02. Jun;1i parse the values and each value can be returned as
String[]
nothing can said for sure, how to determine whether
its int, or float or date :-|
best way: is to let user decide it?I would say so yes. If you have a particular format that you know in advance you can code for that.... but to dynamically identify the column type??
It will be tricky. For example look at the dates. How many SimpleDateFormats are you going to try to parse before giving up and concluding that it is a String or even a number. (Because a database timestamp column will look just like a number)
And for numerics... it's an even bigger nightmare. Because first you can look for decimal places... but is the column signed or unsigned? What about the size of the field... what if the first few rows are all ones and twos and the last row has a number like 10786568769.
I just don't see how you can practically code for EVERY situation.
Look even at what an existing tool like Access does. It makes some guesses but often you have to tell it or convert the data after it has loaded it as strings. -
Making a Table/Table Non-editable
I have a table made by a DefaultTableModel which then produces a JTable. I have set a listener on to the JTable to recognise when a row is selected. What I also want to do is make it so the user can not type new information into the table. It doesn't actually store anything in the background but I want all the data to stay the same visually as it does when it first appears.
try this
JTable table = new JTable() {
public boolean isCellEditable(int rowIndex, int vColIndex) {
if (vColIndex == 0) { // What ever the col index is
return (false);
else {
return (true);
}; -
using Oracle 9i
I need to remove the decimal from a given number
123.45 should show as 12345 i tried this
create table tmpTBL
as
select 25.750 amt from dual
union all
select 12 from dual;
select replace(amt,'.',null) from tmpTBL
this works fine, but what if the col has amouts without decimals
123 should show as 12300
if decimal is there then remove it
else pad the number with '00'
how do i achieve this?
ThanksWhy not simply multiply by 100 ?Perhaps because that assumes no more than 2 decimal places?
SQL> ed
Wrote file afiedt.buf
1 with t as (select 25.750 as num from dual union all
2 select 12 from dual union all
3 select 123 from dual union all
4 select 123.4 from dual union all
5 select 123.45 from dual union all
6 select 123.456 from dual)
7 -- end of test data
8 select num*100 as num_x_100
9 ,replace(to_char(num, '999999.99'),'.') as num_stripped
10* from t
SQL> /
NUM_X_100 NUM_STRIPP
2575 2575
1200 1200
12300 12300
12340 12340
12345 12345
12345.6 12346
6 rows selected.
SQL> -
Hi,
Just started with Flex, so at the risk of asking a
ridiculously simple question: how do I display the rowindex in a
datagrid?
My datagrid is filled using a dataProvider that points to an
xml object. All fields in the object get filled in the various
columns in the grid. However, there are no row numbers in the xml
object, so I wanted to dynamically fill those using a labelFunction
or something like it. No luck however.
To make things more clear, this is what I want:
colA | colB | colC
1 | valueX | value1
2 | valueY | value2
3 | valueZ | value3
ColA is not present in the xml object, so how do I create it?
Thanks,
RuudlabelFunction(item:Object, column:DataGridColumn):String
var index:int = myDataProvider.getItemIndex(item) + 1;
return index.toString();
} -
Moving the cursor inside a file being written.
Is there any way to move the cursor to a specific location in a file that I am editing.
for example:
moveCursor(int row, int col)
moveRight(int col)
moveToEnd(); //Move to end of current rowI know that I can use RandomAccessFile but that only provides skipBytes(int), seek(long), and getFilePointer().
Thanks,
MarcusI don't know of anything like that in the api, but you could roll your own. You need to know the length of your lines (which I assume you do since it's a RAF). It'll also be easier to keep track of what row and col you're on, so you don't have to recompute it continually (this may not be true depending on the rest of your design).
To move the cursor to a given row and col, you seek to (row * RECORD_LENGTH + col).
To move right, just move the pointer ahead the difference between the current col and the given col.
Moving to the end of the current row is the same as moving right, just with the last row specified.
Add in some bounds checking to make sure you don't go past the end of a row, and you should be good. -
[SQL 2012] split string with forbidden characters
Hi all,
I have an issue with a query
I would like to find an equivalent of pivot function, but with a column that contains forbidden characters (like []&) and using delimiter (,), and when number of value on column could be different :
colA colB colC
toto titi [valeur].[membre].&[test1],[valeur].[membre].&[test2],[valeur].[membre].&[test3]
tata tutu [valeur].[membre].&[test4],[valeur].[membre].&[test5]
fifi fafa [valeur].[membre].&[test6]
fofo fufu [valeur].[membre].&[test7],[valeur].[membre].&[test7],[valeur].[membre].&[test9]
what should give :
colA colB colC
toto titi [valeur].[membre].&[test1]
toto titi [valeur].[membre].&[test2]
toto titi [valeur].[membre].&[test3]
tata tutu [valeur].[membre].&[test4]
tata tutu [valeur].[membre].&[test5]
fifi fafa [valeur].[membre].&[test6]
fofo fufu [valeur].[membre].&[test7]
fofo fufu [valeur].[membre].&[test8]
fofo fufu [valeur].[membre].&[test9]
I try with splitstring function, xml path, but nothing works.
Thanks in advance.
XavierXavier,
check if this helps:
simple usage of a split function which can then be cross applied with the table.
--CREATE FUNCTION dbo.fn_sample_Split
-- @RowData nvarchar(2000),
-- @SplitOn nvarchar(5)
--RETURNS @RtnValue table
-- Id int identity(1,1),
-- Data nvarchar(100)
--AS
--BEGIN
-- Declare @Cnt int
-- Set @Cnt = 1
-- While (Charindex(@SplitOn,@RowData)>0)
-- Begin
-- Insert Into @RtnValue (data)
-- Select
-- Data = ltrim(rtrim(Substring(@RowData,1,Charindex(@SplitOn,@RowData)-1)))
-- Set @RowData = Substring(@RowData,Charindex(@SplitOn,@RowData)+1,len(@RowData))
-- Set @Cnt = @Cnt + 1
-- End
-- Insert Into @RtnValue (data)
-- Select Data = ltrim(rtrim(@RowData))
-- Return
--END
declare @tab table (cola varchar(20),colb varchar(20),colc varchar(100))
INSERT @tab SELECT 'toto','titi','[valeur].[membre].&[test1],[valeur].[membre].&[test2],[valeur].[membre].&[test3]'
INSERT @tab SELECT 'tata','tutu','[valeur].[membre].&[test4],[valeur].[membre].&[test5]'
INSERT @tab SELECT 'fifi','fafa','[valeur].[membre].&[test6]'
INSERT @tab SELECT 'fofo','fufu','[valeur].[membre].&[test7],[valeur].[membre].&[test7],[valeur].[membre].&[test9]'
select t.cola,t.colb,fn.data
From @tab t
cross apply dbo.fn_sample_split(t.colc,',') fn
Thanks,
Jay
<If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'> -
It appears that Firefox 4 is unable to find common high-traffic servers without a massive lag. Sites like The Washington Post. Facebook and Yahoo. These sites are taking almost five minutes to load in my laptop. It makes the browser useless to me -- and I constantly have to close out of it and go to Safari -- which I hate. But now I hate Firefox more. Whoever programmed this terrible software update has done for Firefox what the Coca Cola guy did to Classic when he introduced "New Coke". What a darn shame.
Maybe it is a problematic add-on? At the top of the Firefox window, select Help<Restart With Add-ons Disabled. This will start Firefox in safe mode. If you notice anything is faster, than chances are the problem you were having was an extension. Disable all of them, then begin enabling them one by one. Restart each time you disable an add-on. If you notice Firefox is slow after enabling a certain add-on, then, problem solved (hopefully).
Another thing you can do is install FasterFox, a helpful add-on that increases the speed of Firefox. Download here: https://addons.mozilla.org/en-US/firefox/addon/fasterfox-9148/ -
What is APP FOR MACBOOK PRO - COL/AE-ZML?
ihave just received an invoice and would like to know what APP FOR MACBOOK PRO - COL/AE-ZML is for. im sorry if this is a silly question. i dont have the macbook pro yet but im just curious as to what it is?
It probably has to do with the shipping. However why not contact the invoice sender and ask them what their codes represent?
-
EC-CS report writer report: what sets to use in general data select/cols?
I am about to write Report Writer reports using table FIMC. In the rows I will use a set that includes the whole balance sheet structure. What do I put in general data selection or columns? I need to know the ids of the (standard?) sets...
hi,
In General Data Selection you have to assign the
1. Controlling Area or Company Code
2. Fiscal Year.
3. From and To Period.
4. Dr. /Cr Indicators.
Cheers
Ranjit -
What is YOUR favorite Zen Micro col
<FONT face=Garamond color=#ff0000 size=7>CHOOSE A <FONT color=#0066ff>COLOR!
<FONT color=#ff0000 size=7><FONT face=Garamond>Red,<FONT color=#ff9900> Orange,<FONT color=#ccff33> Green, Blue,
<FONT color=#ff0000 size=7><FONT face=Garamond><FONT color=#33cccc>LightBlue, <FONT color=#3300cc>Purple, <FONT color=#ff33ff>Pink, Black, <FONT color=#ffffff>White<FONT color=#ffffff>, or <FONT color=#cccccc size=7><FONT face=Garamond>Silver?
<FONT face=Garamond color=#cccccc size=7>
Post why you like this color the best!Message Edited by rockit on 03-03-2005 05:52 AMpersonally, i like the red. red and blue is the color of my rooms, and the contrast is soo cool, making it look like a candy bar or something.
orange is cool to, just don't love the "hue" of it, i owned it, then i traded in for another one because of a deffect, and instead got another color. the hue of the orange was like yellowish off-orange. -
What is difference between adjusting columns these two ways?
Hi everyone,
In my last post I learned that I could create a new Master Page that is designed as a 1-column format and apply it to the body pages I want to have as 1-column. (I have a doc that has 2-column formatted L and R master pages; only 1 page at the very end, the Study Guide, needs to be 1-column formatted).
I recently learned from the Adobe lesson book that if I am in the body page that I want to change from a 2-col to a 1-column format, I can go Graphics>Object Properties and this brings up the Customize Text Frame window where I can change the number of columns to 1 and click set. I found this a lot easier than creating a new Master Page.
What is the difference between applying a one-column design to one page using each of these methods, applying a 1-column master page versus just changing the number of columns as described above? Is one wrong or better than the other?
Thank you for your help!!There are 3 basic* ways of obtaining a custom layout for specific pages:
hack the local column layout
apply a new master Page as a local override:
Format > Page Layout > Master Page Usage > Use Master Page
map the new MP in semi-automatically:
Format > Page Layout > Apply Master Pages (AMP)
1 & 2 are not stable. Unless it's a disconnected flow, adding or deleting text prior to that page can cause your special-needs text to re-flow onto a page with normal Left/Right layout (and unexpected text flowing onto your special layout).
1 is also at risk from an update to the Left/Right MPs themselves.
3 requires that some paragraph on the special-needs page have a unique format name (say, "Heading2_Single"). After you perform your first AMP, an UnstructMasterPageMaps table is created on Reference Page MasterPageMaps. Add the special para name, and the special MP name to it. Thereafter, AMP will make sure that text gets the page it needs.
You can also perform an AMP during Update Book.
It is not reliable in FM 7.x. I don't know about later versions.
I always use technique #3, and perform a separate AMP as part of the pre-print workflow.
* You can also fake the layout in some cases, on the normal page layout, by putting the special needs flow in a table or text frame within an anchored Frame. Anchor to an Across-All-Columns format as needed. It wouldn't be Framemaker if there weren't at least 5 ways of getting the same result .
Maybe you are looking for
-
Classic won't start up PLEASE HELP!!!
I am using OS X on a powerbook G4 and classic will not start up. THe status bar comes on but does not move, it remains in the same postion, not freezing. I have left it for over an hour and still nothing... Does anyone have advice on why classic is n
-
Accounting entry line item after 561 movement type
Hi, I have create initial stock uplaod with MB1C with movement type 561, for 4 materials after post of document it is posted properly with proper amount but when I check the accounting entry it shows me in the amount in two diffrent debit and
-
Activating ABAP Web Dynpro's in transaction SICF
I need access to activate ABAP Web Dynpro's in transaction SICF but don't want access to anything else. It seems that I need to use authorisation object 'S_ICF_ADM' but I can't get this working. Can anyone guide me as to the values I need in there ?
-
First switching contacts from my Torch 9800 to my Z10 was a nightmare. Now some seem to be on my phone and some on my sim card and when I try and transfer them it says some cannot be transfered. My big question is why are my contacts tied to an email
-
Hi there, When deploying a process flow, what happens exactly ? I know deploying a mapping creates a db-package, but i can't find anything in my database referring to the deployed process flow. After deploying a number of process flows and renaming t