Information on how to execute SQL on the CUCM himself queries please

Hello all,.

I need to run a SQL on the CUCM enumerate all directory numbers, their score and their external mask values.

I came across this snippet below earlier so I have a bit of an idea of how do but iw would be great to see some other examples of sql queries.

Any help is most appreciated.

Also, is there a document somewhere to tell me how to run these queries?

Thanks in advance

Concerning

Amanda

*******************************************************************************************************************************************************************************

Helps you try if this the CLI SQL query execution, it must list all DN with CFA allowed the VM or a DN:

run sql select dnorpattern, cfadestination, cfavoicemailenabled CallForwardDynamic c, numplan n where c.fknumplan = n.pkid and (cfadestination! = "or cfavoicemailenabled 't =')

Hi Amanda

Basically, this is standard SQL, so that he would not bad at google 'informix instructions' select and do a bit of reading to get the basics. There are millions of permutations of requests so it comes to understand the syntax and then only by applying to the database in question. The only difference when running the commands in the CLI are:

-Precede you the standard informix with "execute sql" SQL statement

-You get no help from CUCM with syntax, so you might be well advised to use something which includes SQL a bit and he colorized you type, and then paste the commands resulting in the CUCM SSH window. I use an editor called JEdit, if you create a text file and save it as a file ending with .sql, it will highlight your syntax.

-Other programs are available that make reasonable syntactic (EQ SquirrelSQL) that are designed to query the DB directly, but you can't really query directly against the DB for security reasons. You will still need to copy and paste commands.

Now... to understand the DB you will need a reference describing all the tables, etc.. Here it is:

http://www.Cisco.com/en/us/products/SW/voicesw/ps556/products_programming_reference_guides_list.html

Choose your version of CUCM and download the document 'data definition '.

Some notes on the order:

run sql: is just the CLI command which tells the shell to perform the following as SQL.

Select: the SQL command to recover data

dnorpattern, cfadestination, cfavoicemailenabled: column names to retrieve

callforwarddynamic c, numplan n: the names of the two tables and abbreviations that you want to refer to them as

where c.fknumplan = n.pkid: This tells SQL to return values in the two tables where these fields match. In the data definition, you will see notes that c.fknumplan (i.e. the column fknumplan in table callforwarddynamic, as indicated by the prefix c.) refers to the PKID column in the area of the numplan. It is a type of join in the very standard DB CCM.

and ("cfadestination! =" or cfavoicemailenabled = "t"): another clause, fundamentally in this application that we want to see only the rows where cfadestination is not empty or cfavoicefmailenabled has the value 't' for real).

Most of the tables are related in two ways in this database:

-a column "fk" prefix refers to the field of pkid (there is always only one field per table pkid) in the table following the prefix "fk". For example above fknumplan refers to the numplan, pkid field table. fkdevice refers to the machine table, pkid field.

-a prefiex of 'traditional knowledge' column usually refers to a table enum which is preceded by 'type '. It is a table that maps the numerical value in the field of 'traditional knowledge' into a string. An example would be tkmodel - it is the type of physical phone (e.g. as 7962) and mapped as the column and a table called typemodel model 'enum' in the table.

Concerning

Aaron Harrison

Senior Engineer at Logicalis UK

Please note the useful messages...

Tags: Cisco Support

