VM Exchange or SQL with instant HIT Kit and VSM

Hello

I wonder if someone could explain a bit more on integration of VSM and HIT kit without scenario ISCSI based comments like below...

Exchange and SQL servers are run under vm on Vcenter/Vsphere 5.5 environment, and there is no comments ISCSI connection which means that all disks are vmdk.

So, based on this scenario, is it possible to use the HIT kit to restore data (granular level) even if the snapshot has been taken by VSM data store option?

Thanks in advance...

Hello

No, you cannot use HIT / ME in this case.   The HIT kit requires the MS ISCSI initiator to work properly. For creation and restoration of snapshots.

VSM is against the whole VMFS data store.  First VCS invites you to create snapshots, the VMware VMDK VSM will require instant volume EQL.

VSM don't offer currently not at the file level restore.  However, you can do it manually.

Bring the EQL data store snapshot online.

Connect to a node ESXi and add this snapshot of the data store to that node.

(With storage add, after a new analysis of the ESXi iSCSI initiator)

It renames the snapshot of the data store for: "snapshot - XXXXXX -

You can do a few things here.  Copy the original entire virtual disk of the snapshot to the data store. Or more generally to add the file VMDK from the snapshot on another virtual computer as another drive.

When you start the virtual computer, it will appear as a new drive letter.  Then, you can copy individual files of this copy.

An important thing to note.  When you use a snapshot, you will use instant reserve.  So make sure if you attach not already 100% instant reserve that increase you it as much as possible.  If you consume the reserve of the snapshot, you work with is removed.  According to which EQL FW version, you can borrow from the free space.  This is especially true if you replace a VMDK set.   That will use up to the reserve very quickly...

When you are finished with the EQL snapshot, make sure first that no VMs still use it.  Then put the instant EQL offline in EQL GUI.  And then do a rescan the iSCSI initiator in ESXi GUI.  This will cleanly remove the volume from the node ESXi.  Otherwise, he might try constantly to reconnect to the EQL snapshot, generating errors repeated in the EQL GUI and alerts if you have set up.

Kind regards

Tags: Dell Products

