Sample scripts for streams setting source 9i-- destination10g

I need to set up streams across 9i to 10g (both in windows OS)
tried out sucessfully setting up across 9i-->9i(using OEM - using sample by oracle ) and
10g-->10g(http://www.oracle.com/technology/obe/obe10gdb/integrate/streams/streams.htm#t6 which uses scripts)
I need to implement streams from 9i to 10g. the problem is:
packages used in 10g demo are not available in 9i.
Do we have a sample script to implement streams across 9i-->10g?

thanks Arvind, that would be really great.Me trying to have a demo so trying the demo scripts on dept table.Me trying since a month.I have moved my 9.2.0.1.0 source to 9.2.0.7 then applied the patchset 3 for 9.2.0.7 to fix the bug as i got to know there was a bug with streams across 9i,10g
bug no:4285404 - PROPROGATION FROM 9.2 AND 10.1 TO 10.2
Note: Executed the same script, with 4.2.2 and not 4.2.1(it is optional) ,as when i tried to export then import and then when i tried to delete supplimental log group from target it said "trying to drop non existant group"
also when i query capture process it is showing LCRs getting queued,propogation also showing data is propagated from source, apply doesnt have errors but showing 0 for transactions assigned as well as applied.
looks like destination queue not getting populated though at source propagation is sucessful
Please find
1.scripts
2.init parameters of 9i (source)
3. init parameters of 10g (target)
SCRIPT:
2.1 Create Streams Administrator :
connect SYS/password as SYSDBA
create user STRMADMIN identified by STRMADMIN;
2.2 Grant the necessary privileges to the Streams Administrator :
GRANT CONNECT, RESOURCE, AQ_ADMINISTRATOR_ROLE to STRMADMIN;
GRANT SELECT ANY DICTIONARY TO STRMADMIN;
GRANT EXECUTE ON DBMS_AQ TO STRMADMIN;
GRANT EXECUTE ON DBMS_AQADM TO STRMADMIN;
GRANT EXECUTE ON DBMS_FLASHBACK TO STRMADMIN;
GRANT EXECUTE ON DBMS_STREAMS_ADM TO STRMADMIN;
GRANT EXECUTE ON DBMS_CAPTURE_ADM TO STRMADMIN;
GRANT EXECUTE ON DBMS_APPLY_ADM TO STRMADMIN;
GRANT EXECUTE ON DBMS_RULE_ADM TO STRMADMIN;
GRANT EXECUTE ON DBMS_PROPAGATION_ADM TO STRMADMIN;
BEGIN
DBMS_AQADM.GRANT_SYSTEM_PRIVILEGE(
privilege => 'ENQUEUE_ANY',
grantee => 'STRMADMIN',
admin_option => FALSE);
END;
BEGIN
DBMS_AQADM.GRANT_SYSTEM_PRIVILEGE(
privilege => 'DEQUEUE_ANY',
grantee => 'STRMADMIN',
admin_option => FALSE);
END;
BEGIN
DBMS_AQADM.GRANT_SYSTEM_PRIVILEGE(
privilege => 'MANAGE_ANY',
grantee => 'STRMADMIN',
admin_option => TRUE);
END;
BEGIN
DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE(
privilege => DBMS_RULE_ADM.CREATE_EVALUATION_CONTEXT_OBJ,
grantee => 'STRMADMIN',
grant_option => TRUE);
DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE(
privilege => DBMS_RULE_ADM.CREATE_RULE_SET_OBJ,
grantee => 'STRMADMIN',
grant_option => TRUE);
DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE(
privilege => DBMS_RULE_ADM.CREATE_RULE_OBJ,
grantee => 'STRMADMIN',
grant_option => TRUE);
END;
BEGIN
DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE(
privilege => DBMS_RULE_ADM.CREATE_ANY_RULE_SET,
grantee => 'STRMADMIN',
grant_option => TRUE);
DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE(
privilege => DBMS_RULE_ADM.ALTER_ANY_RULE_SET,
grantee => 'STRMADMIN',
grant_option => TRUE);
DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE(
privilege => DBMS_RULE_ADM.EXECUTE_ANY_RULE_SET,
grantee => 'STRMADMIN',
grant_option => TRUE);
DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE(
privilege => DBMS_RULE_ADM.CREATE_ANY_RULE,
grantee => 'STRMADMIN',
grant_option => TRUE);
DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE(
privilege => DBMS_RULE_ADM.ALTER_ANY_RULE,
grantee => 'STRMADMIN',
grant_option => TRUE);
DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE(
privilege => DBMS_RULE_ADM.EXECUTE_ANY_RULE,
grantee => 'STRMADMIN',
grant_option => TRUE);
END;
BEGIN
DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE(
privilege => DBMS_RULE_ADM.EXECUTE_ANY_EVALUATION_CONTEXT,
grantee => 'STRMADMIN',
grant_option => TRUE);
END;
2.3 Create streams queue :
connect STRMADMIN/STRMADMIN
BEGIN
DBMS_STREAMS_ADM.SET_UP_QUEUE(
queue_table => 'STREAMS_QUEUE_TABLE',
queue_name => 'STREAMS_QUEUE',
queue_user => 'STRMADMIN');
END;
2.4 Add apply rules for the table at the destination database :
BEGIN
DBMS_STREAMS_ADM.ADD_TABLE_RULES(
table_name => 'SCOTT.DEPT',
streams_type => 'APPLY',
streams_name => 'STRMADMIN_APPLY',
queue_name => 'STRMADMIN.STREAMS_QUEUE',
include_dml => true,
include_ddl => true,
source_database => 'str1');
END;
2.5 Specify an 'APPLY USER' at the destination database:
This is the user who would apply all DML statements and DDL statements.
The user specified in the APPLY_USER parameter must have the necessary
privileges to perform DML and DDL changes on the apply objects.
BEGIN
DBMS_APPLY_ADM.ALTER_APPLY(
apply_name => 'STRMADMIN_APPLY',
apply_user => 'SCOTT');
END;
2.6 If you do not wish the apply process to abort for every error that it
encounters, you can set the below paramter.
The default value is 'Y' which means that apply process would abort due to
any error.
When set to 'N', the apply process will not abort for any error that it
encounters, but the error details would be logged in DBA_APPLY_ERROR.
BEGIN
DBMS_APPLY_ADM.SET_PARAMETER(
apply_name => 'STRMADMIN_APPLY',
parameter => 'DISABLE_ON_ERROR',
value => 'N' );
END;
2.7 Start the Apply process :
BEGIN
DBMS_APPLY_ADM.START_APPLY(apply_name => 'STRMADMIN_APPLY');
END;
Section 3
Steps to be carried out at the Source Database (V920.IDC.ORACLE.COM)
3.1 Move LogMiner tables from SYSTEM tablespace:
By default, all LogMiner tables are created in the SYSTEM tablespace.
It is a good practice to create an alternate tablespace for the LogMiner
tables.
CREATE TABLESPACE LOGMNRTS DATAFILE 'logmnrts.dbf' SIZE 25M AUTOEXTEND ON
MAXSIZE UNLIMITED;
BEGIN
DBMS_LOGMNR_D.SET_TABLESPACE('LOGMNRTS');
END;
3.2 Turn on supplemental logging for DEPT table :
connect SYS/password as SYSDBA
ALTER TABLE scott.dept ADD SUPPLEMENTAL LOG GROUP dept_pk
(deptno) ALWAYS;
3.3 Create Streams Administrator and Grant the necessary privileges :
Repeat steps 2.1 and 2.2 for creating the user and granting the required
privileges.
3.4 Create a database link to the destination database :
connect STRMADMIN/STRMADMIN
CREATE DATABASE LINK str2 connect to
STRMADMIN identified by STRMADMIN using 'str2' ;
//db link working fine.I tested it
3.5 Create streams queue:
BEGIN
DBMS_STREAMS_ADM.SET_UP_QUEUE(
queue_name => 'STREAMS_QUEUE',
queue_table =>'STREAMS_QUEUE_TABLE',
queue_user => 'STRMADMIN');
END;
3.6 Add capture rules for the table at the source database:
BEGIN
DBMS_STREAMS_ADM.ADD_TABLE_RULES(
table_name => 'SCOTT.DEPT',
streams_type => 'CAPTURE',
streams_name => 'STRMADMIN_CAPTURE',
queue_name => 'STRMADMIN.STREAMS_QUEUE',
include_dml => true,
include_ddl => true,
source_database => 'str1');
END;
3.7 Add propagation rules for the table at the source database.
This step will also create a propagation job to the destination database.
BEGIN
DBMS_STREAMS_ADM.ADD_TABLE_PROPAGATION_RULES(
table_name => 'SCOTT.DEPT',
streams_name => 'STRMADMIN_PROPAGATE',
source_queue_name => 'STRMADMIN.STREAMS_QUEUE',
destination_queue_name => 'STRMADMIN.STREAMS_QUEUE@str2,
include_dml => true,
include_ddl => true,
source_database => 'str1');
END;
Section 4
Export, import and instantiation of tables from Source to Destination Database
4.1 If the objects are not present in the destination database, perform an
export of the objects from the source database and import them into the
destination database
Export from the Source Database:
Specify the OBJECT_CONSISTENT=Y clause on the export command.
By doing this, an export is performed that is consistent for each
individual object at a particular system change number (SCN).
exp [email protected] TABLES=SCOTT.DEPT FILE=tables.dmp
GRANTS=Y ROWS=Y LOG=exportTables.log OBJECT_CONSISTENT=Y
INDEXES=Y STATISTICS = NONE
Import into the Destination Database:
Specify STREAMS_INSTANTIATION=Y clause in the import command.
By doing this, the streams metadata is updated with the appropriate
information in the destination database corresponding to the SCN that
is recorded in the export file.
imp [email protected] FULL=Y CONSTRAINTS=Y
FILE=tables.dmp IGNORE=Y GRANTS=Y ROWS=Y COMMIT=Y LOG=importTables.log
STREAMS_INSTANTIATION=Y
4.2 If the objects are already present in the desination database, there are
2 ways of instanitating the objects at the destination site.
1. By means of Metadata-only export/import :
Export from the Source Database by specifying ROWS=N
exp USERID=SYSTEM@str1TABLES=SCOTT.DEPT FILE=tables.dmp
ROWS=N LOG=exportTables.log OBJECT_CONSISTENT=Y
Import into the destination database using IGNORE=Y
imp USERID=SYSTEM@str2FULL=Y FILE=tables.dmp IGNORE=Y
LOG=importTables.log STREAMS_INSTANTIATION=Y
2. By Manaually instantiating the objects
Get the Instantiation SCN at the source database:
connect STRMADMIN/STRMADMIN@source
set serveroutput on
DECLARE
iscn NUMBER; -- Variable to hold instantiation SCN value
BEGIN
iscn := DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER();
DBMS_OUTPUT.PUT_LINE ('Instantiation SCN is: ' || iscn);
END;
Instantiate the objects at the destination database with this SCN value.
The SET_TABLE_INSTANTIATION_SCN procedure controls which LCRs for a table
are to be applied by the apply process.
If the commit SCN of an LCR from the source database is less than or
equal to this instantiation SCN , then the apply process discards the LCR.
Else, the apply process applies the LCR.
connect STRMADMIN/STRMADMIN@destination
BEGIN
DBMS_APPLY_ADM.SET_TABLE_INSTANTIATION_SCN(
source_object_name => 'SCOTT.DEPT',
source_database_name => 'str1',
instantiation_scn => &iscn);
END;
Enter value for iscn:
<Provide the value of SCN that you got from the source database>
Finally start the Capture Process:
connect STRMADMIN/STRMADMIN@source
BEGIN
DBMS_CAPTURE_ADM.START_CAPTURE(capture_name => 'STRMADMIN_CAPTURE');
END;
INIT.ora at 9i
# Copyright (c) 1991, 2001, 2002 by Oracle Corporation
# Archive
log_archive_dest_1='LOCATION=D:\oracle\oradata\str1\archive'
log_archive_format=%t_%s.dbf
log_archive_start=true
# Cache and I/O
db_block_size=8192
db_cache_size=25165824
db_file_multiblock_read_count=16
# Cursors and Library Cache
open_cursors=300
# Database Identification
db_domain=""
db_name=str1
# Diagnostics and Statistics
background_dump_dest=D:\oracle\admin\str1\bdump
core_dump_dest=D:\oracle\admin\str1\cdump
timed_statistics=TRUE
user_dump_dest=D:\oracle\admin\str1\udump
# File Configuration
control_files=("D:\oracle\oradata\str1\CONTROL01.CTL", "D:\oracle\oradata\str1\CONTROL02.CTL", "D:\oracle\oradata\str1\CONTROL03.CTL")
# Instance Identification
instance_name=str1
# Job Queues
job_queue_processes=10
# MTS
dispatchers="(PROTOCOL=TCP) (SERVICE=str1XDB)"
# Miscellaneous
aq_tm_processes=1
compatible=9.2.0.0.0
# Optimizer
hash_join_enabled=TRUE
query_rewrite_enabled=FALSE
star_transformation_enabled=FALSE
# Pools
java_pool_size=33554432
large_pool_size=8388608
shared_pool_size=100663296
# Processes and Sessions
processes=150
# Redo Log and Recovery
fast_start_mttr_target=300
# Security and Auditing
remote_login_passwordfile=EXCLUSIVE
# Sort, Hash Joins, Bitmap Indexes
pga_aggregate_target=25165824
sort_area_size=524288
# System Managed Undo and Rollback Segments
undo_management=AUTO
undo_retention=10800
undo_tablespace=UNDOTBS1
firstspare_parameter=50
jobqueue_interval=1
aq_tm_processes=1
transaction_auditing=TRUE
global_names=TRUE
logmnr_max_persistent_sessions=5
log_parallelism=1
parallel_max_servers=2
open_links=5
INIT>ora at 10g (target)
# Copyright (c) 1991, 2001, 2002 by Oracle Corporation
# Archive
log_archive_format=ARC%S_%R.%T
# Cache and I/O
db_block_size=8192
db_cache_size=25165824
db_file_multiblock_read_count=16
# Cursors and Library Cache
open_cursors=300
# Database Identification
db_domain=""
db_name=str2
# Diagnostics and Statistics
background_dump_dest=D:\oracle\product\10.1.0\admin\str2\bdump
core_dump_dest=D:\oracle\product\10.1.0\admin\str2\cdump
user_dump_dest=D:\oracle\product\10.1.0\admin\str2\udump
# File Configuration
control_files=("D:\oracle\product\10.1.0\oradata\str2\control01.ctl", "D:\oracle\product\10.1.0\oradata\str2\control02.ctl", "D:\oracle\product\10.1.0\oradata\str2\control03.ctl")
db_recovery_file_dest=D:\oracle\product\10.1.0\flash_recovery_area
db_recovery_file_dest_size=2147483648
# Job Queues
job_queue_processes=10
# Miscellaneous
compatible=10.1.0.2.0
# Pools
java_pool_size=50331648
large_pool_size=8388608
shared_pool_size=83886080
# Processes and Sessions
processes=150
sessions=4
# Security and Auditing
remote_login_passwordfile=EXCLUSIVE
# Shared Server
dispatchers="(PROTOCOL=TCP) (SERVICE=str2XDB)"
# Sort, Hash Joins, Bitmap Indexes
pga_aggregate_target=25165824
sort_area_size=65536
# System Managed Undo and Rollback Segments
undo_management=AUTO
undo_tablespace=UNDOTBS1
sga_target=600000000
parallel_max_servers=2
global_names=TRUE
open_links=4
logmnr_max_persistent_sessions=4
REMOTE_ARCHIVE_ENABLE=TRUE
streams_pool_size=300000000
undo_retention=1000
tahnks a lot...

Similar Messages

  • How Can I write Script for Indesign set left indent

    I really need two scripts for indesign set left indent:
    1. If the left indent is: 8, 16, 24, 32, 40, 48, 56mm... set the first -8mm; if the left indent is 0, set the left indent 8mm, first -8mm.
    2. Whatever the first indent is, set the first 8mm.
    Can someone help me?

    Hi, Trevor
    I use change by list as below:
    grep {leftIndent:48mm} {leftIndent:56mm}
    grep {leftIndent:40mm} {leftIndent:48mm}
    grep {leftIndent:32mm} {leftIndent:40mm}
    grep {leftIndent:24mm} {leftIndent:32mm}
    grep {leftIndent:16mm} {leftIndent:24mm}
    grep {leftIndent:8mm} {leftIndent:16mm}
    grep {firstLineIndent:8mm, leftIndent:48mm} {firstLineIndent:8mm, leftIndent:56mm}
    grep {firstLineIndent:8mm, leftIndent:32mm} {firstLineIndent:8mm, leftIndent:48mm}
    grep {firstLineIndent:8mm, leftIndent:24mm} {firstLineIndent:8mm, leftIndent:32mm}
    grep {firstLineIndent:8mm, leftIndent:16mm} {firstLineIndent:8mm, leftIndent:24mm}
    grep {firstLineIndent:8mm, leftIndent:8mm} {firstLineIndent:8mm, leftIndent:16mm}
    grep {firstLineIndent:-8mm, leftIndent:48mm} {firstLineIndent:-8mm, leftIndent:56mm}
    grep {firstLineIndent:-8mm, leftIndent:32mm} {firstLineIndent:-8mm, leftIndent:48mm}
    grep {firstLineIndent:-8mm, leftIndent:24mm} {firstLineIndent:-8mm, leftIndent:32mm}
    grep {firstLineIndent:-8mm, leftIndent:16mm} {firstLineIndent:-8mm, leftIndent:24mm}
    grep {firstLineIndent:-8mm, leftIndent:8mm} {firstLineIndent:-8mm, leftIndent:16mm}
    but not that perfect,
    I want to useing jave "if{}" or "for{}" to write this script, but I don't kown the syntext.

  • AP_INVOICES_INTERFACE AP_INVOICES_INTERFACE Sample Script for r12

    Hello,
    I would like to know if anyone can help me on giving a sample on how to populate the AP_INVOICES_INTERFACE table and AP_INVOICE_LINES_INTERFACE table to create Invoices in r12, I have some scripts for r11i but I need to know if I have to make changes to them.
    Greetings

    See http://imdjkoch.wordpress.com/2010/08/11/ap-invoice-interface/
    Sandeep Gandhi

  • Streaming audio, web hosting, scripts for streaming?

    Hello all,
    Back several years ago, it seemed all the big web hosts
    featured "streaming
    audio and video" as a feature of their hosting plans at some
    dollar amount. You
    know, once you elevated to the $19.95 a month plan at XYZ
    host, your website
    could stream audio or video.
    I don't see that anywhere in web hosts monthly plans any
    longer at any dollar
    amount. Anyway I have a client who sells her own music, and I
    have been trying
    to find a web host that supports streaming audio, mp3, etc. I
    checked with 1
    and 1 (webhost) and they responded as follows:
    "Basically our eshop can support streaming but it would be
    through
    scripts only. So, it would be in your end to do those
    matters."
    I have no idea what that actually means. And I realize I
    could just send the
    guy a note and ask him, but I figured I would get a more
    comprehensive and
    valuable answer here since I use Dreamweaver. By "script" are
    they talking
    about something like Flash Audio Kit? I am confused by the
    whole thing now. I
    thought it was as simple as looking for a hosting plan that
    supported streaming.
    I use Dreamweaver 8, Windows, if that matters for this
    question.
    Thanks a million!
    Tim

    Thank you for responding but I finally got it to work.
    By the way it was http://wm1.uwsp.edu/90fm ... go trivia...

  • Missing iTunes library for music setting source

    Went to add music from iTunes. The sample, theme, garageband comes up with options but the iTunes but it says "open iTunes 6 or later to populate this area" which is also greyed out. I have itunes 9.2 open before opening iPhoto - no go, also opened iTunes after opening iPhoto - still no go. What am I doing wrong and what can I do to correct this?
    ~bruce.

    What format is the drive you are storing your iTunes Library on? Mac OS Format is highly recommended.
    Ensure all your software is up to date. Mac OS X 10.6.4 and iTunes 9.2 are current.
    Try making a new iTunes Library and testing, you may have a damaged iTunes Library database.
    1.) Open iTunes and drag 1 song out to the desktop.
    2.) Quit iTunes (iTunes > Quit)
    3.) Hold down the option key and launch iTunes
    4.) Create a new blank library
    5.) Add the song from the desktop
    6.) Test several iLife programs (iPhoto,iMovie, iDVD, etc.) to see if this Library's contents are detected.
    _If the new library is detected by the iLife programs then you have a damaged iTunes Library database.
    _Follow this article to rebuild your database: http://support.apple.com/kb/HT1451
    _If the issue persists with a new iTunes library remove the following to the trash and restart the computer and try again:
    Home > Library > Caches (I remove the whole folder. It will be re-generated upon restart.)
    Home > Library > Preferences > com.apple.itunes (There will be more than on. Remove them all.)
    Hope that helps.

  • Where can I download the scripts for sample  IX, SH schemas for 11g

    Hi,
    I have installed oracle 11g database without the sample schemas. In the standard set of sample schemas we had an example Information Exachange schema (for queue), and a Sales Historyschema . Howver I am not getting the sample scripts for these two schemas in my demo directory.
    Can you please let me know where can I get access to the scripts?
    I have a requirement for a OLTP datastore which can receive high volume of data from an external system(Expecting max of 6gb data). I am planning create a separate schema , with dedicated tablespaces, Is it a good idea to have one datafile with a maxsize set to 6gb or to have a set of 3 starting at 1000m locally managed and a max size of 2gb each. There are not many indexes needed, however I need to set up an in queue and out queue as well. If I create this schema them do I need to revisit my redolog groups or temp table sizing as well to keep my existing database performance intact?
    Is there any standard guidelines to follow for a schema where you expect large volume of data,has multiple queues?
    Many Thanks,
    Chandana

    user13057029 wrote:
    Hi,
    I have installed oracle 11g database without the sample schemas. In the standard set of sample schemas we had an example Information Exachange schema (for queue), and a Sales Historyschema . Howver I am not getting the sample scripts for these two schemas in my demo directory.
    Can you please let me know where can I get access to the scripts?http://docs.oracle.com/cd/E11882_01/server.112/e10831/installation.htm#COMSC00002
    >
    I have a requirement for a OLTP datastore which can receive high volume of data from an external system(Expecting max of 6gb data). I am planning create a separate schema , with dedicated tablespaces, Is it a good idea to have one datafile with a maxsize set to 6gb or to have a set of 3 starting at 1000m locally managed and a max size of 2gb each. There are not many indexes needed, however I need to set up an in queue and out queue as well. If I create this schema them do I need to revisit my redolog groups or temp table sizing as well to keep my existing database performance intact?
    Is there any standard guidelines to follow for a schema where you expect large volume of data,has multiple queues?Ask this question in a separate thread.
    Aman....

  • Scripts for starting/stopping managed servers

    All,
    Could someone provide me with some sample scripts for starting/stopping managed Weblogic servers?  I'm specifically looking for ways to start/stop them WITHOUT starting the AdminServer.  I'm running WLS 10.3.6 on Windows Server 2003, and I have NodeManager set to start automatically as a Windows service.
    I know how to set my managed servers up as Windows services so that they will start automatically at boot, but this requires the AdminServer to be running, which I do not want.  I just want a few scripts for starting/stopping the managed servers (and maybe some hints as to how to make them start automatically without starting the AdminServer).
    Thanks in advance,
    Tom

    Hello Puneet,
    Admin console is an web application deployed into AdminServer. Hence if you shutdown AdminServer then you wouldn't able to access Admin console.
    Managed Server would function in MSI mode, however you will not be able to make any configuration or administration activities like deployment , any configuration changes , etc.
    Hello PRISM,
    Can you confirm your requirement about why you don't want AdminServer to be running?
    As I said,  you will loose the administration capability if you don't have admin server running.
    Regards
    Rosario

  • Sql Server Script for the List of all Country State and City

    I am searching for the Sql Server Script of all country State and City with the Following type
    For the Country only 2 Columns are there i.e. CountryId and CountryName(CountryId is primary Key)
    For the State 3 Columns are there i.e. CountryId, StateId and StateName(StateId is Primary Key and CountryId is Foreign Key)
    For the City 3 Columns are there i.e. StateId ,CityId and CityName(CityId is PrimaryKey and StateId is foreign Key).
    I need this type of Script with Column name. plzzz help me out i m stuck i didnt get the list as i want.
    Thanx and Regrads,

    Hi Vishnu,
    According to your description, you want to list all countries, states and cities, right?
    I have tested it on my local environment, here is a sample script for you reference.
    select
    [dbo].[Country].[CountryId]
    , [dbo].[Country].[CountryName]
    , [dbo].[State].[StateId]
    , [dbo].[State].[StateName]
    , [dbo].[City].[CityId]
    , [dbo].[City].[CityName]
    from
    [dbo].[Country]
    left join [dbo].[State] on [dbo].[Country].[CountryId]=[dbo].[State].[CountryId]
    left join [dbo].[City] on [dbo].[State].[StateId]=[dbo].[City].[StateId]
    Regards,
    Charlie Liao
    TechNet Community Support

  • Startup Scripts for OBIEE 11g on Linux

    Hi, I originally spent many hours trying to find a startup/shutdown script for OBIEE on linux, in the end I compiled a new one based on notes in the install manual and other posts on the subject until I got it working consistantly
    Please add comments or improvements :)
    Note: you need to create the boot.properties file (in /security) for each server, and provide the username/password so WebLogic won't prompt for it when starting automatically (otherwise it doesn't start :p) ....refer to the install manual or [weblogic boot.properties|http://onlineappsdba.com/index.php/2010/08/21/weblogic-startup-prompting-from-username-password-bootproperties/]
    #!/bin/bash
    # /etc/init.d/obiee
    # Run-level Startup script for OBIEE
    # set required paths
    export ORACLE_BASE=/opt/oracle
    export ORACLE_HOME=/opt/oracle/product/11.1.0/db_1
    export ORACLE_OWNR=oracle
    export ORACLE_FMW=/opt/oracle/product/fmw
    export PATH=$PATH:$ORACLE_FMW/bin
    case "$1" in
    start)
    echo -e "Starting Weblogic Server...."
    su $ORACLE_OWNR -c "$ORACLE_FMW/user_projects/domains/bifoundation_domain/bin/startWebLogic.sh > /dev/null 2>&1 &"
    sleep 30
    echo -e "Starting Node Manager..."
    su $ORACLE_OWNR -c "$ORACLE_FMW/wlserver_10.3/server/bin/startNodeManager.sh > /dev/null 2>&1 &"
    sleep 30
    echo -e "Starting Managed Server: bi_server1..."
    su $ORACLE_OWNR -c "$ORACLE_FMW/user_projects/domains/bifoundation_domain/bin/startManagedWebLogic.sh bi_server1 [url for admin console] > /dev/null 2>&1 &"
    sleep 30
    echo -e "Starting Components...."
    su $ORACLE_OWNR -c "$ORACLE_FMW/instances/instance1/bin/opmnctl startall > /dev/null 2>&1 &"
    sleep 30
    stop)
    echo -e "Stopping Components...."
    su $ORACLE_OWNR -c "$ORACLE_FMW/instances/instance1/bin/opmnctl stopall > /dev/null 2>&1 &"
    sleep 30
    echo -e "Stopping Managed Server: bi_server1..."
    su $ORACLE_OWNR -c "$ORACLE_FMW/user_projects/domains/bifoundation_domain/bin/stopManagedWebLogic.sh bi_server1 [url for admin console] [weblogic user] [weblogic pass] > /dev/null 2>&1 &"
    sleep 30
    echo -e "Stopping Weblogic Server...."
    su $ORACLE_OWNR -c "$ORACLE_FMW/user_projects/domains/bifoundation_domain/bin/stopWebLogic.sh > /dev/null 2>&1 &"
    sleep 15
    status)
    echo -e "Component Status...."
    su $ORACLE_OWNR -c "$ORACLE_FMW/instances/instance1/bin/opmnctl status"
    restart)
    $0 stop
    $0 start
    echo "Usage: `basename $0` start|stop|restart|status"
    exit 1
    esac
    exit 0
    Hopefully this helps others in the same situation
    Cheers

    HI,
    Is this script for Enterprise Install on a single computer? For Simple install I think there is no concept of nodemanager and managedserver.
    --Joe                                                                                                                                                                                                                                                                                                                           

  • Test Scripts for Oracle Account Recievable app using QTP tool

    Hi
    Please send me some QTP sample Script for testing Oracle AR application
    Thanks

    You will need to create separate scripts for Load testing. The functional scripts cannot be used in OLT. The exceptions to this would be the "General" items (Java Code Script & Web Services) which can also be used in OLT.
    e.g. Instead of selecting "Functional Testing - Oracle EBS/Forms"
    select "Load Testing (Protocol Automation) - Oracle EBS/Forms"
    Once you get into load testing you'll realise that you want to create very specific scripts and won't want to try re-using functional scripts. I know a lot of such tools are 'sold' on the fact that functional scripts can be re-used for load, but when it comes down to it you'll want to design your load scripts seperately anyway!

  • Cold Backup Script for windows

    Hi,
    I have the following script for windows
    set pages 0 lines 500;
    set heading off echo off feedback off verify off pagesize 0;
    select 'copy ' || name || ' c:\BACKUP\COLD_BACKUP\ORADATA\' from v$datafile
    union all
    select 'copy ' || name || ' c:\BACKUP\COLD_BACKUP' from v$controlfile
    union all
    select 'copy ' || member ||' c:\BACKUP\COLD_BACKUP' from v$logfile
    union all
    select 'copy ' || name || ' c:\BACKUP\COLD_BACKUP' from v$tempfile;
    exit;
    In the above script I have given COLD_BACKUP directory for Backup....But what i want is Dynamically it should create the Directory with timestamp in COLD_BACKUP Directory and copy the files to that directory..
    for example
    script should create like this
    c:\BACKUP\COLD_BACKUP\ORCL_11112007
    Like that..it should create the ORCL_11112007 directory and copy the files....
    how can i acheive this...I know we can do it in UNIX..
    But in windows..how we can acheive this...please help me

    You can try to adapt the following SQL*Plus script to create a directory:
    set echo on
    alter session set nls_date_format = 'DDMMYYYY';
    var dd varchar2(10);
    begin
    :dd := trunc(sysdate);
    end;
    set echo off
    spool mkd.sql
    set heading off
    select 'host mkdir ' || :dd from dual;
    spool off
    set echo on
    @mkd.sqlOutput is:
    dev001> alter session set nls_date_format = 'DDMMYYYY';
    Session altered.
    dev001> var dd varchar2(10);
    dev001>
    dev001> begin
      2  :dd := trunc(sysdate);
      3  end;
      4  /
    PL/SQL procedure successfully completed.
    dev001>
    dev001> set echo off
    host mkdir 08112007
    dev001> @mkd.sql
    dev001>
    dev001> host mkdir 08112007
    dev001>
    dev001>
    [pre]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Alert & Audit Log Purging sample script

    Hi Experts,
    Can somebody point to sample scripts for
    1. alert & audit log purging?
    2. Listener log rotation?
    I am sorry if questions look too naive, I am new to DBA activities; pls let me know if more details are required.
    As of now the script is required to be independent of versions/platforms
    Regards,

    34MCA2K2 wrote:
    Thank a lot for your reply!
    If auditing is enabled in Oracle, does it generate Audit log or it inserts into a SYS. table?
    Well, what do your "audit" initialization parameters show?
    For the listener log "rotation", just rename listener.log to something else (there is an OS command for that), then bounce the listener.
    You don't want to purge the alert log, you want to "rotate" it as well.  Just rename the existing file to something else. (there is an OS command for that)
    So this has to be handled at operating system level instead of having a utility. Also if that is the case, all this has to be done when database is shut down right?
    No, the database does not have to be shut down to rotate the listener log.  The database doesn't give a flying fig about the listener log.
    No, the database does not have to be shut down to rotate the alert log.  If the alert log isn't there when it needs to write to it, it will just start a new one.  BTW, beginning with 11g, there are two alert logs .. the old familiar one, now located at $ORACLE_BASE/diag/rdbms/$ORACLE_SID/$ORACLE_SID/trace, and the xml file used by adrci.  There are adrci commands and configurations to manage the latter.
    Again, I leave the details as an exercise for the student to practice his research skills.
    Please confirm my understanding.
    Thanks in advance!

  • Need training material / test scripts for MRP and Supply Chain module. Can anyone hel

    Can anyone out there provide me with sample test scripts they may have used for upgrading to Oracle Financials 11i? Need sample scripts for MRP and Supply Chain management. Looking for good test scenarios for testing these modules. Appreciate any help. Email at [email protected]

    Can anyone out there provide me with sample test scripts they may have used for upgrading to Oracle 11i? Need sample scripts for MRP and Supply Chain management. Looking for good test scenarios for testing these modules. Appreciate any help. Email at [email protected]

  • Sample Script to delete maps in FDQM

    Hi All,
    Can someone please provide us the sample script of deleting the Maps in FDQM.
    Advanced Thanks,

    Hi Tony,
    When we use this option(Delete All button on the mapping grid) we are getting the Stack trace error. we were suggested to use the script to delete the Maps in FDQM.
    Error Message:
    Application Error
    Description: An exception occurred during the execution of the current web request. Please contact the administrator to review the stack trace in the event log for more information about the error.
    Please provide the sample script for delete Maps in FDM.
    Thanks in advance.
    Edited by: venu_reddy on May 24, 2010 10:51 AM

  • How to make a Countdown timer Script for Live Streaming

    I have flash media server...
    Here's a Scenario:
    User wants to do a Live broadcast.. But.. they don't want to
    just press record and have it starting Streaming Right that second.
    They need a Delay to prepare for their Live Broadcasts.
    Whats the best way for a script for a user to decide how much
    time delay they need before Recording Starts?
    Ideally it would look like this:
    There is a separate window that allows the user to set the
    Self-Timer which will give them time to get ready for their live
    broadcasts.
    User sets length of Time Delay: 30 seconds, 1 minute, 2
    minutes, or even up to 5 minutes.
    User presses Start Broadcast or Record Button to start
    streaming Live Video.
    Then.. the Countdown Timer starts... and it displays in Big
    Digits... the countdown on their screen... "3...2...1...
    Broadcasting Live Now!"
    How would I do this?
    Hope someone can help

    Open the widget library panel and follow the link to Adobe Muse Exchange.
    There you find a fine little widget collection, named Andrews Prototypes.
    Load it, double-click the file, and in your library you will find a countdown widget.

Maybe you are looking for

  • No longer able to add folders to iCloud -- only sub-folders

    I just tried to add a new folder to my iCloud account (web interface) for the first time in ages... Everytime I click on the + it wants to create a sub-folder for some already existing folder. DId something else change with this switch to @iCloud.com

  • Bold type displays too large on some pages

    Bold italic type is displaying about twice the size that it should on two pages of an eight page site. (Type box also has plain italic.) I know what I'm doing, and have about 50 pages on five different sites, and these recent two pages are the only o

  • Real Time Integration Document - Rounding Error between LC1 and LC2

    Hi! We recently underwent currency conversion. After the conversion, we noticed that Real Time Integration document that is generated due to Assessment Run (KSU5) produces a document which are off by cents between LC1 and LC2 ,even though both have t

  • Re-using UserTransaction JNDI lookups

    We are using JDBC directly from servlets. Would it be OK to implement a singleton that looks up the UserTransaction from the JNDI tree only once at the beginning and elsewhere in the code we just get it from the singleton? The specification states on

  • Dynamic Web Dynpro

    In my application I need to capture a set of data for every day for as many days as needed, based on information already entered. In other words I do not know how many days I need to capture data for until runtime. I need to be able to dynamically re