Similar Questions

  • OSB: fn - bea: execute - sql () with the sql statement ' INSERT INTO...» »

    Dear Experts,

    I need a clarification. Is it possible to use the fn - bea: function execute sql (Oracle Service Bus) to perform an insert operation in a database with the data extracted from the message of the Organization (i.e. $body/Info/username)? If it is possible which is the right syntax?
    Any suggestion is appreciated.

    Kind regards
    Mike

    Published by: ITDeveloper on November 19, 2009 2.55

    Published by: ITDeveloper on November 19, 2009 3.01

    Hi Mike,.

    Please refer to my post for the same question to the fn - bea: sql performance with 'Insert INTO' the sql statement

    Thank you best regards &,.

    Vivek

  • How to call SQL in the filter condition

    Hello

    Booking dashboard report, I need filter order_date between this quarter beginning date and this date of end of quarter.
    I customized data are available from quarter to quarter end date.
    How do I use the filter.

    Thank you

    Looks like you need filter the date of the order between the start of quarter and the ending quarter by ensuring that order dates is always present between the quarter start date and the date of end of quarter

    Create a report of sub with a column of order date and order date is invited.

    So now, in the report main use filter option advanced and

    Take the quarter start date column and use the advanced on this filter option. Use the results to filter based on another request. You can specify the quarter start date is greater than the date of the selected order (order reporting date column)

    and

    Take the quarter end date column and use the advanced on this filter option. Use the results to filter based on another request. You can specify the quarter end date is less than the date of the selected order (order reporting date column)

    In this way, you can force the order date always between the date of beginning of quarter and quarter end date columns

    It may be useful
    Thank you
    Prash

  • I can't reach all the hotmail - no page is before the current and most recent page. This has changed recently. How can I retrieve all the old emails? Please respond to Email removed for privacy. Thank you

    Hotmail pages can be put forward - only the current page is visible.  Changes have been made recently?  If Yes, please indicate how to move pages.

    Please send all Live and Hotmail queries on the forum right here:

    Windows Live Solution Center
    http://windowslivehelp.com/

  • How to draw karger mask the area of visualization, please?

    Hello

    I can't draw a mask rectabgle larger than the display area composition because it does not scroll whe I get to the edge.  It should scroll.

    How can I select a larger area?  I'm trying to resize by dragging the corber but it do not drag evenly.

    Thank you

    I'm trying to resize by dragging the corber but it do not drag evenly.

    Press and hold the (centered) and Ctrl (proportional) after that you have double-cliccked the mask to call the transform bounding box. The rest is not really clear, but as suggested, simply zoom out. The masks are relative to a layer, so they are not related at all sizes fixed, not the layer or the model

    Mylenium

  • Could someone tell me how I can I spend the sql_id/plan_hash_value and corresponding implementation plans?

    Hi experts,

    I want to know, how to get the past (like a week older) sql_id/plan_jash_values and corresponding implementation plans.

    I am aware that v$ session contains these last sql_id/hash_value, distinguished by a sql statement that is executed and we can get the plan_hash_value from v$ sql using the following query.

    Select sql_id, hash_value, plan_hash_value from v$ sql where sql_id = & sql_id;

    Once you leave this session, session $ v clears the session information, subsequently sql_id will be also deleted.

    I want to know,

    1 how long v$ sql holds the plan_hash_value, is there a retention period?

    2. when we issue ' select * table ((dbms_xplan.display_cursor ('& sql_id')) ", when the execution plan is read since?").

    3. I need to compare the implementation plans for a perticular query last week one, what are my options?

    Please help me with my questions, experts.

    Kind regards

    Ravi K

    Yes, the AWR repository is accessible by SQL queries on the DBA_HIST views.  (these are the same!)

    Thus, the AWR retention period applies to data in views DBA_HIST.

    A SQL query that is not reported by a snapshot of the CWA would not be in the views DBA_HIST.

    Hemant K Collette

  • How to run script on the web using HTTP web page?

    Hi guys

    Please let me know how to execute script on the web using HTTP web page?

    Concerning
    Frank

    Hi Jos,

    ODI provides web-based UI to run scenarios using metadata (read only your components ODI) Navigator and designer Lighweight (you can change the mapping here).

    If please review how to install the metadata browser in ODI and take a look at the document ODI Setup for more information.

    Thank you
    Guru

  • How do I get all the SQL executed by my session?

    How do I get all the SQL executed by my session?

    Published by: user11300376 on 01/28/2013 11:27

    user11300376 wrote:
    I had tried, brings itself however only select table v $ session.

    Executed orders:

    SELECT * FROM MBS_ITEM;

    SELECT b.sql_id, b.sql_text
    SESSION $ v a, v$ sql b
    WHERE a.sql_id = b.sql_id;

    The output result:

    SQL_ID SQL_TEXT
    1 4qg3bft0w37rt SELECT b.sql_id, b.sql_text FROM session $ v a, v$ sql b WHERE a.sql_id = b.sql_

    The listed application is good, but does not limit the output of your session - it should return data from all sessions.

    You must add an AND condition in the WHERE clause to limit your session. You can try this (untested)

     where audsid=(select userenv('sessionid') from dual);
    

    You can also perform a SQL trace and tkprof to obtain data to SQL executed the trace start and end of the trace.

  • How to execute the sql statement in the file beats?

    I want to execute after the statement
    C:\ > sqlplus/nolog
    SQL > conn scott/tiger
    SQL > select * from tab;

    I know I can achieve it following test.bat and testdb.sql file
    test.bat is:
    sqlplus/nolog @testdb.sql

    TestDB.SQL is:
    Conn scott/tiger
    Select * from tab;

    Now I don't want to use the sql file, I want only use bat file, as follows:
    test.bat is:
    sqlplus/nolog
    Conn scott/tiger
    Select * from tab;

    When I run test.bat, I find only one sqlplus /nolog execute statement, do not execute other statements.
    (1) I want to know if there is a method to run the SQL file by fighting without a sql file? How to make it happen?
    (2) if I call the sql file, how to hide the password of user? Because I don't want other people to know scott password, if I use conn scott/tiger in testdb.sql, other person can see testdb.sql and the password. Is there a good way to avoid?

    Thank you!

    It works a bit different in Windows. Create a file is like this:

    (
      echo conn scott/tiger@orcl
      echo spool c:\temp\list.txt
      echo select sysdate from dual;
      echo spool off
      echo exit
    ) | sqlplus -s -l /nolog
    
  • How to execute the pl/sql block from a file

    Hi all
    can someone tell me how to execute a pl/sql block to a file.it does contain no procedures.it is of the form
    -Start
    -says
    -end;

    Thanx

    Ok.. If the time points? :)

    See you soon!
    Bobin

  • How to load data from ms sql to the by the file rules and maxl essbase

    Hi, everybody!
    Pretty Shure the kind of topic exists already on the forum, but unfortunately can't find it.

    I want to understand, how to load data from the database to ms sql for the PB of essbase application.

    (I) so I have:
    1. a request for 'society '.
    2 and its database 'Plan '.
    3. with simple outline, which contains only two dimensions:

    -The time period < 1 > (Label only)
    -Total year (~)
    -Qtr1 (+)
    Jan (+)
    Feb (+)
    Mar (+)
    -Qtr2 (+)
    APR (+)
    May (+)
    Jun (+)

    -Accounts < 1 > (Label only)
    -Lost / based (~) (Label only)
    -Revenues (+)
    L1.1 (+)
    L1.2 (+)
    -Costs (-)
    L2.1 (+)
    L2.2 (+)

    (II) also, I created a rules file called "CO_DWH" and associated with this schema
    It (Rules file) a 3 columns:
    Data of the 'period', 'account '.

    There is also the option checked "load data".

    (III) in MS SQL Server, I have a database of "hypdb" and "essadmin" with "password" login

    (IV) I executed my bat file:
    C:\Hyperion\EssLoad.bat
    There is only one line:

    EssLoad.bat-
    startMaxl.cmd EssLoad.txt
    ----------------------------------------------

    EssLoad.txt-
    login password admin on erpserver;
    Import database data Company.Plan connect in essadmin password using the server rules_file 'CO_DWH' error abort;
    disconnection;
    "exit";
    --------------------------------------------


    All plans that I copied well worked ERP system, but I don't understand, this is exactly table in the MS SQL database, data loading to essbase db?

    TOU have to do a few things
    1. on the server of Essbase, put in place a system odbc for your MySQL database connection
    2. in the State of charge, go to the file menu and select open source SQL database and in the source of data in your SQL statement. A few tips. Where it says select, don't put in the select Word and when he says to not put in of. The system adds for you. TI enter a simple SQL statement is to do this in the box so select if your SQL would be normanlly as select * from myTable just enter the code as * from myTable in the upscale neighborhood

    The ol/recover the click and fill your connection information. Should bring back the data in the State of charge. Save the State of charge and use

  • How to execute a stored procedure on Sybase with SQL Developer

    We have accessed Sybase 15 with SQL developer.

    We can see the data in the table, if we do not, run the stored procedure (for instance sp_who) developed on Sybase.

    Could you tell me how we execute the stored procedure on Sybase with SQL Developer Sybase?

    Thank you

    Shige

    We will not intended to be a Sybase ASE customer.

    But

    A SQL Developer... @dermotoneill: Workheet advice

  • How can I get all the ID of SQL the same SQL literals change?

    My SQL statement is the same throughout, but only changing the literals, and therefore the SQL ID, i.e. SQL ID change also. How can I get all the SQL ID this SQL?

    Hello

    the FORCE_MATCHING_SIGNATURE column is also entered in the ASH / historical AWR views V$ ACTIVE_SESSION_HISTORY / DBA_HIST_ACTIVE_SESS_HISTORY / DBA_HIST_SQLSTAT.

    .. and after all, you can join these views as described with DBA_HIST_SQLTEXT, if necessary.

    DBA_HIST_SQLTEXT displays the text of SQL statements belonging to shared SQL cursors captured in the repository of the workload. This perspective captures information from V$ SQL and is used with the DBA_HIST_SQLSTAT view.

    Concerning

    Stefan

    P.S.: AWR is only based on the captured of course SQLs.

  • In the upgrade to 31.1.1, I lost all my calendar information. How can I restore it?

    In the upgrade to 31.1.1, I lost all my calendar information. How can I restore it?
    Thank you.

    Click on this little thing of three bars of application menu and select Add-ons.

    If the lightning is not sitting, it asking you to restart to complete t6he installation type the name in the search box on the right and press ENTER.

    You don't have to worry about it that which opens from there, just click on the button install.

  • When you configure synchronization how sync manages information on two computers? It merges the information?

    When you configure synchronization how sync manages information on two computers? It merges the information?

    Hello!

    Yes, how Sync is that it brings together all the bookmarks and pushes them to all your devices. Same thing with the story.

    You will lose all the information in one of your computers.