Similar Questions

  • HIT KIT necessary verification

    Hello

    I just wanted to check that I need in fact the HIT Kit do with a PS6000 MPIO.  Currently without the HIT Kit tools, I see 1-way via my iSCSI Initiator on my Server 2008 R2.  The target that I discovered is the IP of the group.  My understanding of how this works, the IP group is an IP virtual, with the other IPS on Eth 0-3, less than.  I am unique path to the IP of the group now without the tools, but after I installed the tools... I'll see what?  All of the IP addresses behind the group IP address?  Or even the tools will manage multiple paths (2 physical network adapters on the server goes to the network iSCSI with eth CM cables connected as well).

    This is the document that I work out now http://en.community.dell.com/dell-groups/dtcmedia/m/mediagallery/20094620/download.aspx

    Thank you.

    You're right in that to have the multiple paths on the PS6000 you will need to install the HIT Kit. Version 4.5 is the latest, and that's the one we recommend that you install. If you log in to the support site and go to the download section for the HIT Kit and scroll to the bottom, there is a section of the documentation for the HIT Kit and you will see the installation and user guide that you can download. It guides you through the entire process on what you need to do to get it installed and configured. Please take a look at this document and not hesitate to let me know if you have any other questions.

  • Distribution kit and problem SQL

    Hello

    I have a strange problem with the Toolbox Kit of Distribution and SQL.

    I use CVI 9.1 on win XP,

    I created a program that connects to a database extraction it's info to the lists, when you use the software in CVI everything OK, workers

    After creating a Distribution of this sweet install on another computer and update the database in the ODBC program works fine BUT I can't get anything from the database,

    the key, but noting happen without msg or error code.

    Any ideas?

    Hello-

    There are a few additional steps that must be taken when distributing the SQL Toolkit.  Please take a look at the help topic located at the following your help of LabWindows/CVI main location:

    Library reference > SQL Toolkit library > distributing a SQL Toolkit executable or a DLL

    Let me know if this does not fix things for you-

    NickB

    National Instruments

  • How to use the kit sensor Bioinstrumentation Vernier with NI ELVIS II and LABview on a CPU?

    So I have the NI ELVIS II + and a box full of Bioinstrumentation sensor, including Kit sensors: Analog Proto board connector (s), pressure sensor, hand dynamometer, hand grip monitor heart rate, EKG sensors, Surface temperature probe, among others.

    I can't seem to get all the sensor data to my PC that I use, I'm not too familiar with electrical circuits but I followed the manual directions for the specific sensor but it seems as if it doesn't have a difference. I'm with copper son crochet and so that they know the places appropriate (according to the manual) but nothing.

    Am I missing something? I have also the is open regardless of the specific LABview laboratory (Surface Temp lab for example), but when I press run it is as the sensors are not recognized or even be recognized. The sensors are plugged into the connectors on the analog Proto Board also. What I am doing wrong, and how can I get these sensors to work?

    Any help will be greatly appreciated.

    From what I see, it looks like a typing mistake in the manual.

    Try to connect GND AI0 - and NOT ALWAYS.

    It should look like this.

    Connect the following pins for wire connector:

    1. AI0 + SIG1 analog connector Proto Board

    2. + 5V power supply DC to 5V analog Proto card connector

    3. Power supply to the GROUND to GND of the analog Proto board connector

    4. AI0 - GND of the analog connector Proto Board

  • SQL server installation is either corrupt or has been tampered with. Please uninstall and run again together at the top.

    How can I fix this error? Thank you.
    SQL server installation is either corrupt or has been tampered with. Please uninstall and run again together at the top.

    Hi DMarie125,

    The question you have posted is better suited to the MSDN forums. You can ask your question in the help link.

    http://social.msdn.Microsoft.com/forums/en/category/SQLServer/

    Hope the helps of information.

  • Exchanging made them with 6248

    Hello

    We have old fabric interconnects and now I want to share with the new 6248 and also I want to exchange the Modules e/s. But all this without downtime of servers. So, what should I do that it will work? Is this possible without interruption of service?

    Is it possible to exchange the secondary FI first, then work with different types and firmware until I have one primary Exchange?

    How can I upgrade the UCS on the new and secondary FI Manager?

    Thanks in advance,

    Adrian

    Adrian,

    The following should help you with most of the details:

    http://www.Cisco.com/en/us/docs/unified_computing/UCS/SW/upgrading/From1.4/TO2.0/b_UpgradingCiscoUCSFrom1.4To2.0_chapter_0101.PDF

    Thank you!

    . / Afonso

  • Smartphones blackBerry I want to swith the HFP amps or similar to work with integrated car kit, how can I do?

    Hi, my car, Skoda Superb II, has a premuim car kit built in but the phone goes into amps mode and I'm unable to transfer a call to or from the handset to the car or the car for the handset.

    This works OK otherwise in the car OK but if I'm already on the phone when I'm in the car, I want the call to be transferred to the car kit, and even when I need to leave the car, if I'm on the phone, I need the call automatically transfer to the handset. What I currently have to do is to hang up the call when you leave the car and call the person. On getting into the car I hang up the call, start the car and let the bluetooth connect and then will remind the person.

    It of all very allien and looks like a proffesional and if I explain to the person on the phone, they assume I drive a smaller car which I am not.

    I know there is a way to do it because I had the same problem with a curve 8520.

    I experimented and found that I can configure the phone mode directory access PCS which will be if I'm on a call at the start of the car, automatically transfer to the hands-free kit. Once the call has been canceled it resets in amps mode and then I'm back to square one.

    Anyone know how to make this work?

    Kind regards

    Graham

    OK, I solved it for me after much playing with the menus and settings. Why oh why isn't their any direct support from RIM without having to buy a package of support? This is clearly a topic that should be included in the intruction manual sent with the ohones, anyway this how to in case anyone has the same problem.

    1 / make a bluetooth pairing.
    2 go to "options", press OK
    3 / come on in "Networks and connections", press OK
    4 / go to "Bluetooth connections" press OK
    5 / Select the paired device and press OK
    6 / select "Menu" press OK
    7 / select 'Options' press OK
    8 / scroll down to "Services and deselect the tick in"SIM access profile.
    9 / press return and select 'Save' press OK.

    The phone now works perfectly with my built in car kit.

    Sirely it's time phone and car manuefacturers came together to develop a system that works on all car kits.

  • 11g Exchange Connector: error with 2003 mailbox databases

    Hello
    I installed 11g Exchange Connector in OIM 11 g R2 server. I ran successfully the work of "Exchange User Mailbox Database group search reconciliation" and the recon-ed a mailbox for a specific user account (mailbox Exchange 2010) by using the "target user reconciliation resource Exchange".

    But the fun stops there, when I try to run the work of 'Target resource Exchange remove user reconciliation', I get the following error (see #1) in the result. I have no new event in Event Viewer. When I check the connector server I see a similar error (see #2). I tried to manually run the powershell command with the user of the connector server and it works correctly (see #3).

    The problem seems to be related the Exchange 2003 mailboxes, since when I try to recon a box the mailbox for a user with a mailbox of 2003, I get a similar error of "database" could not be found Here again, if I check the same user using the service account, I can get his mailbox.

    No idea what could be the problem? All debugging more I can try?

    Thank you


    H4. #1-in the result of the scheduled task:
    org.identityconnectors.framework.common.exceptions.ConnectorException: problem when executing PowerShell Org.IdentityConnectors.Framework.Common.Exceptions.ConnectorException: could not find database "ELM COUR\Premier group of mailboxes (ELM COURT) stockage\Banque. Make sure that you have typed it correctly.
    to Org.IdentityConnectors.Exchange.RunSpaceInstance.CheckErrors (IList errors)
    to Org.IdentityConnectors.Exchange.RunSpaceInstance.InvokePipeline (Controls Collection 1)
    at Org.IdentityConnectors.Exchange.RunSpaceInstance.InvokePipeline (point of order)
    Org.IdentityConnectors.Exchange.Service.Impl.PowerShellExchangeServiceImpl.InvokePipeline (command cmd)

    H4. #2-in the connector server log:
    30/05/2013 10:49:36 < INFORMATION >: class-> ExchangeConnector, the-> CreateFilterTranslator method, the Message-> method entered
    30/05/2013 10:49:36 < INFORMATION >: class-> PowerShellExchangeServiceImpl, the-> CreateFilterTranslator method, the Message-> method entered
    30/05/2013 10:49:36 < INFORMATION >: class-> ExchangeConnector,-> ExecuteQuery method, Message-> method entered
    30/05/2013 10:49:36 < INFORMATION >: class-> PowerShellExchangeServiceImpl,-> ExecuteQuery method, Message-> method entered
    30/05/2013 10:49:36 < INFORMATION >: class-> ExchangeUtility,-> GetCommand method, the Message-> method entered
    30/05/2013 10:49:36 < INFORMATION >: class-> ExchangeUtility,-> GetCommand method, the Message-> cmd poll Get-Mailbox
    30/05/2013 10:49:36 < INFORMATION >: class-> ExchangeUtility,-> GetCommand method, the Message-> output of the method
    30/05/2013 10:49:36 < INFORMATION >: class-> PowerShellExchangeServiceImpl, the-> InvokePipeline method, the Message-> method entered
    30/05/2013 10:49:36 < INFORMATION >: class-> PowerShellExchangeServiceImpl, the-> InvokePipeline method, the Message-> PowerShell command: Get-Mailbox
    30/05/2013 10:49:36 < INFORMATION >: class-> PowerShellExchangeServiceImpl, the-> InvokePipeline method, the Message-> parameter: value IgnoreDefaultScope:
    30/05/2013 10:49:36 < INFORMATION >: class-> PowerShellExchangeServiceImpl, the-> InvokePipeline method, the Message-> parameter: value ReadFromDomainController:
    30/05/2013 10:49:36 < INFORMATION >: class-> PowerShellExchangeServiceImpl, the-> InvokePipeline method, the Message-> parameter: value ResultSize: unlimited
    ConnectorServer.exe error: 0: Org.IdentityConnectors.Framework.Common.Exceptions.ConnectorException: problem when executing PowerShell Org.IdentityConnectors.Framework.Common.Exceptions.ConnectorException: could not find database "ELM COUR\Premier group of mailboxes (ELM COURT) stockage\Banque. Make sure that you have typed it correctly.

    to Org.IdentityConnectors.Exchange.RunSpaceInstance.CheckErrors (IList errors)
    to Org.IdentityConnectors.Exchange.RunSpaceInstance.InvokePipeline (Controls Collection 1)
    at Org.IdentityConnectors.Exchange.RunSpaceInstance.InvokePipeline (point of order)
    Org.IdentityConnectors.Exchange.Service.Impl.PowerShellExchangeServiceImpl.InvokePipeline (command cmd)
    Org.IdentityConnectors.Exchange.Service.Impl.PowerShellExchangeServiceImpl.InvokePipeline (command cmd)
    to Org.IdentityConnectors.Exchange.Service.Impl.PowerShellExchangeServiceImpl.SearchUser (ObjectClass oclass, query string, Manager of ResultsHandler, OperationOptions options, ObjectClassInfo ocInfo)
    to Org.IdentityConnectors.Exchange.Service.Impl.PowerShellExchangeServiceImpl.ExecuteQuery (ObjectClass oclass, query string, Manager of ResultsHandler, OperationOptions options)
    to Org.IdentityConnectors.Exchange.ExchangeConnector.ExecuteQuery (ObjectClass oclass, query string, Manager of ResultsHandler, OperationOptions options)
    to Org.IdentityConnectors.Framework.Impl.Api.Local.Operations.RawSearcherImpl'1.RawSearch (search for SearchOp 1, ObjectClass, filter oclass, Manager of ResultsHandler, OperationOptions options)
    to Org.IdentityConnectors.Framework.Impl.Api.Local.Operations.RawSearcherImpl'1.RawSearch (object search, oclass ObjectClass, filter, ResultsHandler Manager, OperationOptions options)
    to Org.IdentityConnectors.Framework.Impl.Api.Local.Operations.SearchImpl.Search (ObjectClass oclass, filter originalFilter, Manager of ResultsHandler, OperationOptions options)
    at Org.IdentityConnectors.Framework.Impl.Api.Local.Operations.ConnectorAPIOperationRunnerProxy.Invoke (object proxy, method MethodInfo, Object [] args)
    to ___proxy1. Search (ObjectClass, filter, ResultsHandler, OperationOptions)
    to Org.IdentityConnectors.Framework.Impl.Server.ConnectionProcessor.ProcessOperationRequest (OperationRequest request)

    DateTime = 2013-05-30 T 14: 49:37.1880494Z

    H4. #3-Powershell using the service account
    Get a 2003 database
    [PS] C:\Windows\System32 > Get-MailboxDatabase "ELM COUR\Premier group of mailboxes (ELM COURT) stockage\Banque.

    Name server recovery ReplicationType

    Store to the letter... Fake of the ELM COURT no


    Get a 2003 mailbox
    [PS] C:\Windows\System32 > Get-Mailbox-filter "DisplayName - eq 'Merchant Robert 0'"

    Name Alias ServerName ProhibitSendQuota

    marchanr marchanr Elm Court unlimited

    Published by: SG on May 30, 2013 11:57

    Published by: SG on May 30, 2013 13:41

    We have solved this problem: the service account was missing certain privileges of reading on the tree of Exchange 2003. We have added the 'read' and 'show info store' privileges on the tree of Exchange 2003, restarted the server connector and now it seems to work.

  • How can I write a sql with a Union.

    How can I write a sql with a Union.


    Select emp_name, emp_no, emp_sal of the emp


    If show_Less_100000 = "Yes" then emp_sal < 100000 (all values less than 100000)

    otherwise the full list.



    Thank you
    Harsha

    Published by: taty on July 31, 2012 11:28
    SQL> variable show_Less_100000 varchar2(3)
    SQL> exec :show_Less_100000 := 'Yes';
    
    PL/SQL procedure successfully completed.
    
    SQL> select  ename,
      2          empno,
      3          sal
      4    from  emp
      5    where (
      6               :show_Less_100000 = 'Yes'
      7           and
      8               sal < 2000
      9          )
     10       or nvl(:show_Less_100000,'No') != 'Yes'
     11  /
    
    ENAME           EMPNO        SAL
    ---------- ---------- ----------
    SMITH            7369        800
    ALLEN            7499       1600
    WARD             7521       1250
    MARTIN           7654       1250
    TURNER           7844       1500
    ADAMS            7876       1100
    JAMES            7900        950
    MILLER           7934       1300
    
    8 rows selected.
    
    SQL> exec :show_Less_100000 := 'All';
    
    PL/SQL procedure successfully completed.
    
    SQL> select  ename,
      2          empno,
      3          sal
      4    from  emp
      5    where (
      6               :show_Less_100000 = 'Yes'
      7           and
      8               sal < 3000
      9          )
     10       or nvl(:show_Less_100000,'No') != 'Yes'
     11  /
    
    ENAME           EMPNO        SAL
    ---------- ---------- ----------
    SMITH            7369        800
    ALLEN            7499       1600
    WARD             7521       1250
    JONES            7566       2975
    MARTIN           7654       1250
    BLAKE            7698       2850
    CLARK            7782       2450
    SCOTT            7788       3000
    KING             7839       5000
    TURNER           7844       1500
    ADAMS            7876       1100
    
    ENAME           EMPNO        SAL
    ---------- ---------- ----------
    JAMES            7900        950
    FORD             7902       3000
    MILLER           7934       1300
    
    14 rows selected.
    
    SQL> 
    

    SY.

  • How to use Bulk collect in dynamic SQL with the example below:

    My Question is

    Using of dynamic SQL with collection in bulkif we pass the name of the table as "to the parameter' function, I want to display those

    An array of column names without vowels (replace the vowels by spaces or remove vowels and display).

    Please explain for example.

    Thank you!!

    It's just a predefined type

    SQL> desc sys.OdciVarchar2List
     sys.OdciVarchar2List VARRAY(32767) OF VARCHAR2(4000)
    

    You can just as easily declare your own collection type (and you are probably better served declaring your own type of readability if nothing else)

    SQL> ed
    Wrote file afiedt.buf
    
      1  CREATE OR REPLACE
      2     PROCEDURE TBL_COLS_NO_VOWELS(
      3                                  p_owner VARCHAR2,
      4                                  p_tbl   VARCHAR2
      5                                 )
      6  IS
      7     TYPE vc2_tbl IS TABLE OF varchar2(4000);
      8     v_col_list vc2_tbl ;
      9  BEGIN
     10      EXECUTE IMMEDIATE 'SELECT COLUMN_NAME FROM DBA_TAB_COLUMNS WHERE OWNER = :1 AND TABLE_NAME = :2 ORDER BY COLUMN_ID'
     11         BULK COLLECT
     12         INTO v_col_list
     13        USING p_owner,
     14              p_tbl;
     15      FOR v_i IN 1..v_col_list.COUNT LOOP
     16        DBMS_OUTPUT.PUT_LINE(TRANSLATE(v_col_list(v_i),'1AEIOU','1'));
     17      END LOOP;
     18*  END;
    SQL> /
    
    Procedure created.
    
    SQL> exec tbl_cols_no_vowels( 'SCOTT', 'EMP' );
    MPN
    NM
    JB
    MGR
    HRDT
    SL
    CMM
    DPTN
    
    PL/SQL procedure successfully completed.
    

    Justin

  • Dynamic SQL with dynamic identifiers

    Oracle 10gXE

    I have a table that is used to track student attendance. If the student is present on a given day, a record is inserted with the student ID and the date they frequented.

    presence of DESC
    Name of Type Null
    --------------- -------- ------
    ID NOT NULL NUMBER
    NUMBER OF STUDENT_ID
    SITE_ID NUMBER
    DATE OF ATTENDANCE_DATE

    I want to view a report (in TOP) which shows all students for a given site, the days when school was in session for this month (not Saturday, Sunday) and a X for the student who participated in that day or a null value if they do not have.

    ID # FNAME LNAME 3 4 5 6 7 10
    38754636 POE JANE X X X
    81248754 DOE KAYLA X X X X X
    43127409 RAO JOHN X X X X X

    In this example, days 3 and 7 of the month are from Monday to Friday and 8-9 have been excluded because they are on Saturday and Sunday.

    I am trying to find a way to dynamically generate a query for any month/year and returning to a report. The obstacle is that given that I don't know in advance which days in a month will be excluded, the identifiers in my select statement are not fixed.

    I found a query that returns a list of day numbers and dates for a given month. It looks like this:

    SELECT LEVEL lv, TO_DATE (TO_CHAR (LEVEL, '09')
    || TO_CHAR (EXTRACT (TO_DATE('01-SEP-11') MONTHS), '09')
    || To_char (EXTRACT (TO_DATE('01-SEP-11') YEAR), ' 9999'), 'dd.mm.yyyy') mon_day
    OF double WHERE ROWNUM < = EXTRACT (DAY OF LAST_DAY (TO_DATE('01-SEP-11')))
    CONNECT BY LEVEL = ROWNUM

    I combined this request with another brings my student attendance data and results that pivots in what I need. Then, I created a function that accepts the month and year as parameters and creates the combined request.

    SELECT c.ID student_id, c.last_name, c.first_name,.
    MAX (decode (mon_day, ' 01 - SEPT.-11', 'X', NULL)) '1', MAX (decode (mon_day, ' 02 - SEVEN.-11', 'X', NULL)) '2 ',.
    MAX (decode (mon_day, ' 05 - SEPT.-11', 'X', NULL)) '5', MAX (decode (mon_day, ' 06 - SEPT.-11', 'X', NULL)) "6."
    MAX (decode (mon_day, ' 07-SEP-11', 'X', NULL)) '7', MAX (decode (mon_day, ' 08 - SEPT.-11', 'X', NULL)) "8."
    MAX (decode (mon_day, ' 09 - SEPT.-11', 'X', NULL)) '9', MAX (decode (mon_day, 12-SEP-11', 'X', NULL)) "12."
    MAX (decode (mon_day, 13-SEP-11', 'X', NULL)) '13', MAX (decode (mon_day, 14-SEPT-11', 'X', NULL)) "14."
    MAX (decode (mon_day, 15-SEP-11', 'X', NULL)) '15', MAX (decode (mon_day, 16-SEP-11', 'X', NULL)) "16."
    MAX (decode (mon_day, 19-SEP-11', 'X', NULL)) '19', MAX (decode (mon_day, 20-7.-11', 'X', NULL)) "20."
    MAX (decode (mon_day, 21-SEP-11', 'X', NULL)) "21", MAX (decode (mon_day, 22-SEP-11', 'X', NULL)) '22 ',.
    MAX (decode (mon_day, 23-SEP-11', 'X', NULL)) '23', MAX (decode (mon_day, 26-SEP-11', 'X', NULL)) "26."
    MAX (decode (mon_day, 27-SEP-11', 'X', NULL)) '27', MAX (decode (mon_day, 28-SEP-11', 'X', NULL)) "28."
    MAX (decode (mon_day, 29-SEP-11', 'X', NULL)) '29', MAX (decode (mon_day, 30-SEP-11', 'X', NULL)) '30 '.
    (SELECT level lv, TO_DATE (TO_CHAR (LEVEL, '09')
    || TO_CHAR (EXTRACT (TO_DATE('01-SEP-11') MONTHS), '09')
    || To_char (EXTRACT (TO_DATE('01-SEP-11') YEAR), ' 9999'), 'dd.mm.yyyy') mon_day
    OF double WHERE ROWNUM < = EXTRACT (DAY OF LAST_DAY (TO_DATE('01-SEP-11')))
    CONNECTION LEVEL = ROWNUM) a, b of attendance, student c
    WHERE to_char(MON_DAY,'D') NOT IN (1.7)
    AND A.mon_day = b.attendance_date
    AND b.student_id = c.ID
    Group of c.ID, student_id, c.last_name, c.first_name

    Now I'm stuck on what I can pass this request in to get my result. What I've read, dynamic SQL method 4 would work if I incorporate Pro/C. I hope this isn't my only option. I have considered to try to do this in a function table in pipeline, but since the columns returned are not known in advance, I can't create a corresponding data type.

    I'm starting to wonder if I forgot a simpler method to achieve this.

    Published by: David Sumner on April 12, 2012 18:52

    Ignoring the actual query and looking at the dynamic SQL part of the question.

    There are 3 ways to run a dynamic select SQL in PL/SQL code.

    immediate execution requires a fixed number of bind variables, linking him in position and translates a single implicit output cursor extraction - requiring the projection of cursor to be known at the time of coding.

    REF CURSOR are essentially the same - the only exception being that it requires an extraction explicit coding process output cursor.

    DBMS_SQL differs in all of these respects. The connection is by name and not position. The connection is dynamic. Projection of the cursor must not be known at the time of coding. It is dynamically determined at runtime and fetch offers of release of the cursor with the projection of unknown SQL - coding time.

    Apex uses DBMS_SQL internally (in fact he uses DBMS_SYS_SQL properly run dynamic and specific patterns of Oracle SQL, as if a session connected as a scheme runs the SQL code). This allows the Apex to take a dynamic SQL that you enter a region (which can contain a variable number of bind variable), run it and make the projection of the cursor as an HTML report.

    Apex supports in turn also dynamic SQL - what you (Apex developer) to provide a dynamic SQL code for a region, instead of you having to provide SQL fixed (with bind variable) for the region in question.

    As Apex creates DBMS_SQL sliders, it doesn't have your SQL as a ref cursor or cursor DBMS_SQL. All they need is the source of the SQL statement. And that's what you create dynamically.

    So in the Apex, dynamic SQL means using a function from PL/SQL to return the source for Apex SQL analyze like a slider DBMS_SQL - instead of coding the source SQL statement in a fixed statement.

    So, using the option of function for an area considered in the Apex, allows you to provide the following in the code that must run to get the SQL statement for the report Apex (Apex running this as a dynamic function that returns a string):

    --// return the dynamic SQL for the report region
    return(
      case
        when :P1_OPTION = 1 then
          'select * from emp'
    
        when :P1_OPTION = 2 then
          'select * from dept where dept_id = :P1_DEPT_ID'
      end
    );
    

    You can also write a PL/SQL function that is stored in the database and call this function so that it can determine what is the dynamic SQL source code statement. For example

    --// calling database function to return the dynamic SQL for the report region
    return(
      GetDynamicReportSQL( page => 1, option => :P1_OPTION )
    );
    

    Dynamic SQL is fully supported by Apex - but does not require that you, the developer, to create the dynamic cursor and treat the dynamic linking and dynamic recovery of this slider.

    All you have to do is to provide the source code of this dynamic SQL (including the bind variable) to the Apex and it will do the whole thing from cursor for you.

  • call a script sql with one parameter of another

    I would like to call a sql script that takes a single parameter (& 1)... but it doesn't.
    It looks like (first.sql):
    begin
    for cv in (select table_name from all_tables where owner='IBIS') loop
            @my_script.sql cv.table_name;
    end loop;
    end;
    but when I run it, I got an error:
    @first.sql;
    old   9: spool &1..cob replace
    new   9: spool cv.table_name.cob replace
    old  10: select '       05 DBUFF-' || '&1' || '-1.' from dual;
    new  10: select '       05 DBUFF-' || 'cv.table_name' || '-1.' from dual;
    old  12: from all_tab_cols where table_name='&1' and substr(column_name,1,3)<>'SYS';
    new  12: from all_tab_cols where table_name='cv.table_name' and substr(column_name,1,3)<>'SYS';
    old  13: select '          05 ' || '&1' || '-ROWID          PIC X(18).' from dual;
    new  13: select '          05 ' || 'cv.table_name' || '-ROWID          PIC X(18).' from dual;
    What is missing?

    Kind regards...

    Hello

    The trick is to generate a sql script with all your calls to internal scripts and their parameters.

    For example, my script is internal countTableIndex.sql :

    select 'Table &1 has got '||count(*)||' indexes.' from user_indexes where table_name='&1';
    

    And here's my script outside coutnIndex.sql :

    set serverout on pages 0 lines 100 feed off time off verify off define on tab off trimspool on trimout on termout on termout off
    spool cmd.sql
    begin
    for cur in (select table_name tab from user_tables) loop
         dbms_output.put_line('@countTableIndexes.sql '||cur.tab);
         null;
    end loop;
    end;
    /
    spool off
    set termout on
    @cmd.sql
    exit;
    

    As you can see, it generates a file cmd.sql containing internal script calls and ultimately calls the script cmd.sql.
    In my example schema scott after the execution, the cmd.sql file contains:

    @countTableIndexes.sql DEPT
    @countTableIndexes.sql EMP
    @countTableIndexes.sql BONUS
    @countTableIndexes.sql SALGRADE
    @countTableIndexes.sql TOTO
    

    Here is the result of my machine:

    [oracle@Nicosa-oel test19_parameterizedSqlScripts]$ sqlplus -s scott/tiger@my11g @countIndex.sql
    Table DEPT has got 1 indexes.
    Table EMP has got 1 indexes.
    Table BONUS has got 0 indexes.
    Table SALGRADE has got 0 indexes.
    Table TOTO has got 0 indexes.
    
  • Optimize SQL with case-when-other

    Hello

    try to categorize DateValue into 3 groups
    1. effective: current month
    2. for a YEAR: between January and last month of the current year
    3. for a YEAR: between January and last month of the last year

    I have a feeling that my SQL could be much shorter and faster. I would be grateful for professional advice...

    -case when TO_NUMBER ((TO_CHAR (DOCUMENT_TIMESTAMP, 'YYYY') |)) To_char (DOCUMENT_TIMESTAMP, 'MM'))) = TO_NUMBER (TO_CHAR (sysdate, 'YYYY') |) To_char (sysdate, 'MM'))
    can 'real '.
    -FOR A YEAR
    When TO_NUMBER ((TO_CHAR (DOCUMENT_TIMESTAMP, 'YYYY') |)) To_char (DOCUMENT_TIMESTAMP, 'MM'))) between TO_NUMBER (TO_CHAR (sysdate, 'YYYY') |) (' 01') and TO_NUMBER (TO_CHAR (sysdate, 'YYYY') |) To_char (sysdate, 'MM'))-1
    then "CDA".
    -PYTD
    When TO_NUMBER ((TO_CHAR (DOCUMENT_TIMESTAMP, 'YYYY') |)) To_char (DOCUMENT_TIMESTAMP, 'MM'))) between TO_NUMBER (TO_CHAR(sysdate, 'YYYY')-1). ' 01' and TO_NUMBER (TO_CHAR(sysdate, 'YYYY')-1 |) To_char (sysdate, 'MM'))-1
    then "PYTD".
    else "Others" end up as ABC

    Hello

    I find trunc to be more readable:

    SQL> WITH DATA AS (
      2     SELECT SYSDATE d FROM dual UNION ALL
      3     SELECT add_months(SYSDATE, -12) FROM dual UNION ALL
      4     SELECT DATE '2009-01-01' FROM dual
      5  )
      6  SELECT to_char(d, 'dd-mon-yyyy') "Date",
      7         CASE
      8            WHEN trunc(d, 'month') = trunc(SYSDATE, 'month') THEN
      9             'Actual'
     10            WHEN trunc(d, 'year') = trunc(SYSDATE, 'year') AND d < sysdate THEN
     11             'YTD'
     12            WHEN trunc(d, 'year') = add_months(trunc(SYSDATE, 'year'), -12) THEN
     13             'PYTD'
     14         END "Case"
     15    FROM DATA
     16  ;
    
    Date              Case
    ----------------- ------
    10-jun-2009       Actual
    10-jun-2008       PYTD
    01-jan-2009       YTD
    

    Kind regards

    --
    Vincent

    Published by: user11163377 on June 10, 2009 02:12 - corrected the CDA column

  • Print SQL with SQL output statements

    I am a student in learning SQL for Oracle 10 g.
    Our missions are typically a set of problems that have an SQL statement as the solution.
    We pass in the SQL statement and SQL output generated by the statement.
    I use SQL Developer to create my scripts, print my files, etc. Very convenient.
    I want to be able to do is to somehow combine the two impressions that I always generate.
    So I would like to have a report which has my SQL statement (Select * From Customers ;) and)
    the output of SQL that has generated this statement.
    Anyway is to do it with SQL Developer? Or maybe in another tool?

    Thanks for any help!

    Just this question before your scripts:

    set echo on

    Have fun
    K.

  • Dynamic SQL with a Ref Cursor

    Hello

    I have a package that returns a Ref Cursor, in this procedure, I have a dynamic sql code that is built according to certain values, and the query is a select query, is it possible that I can put that dynamic sql in the ref cursor and return of the procedure.

    Or y at - it no alternative better workaround.

    Thanks in advance.

    Naveen

    Yes you can.

    Try this...

    create or replace package test_pack is
    type ref_cur is ref cursor;
    procedure just_print(ref_var ref_cur);
    end;
    /
    
    create or replace package body test_pack is
    procedure just_print(ref_var ref_cur) is
    l_var emp%rowtype;
    begin
    loop
    fetch ref_var into l_var;
    exit when ref_var%notfound;
    dbms_output.put_line(l_var.ename);
    end loop;
    end;
    end;
    /
    
    declare
    cur_var test_pack.ref_cur;
    dsql varchar2(100);
    begin
    dsql := 'select * from emp where deptno=10';
    open cur_var for dsql;
    test_pack.just_print(cur_var);
    end;
    /
    CLARK
    KING
    MILLER
    
    PL/SQL procedure successfully completed.
    
    Elapsed: 00:00:00.00
    

    Kind regards
    Prazy

Maybe you are looking for

  • Touchpad lost after the signature of user account on Satellite L70

    I lose the touchpad cursor after signing my user account, but it still works on a different user account and before you enter the PIN code of my account. How to re - activate it on my account? Obviously, I can't do much without the Tablet! I suspect

  • Lynx: the display of the hours of battery left?

    guys, I just bought this Lynx tab and still wonder how to show hours of battery left on the battery as usual icon? Currently, my Lynx only display the percentage of left. and is there a way I can change the battery management profile, I only have the

  • Web-camera on Satellite A300 problem - 10 c

    Hello!!! I have a laptop Toshiba Satellite A300 - 10 c. Problem with the webcam! OS WINDOWS 7 ULTIMATE X 64Everything downloaded from the firewood with an official site! and when I turn on the room gives me: * the webcam is unplugged or defective. Ch

  • new installation of win XP does not updated

    Hello I have 2 units of office with a new installation of windows XP Pro top, but when I try to run updates it comes up with code 0x8024D001 error and says "the site has encountered a problem and cannot display the page you are trying to view. I have

  • HP LaserJet P3015dn: Cannot print in Arabic

    I'm unable to print Arabic on the IBM AIX printer. Any suggestion please?