Maybe you are looking for

  • upgrade processor for cq-60 212em

    Hello I have a compaq cq - 60 212em who has a plug winstron 303 a motherboard. I want to know if I can replace the processor. unique heart of an amd sempron si42 on a s1g2 socket (638)for a dual core with the same socket If yes what can I use? Ive a

  • How do I know which Service Pack is on my computer?

    I worked on my 3D program: Autodesk Maya & recently, he ceased to be able to make. After checking around a bit on the internet, one of the answers was to check my security settings. I contacted tech support for my security on the computer & they sent

  • Error 80070643 Windows Update the 13 April 2010. Seems to be the update to the office only.

    The Windows update 04/13/2010, problems since then it never ends the Office updates. Download KBN 981715/981433/980470,980729 start install and error 80070643. Whenever I start a component Office, then it goes to the Windows Installer box takes 15-30

  • Cisco 3845 of storm-control

    Hello First of all, sorry for my English. I was attacked in one of my public ip address. I was wondering how to solve this problem, I found when I was attacked, and numer of pps in my interface goes up to 800 kpps. I was looking for an I found the fu

  • Build Oracle NoSQL C API errors

    HelloI'm currently building the NoSQL Database C customer pilot available Oracle from: Oracle database NoSQL downloadskV - c - 2.1.57.tarI get the following error when I try to run cmake:-Identifying C compiler is GNU-Identification of CXX compiler i