Monday 28 May 2012

How to capture bitmaps in Selenium? | Selenium

Bitmaps are captured using the Selenium set of commands. There are two modes of capturing the bitmaps
1) Capture the bitmap for the entire page - it captures the browser main page area of AUT
2) Capture the bitmap for the screen shots - it captures the entire screen shot like the print scree that you give from your keyboard
Selenium doesn't support bitmap capturing for an element on AUT.

When to use Accessors in Selenium? | Selenium

Accessors are mostly used for storing the value in a variable.
The variable can be used for following reasons:
1) To get the value from an element and comparing with some dynamic value
2) To take a logical decision to execute the test steps
ex: if the value of the variable true execute step1 and step2 else step3 and step4
3) To execute some statements in a loop based on the value returned by the element.

When to use Assert, Verify and WaitFor in Selenium? | Selenium

1) assert - If the expected value is mandatory to continue with the next set of steps we will use Assert. As Assert aborts the test, if the expected value doesn't match. It is good to use for any mandatory checks.
2) verify - If the expected value is optional to continue with the next set of steps we will use Verify. As Verify continues executing with the next set of steps, if the expected value doesn't match. It is good to use for any optional checks.
3) waitFor - If your test needs to wait, if the expected value is not matching we use waitFor. We normally use waitFor for AJAX kind of controls loading within a page.

What are the types of Assertions there in Selenium? | Selenium

Selenium Assertions can be used in 3 modes:
1) assert - When an “assert” fails, the test will be aborted. If you are executing test suite, the next state case will start
2) verify - When a “verify” fails, the test will continue execution, logging the failure.
3) waitFor - “waitFor” commands wait for some condition to become true (which can be useful for testing Ajax applications). They will succeed immediately if the condition is already true. However, they will fail and halt the test if the condition does not become true within the current timeout setting.

What is Assertion in Selenium? | Selenium

Assertion is nothing but a check or verification point.
Assertion verifies the state of the application conforms to what is expected.
Examples include “make sure the page title is X” and “verify that this checkbox is checked.

What is Selenese? | Selenium

Selenium set of commands which are used for running the test are called as Selenese.
There are three types of Selenese, those are:
1. Actions - used for performing the operations and interactions with the target elements
2. Assertions - used as check points
3. Accessors - used for storing the values in a variable.

How to use regular expressions in Selenium? | Selenium

Regular expressions in Selenium IDE can be used with the keyword - regexp: as a prefix to the value and patterns needs to be included for the expected values.
For example if you want to use the regular expression for a command
Command: verifyText
Target: //font/font/b/font[1]
Value: Flight Confirmation # 2011-05-02451
in the above example Flight Confirmation is continuously changing each time you run the test case. So this can be written with a regular expression as mentioned below
Command: verifyText
Target: //font/font/b/font[1]
Value: regexp:Flight Confirmation # [0-9]{4}-[0-9]{2}-[0-9]{5,10}.

What are the types of text patterns available in Selenium? | Selenium

There are three types of patterns available in Selenium:
1. globbing
2. regular expressions
3. exact.

Does Selenium support Google Android Operating System? | Selenium

Yes, Selenium Web Driver or Google Web Driver or Selenium 2.0 supports Android Operating System. There are several libraries written to support Android Operating System.

Does Selenium support mobile internet testing? | Selenium

Selenium supports Opera. And opera is used in most of the Smart phones. So whichever Smart phone supports opera, selenium can be used to test. So, one can use Selenium RC to run the tests on mobiles.

What is the architecture of Selenium Grid? | Selenium

The below mentioned theory explains about the setup of Selenium Grid with architecture and how it works.
Selenium Grid builds on the traditional Selenium setup, taking advantage of the following properties:
* The Selenium test, the application under test, and the remote control/browser pair do not have to be co-located. They communicate through HTTP, so they can all live on different machines.
* The Selenium tests and the web application under test are obviously specific to a particular project. Nevertheless, neither the Selenium remote control nor the browser is tied to a specific application. As a matter of fact, they provide a capacity that can easily be shared by multiple applications and multiple projects.
Consequently, if only we could build a distributed grid of Selenium Remote Controls, we could easily share it across builds, applications, projects - even potentially across organizations. Of course we would also need to address the scalability issues as described earlier when covering the traditional Selenium setup. This is why we need a component in charge of:
* Allocating a Selenium Remote Control to a specific test (transparently)
* Limiting the number of concurrent test runs on each Remote Control
* Shielding the tests from the actual grid infrastructure
Selenium Grid calls this component the Selenium Hub.
* The Hub exposes an external interface that is exactly the same as the one of a traditional Remote Control. This means that a test suite can transparently target a regular Remote Control or a Selenium Hub with no code change. It just needs to target a different IP address. This is important as it shields the tests from the grid infrastructure (which you can scale transparently). This also makes the developer’s life easier. The same test can be run locally on a developer machine, or run on a heavy duty distributed grid as part of a build – without ever changing a line of code.
* The Hub allocates Selenium Remote Controls to each test. The Hub is also in charge of routing the Selenese requests from the tests to the appropriate Remote Control as well as keeping track of testing sessions.
* When a new test starts, the Hub puts its first request on hold if there is no available Remote Control in the grid providing the appropriate capabilities. As soon as a suitable Remote Control becomes available, the Hub will serve the request. For the whole time, the tests do not have to be aware of what is happening within the grid; it is just waiting for an HTTP response to come back.

What is the architecture of Selenium RC? | Selenium

The Selenium Server which launches and kills browsers, and acts as an HTTP proxy for browser requests.
Client libraries for various programming languages, each of which instructs the Selenium Server in how to test the AUT by passing it your test script’s Selenium commands.
The diagram shows the client libraries communicate with the Server passing each Selenium command for execution. Then the server passes the Selenium command to the browser using Selenium-Core JavaScript commands. The browser, using its JavaScript interpreter, executes the Selenium command, which effectively, runs the check you specified in your Selenese test script.

What are the capabilities of Selenium WebDriver or Google WebDriver or Selenium 2.0? | Selenium

One should use WebDriver when requiring improved support for
• Mult-browser testing including improved functionality for browsers not well-supported by Selenium-1.0.
• Handling multiple frames, multiple browser windows, popups, and alerts.
• Page navigation.
• Drag-and-drop.
• AJAX-based UI elements.

What is Selenium WebDriver or Google WebDriver or Selenium 2.0? | Selenium

WebDriver uses a different underlying framework from Selenium’s javascript Selenium-Core. It also provides an alternative API with functionality not supported in Selenium-RC. WebDriver does not depend on a javascript core embedded within the browser, therefore it is able to avoid some long-running Selenium limitations.
WebDriver’s goal is to provide an API that establishes
• A well-designed standard programming interface for web-app testing.
• Improved consistency between browsers.
• Additional functionality addressing testing problems not well-supported in Selenium 1.0.
The Selenium developers strive to continuously improve Selenium. Integrating WebDriver is another step in that process. The developers of Selenium and of WebDriver felt they could make significant gains for the Open Source test automation community be combining forces and merging their ideas and technologies. Integrating WebDriver into Selenium is the current result of those efforts.

Which are the languages supported by Selenium RC? | Selenium

The languages supported by Selenium RC
1. .Net,
2. Java (Junt 3, Junt 4, TestNG, Groovy)
3. Perl,
4. Python,
5. PHP,
6. Ruby.

Why Selenium RC is used? | Selenium

Selenium-IDE does not directly support:
1. condition statements
2. iteration
3. logging and reporting of test results
4. error handling, particularly unexpected errors
5. database testing
6. test case grouping
7. re-execution of failed tests
8. test case dependency
9. capture screenshots on test failures
The reason behind why Selenium-IDE does not support the above mentioned requirements is IDE supports only HTML language. Using HTML language we cannot achieve the above mentioned requirements. Because HTML does not support conditional, looping and external source connectives.
To overcome the above mentioned problems Selenium RC is used.
Since Selenium RC supports the languages .Net, Java, Perl, Python, PHP, and Ruby. In these languages we can write the programme to achieve the IDE issues

What is Selenium RC? | Selenium

Selenium-RC is the solution for tests that need a little more than just simple browser actions and a linear execution. Selenium-RC leverages the full power of programming languages, creating tests that can do things like read and write external files, make queries to a database, send emails with test reports, and practically anything else a user can do with a normal application.
You will want to use Selenium-RC whenever your test requires logic not supported by running a script from Selenium-IDE

Which are the Operating Systems supported by Selenium? | Selenium

Selenium IDE
Works in Firefox 2+ Start browser, run tests Run tests
Operating Systems Supported:
1. Windows,
2. OS X
3. Linux
4. Solaris
5. Others whichever supports Firefox 2+
Selenium Remote Control
Used for starting browser and run tests
Operating Systems Supported:
1. Windows,
2. OS X
3. Linux
4. Solaris
5. Others
Selenium Core
Used for running tests
Operating Systems Supported:
1. Windows,
2. OS X
3. Linux
4. Solaris
5. Others

Which are the browsers supported by Selenium RC? | Selenium

Supported browsers for Selenium RC include:
1. *firefox
2. *mock
3. *firefoxproxy
4. *pifirefox
5. *chrome
6. *iexploreproxy
7. *iexplore
8. *firefox3
9. *safariproxy
10. *googlechrome
11. *konqueror
12. *firefox2
13. *safari
14. *piiexplore
15. *firefoxchrome
16. *opera
17. *iehta
18. *custom
Note: Any third party browser is supported with *custom followed by the complete path of the browser with executable

Which is the command used for displaying the values of a variable into the output console or log? | Selenium

The command used for displaying the values of a variable into the output console or log - echo
If you want to display a constant string. The below mentioned command can be used
echo <constant string>
ex: echo "The sample message"

If you want to display the value of a variable it can be written like below
echo ${<variable name>>
ex: echo ${var1}

Note: Here var1 is the variable.

How to export the tests from Selenium IDE to Selenium RC in different languages? | Selenium

From selenium IDE the test cases can be exported into the languages:
1. .Net,
2. Java,
3. Perl,
4. Python,
5. PHP,
6. Ruby
The below mentioned steps can explain how to export the test cases:
1. Open the test case from Selenium IDE
2. Select File -> Export Test Case As

How to debug the tests in Selenium IDE? | Selenium

To debug or execute the test cases line by line. Follow the below mentioned steps
1. Insert a break point (see the question to know more How to insert a break point in Selenium IDE? )from the location where you want to execute step by step
2. Run the test case
3. execution will be paused at the given break point
4. Click on the step (Blue) button to continue with the next statement
5. Click on Run button, to continue executing all the commands at a time.

How to insert a break point in Selenium IDE? | Selenium

Break point can be set in two ways in Selenium IDE:
1. Right click on the command in Selenium IDE and select "Toggle Break Point"
2. Select the command in Selenium IDE and press "B" key on the keyboard
3. If you want to clear the break point once again Spress "B" key on the keyboard
4. You can set multiple break points in Selenium IDE.

How to insert a comment in Selenium IDE? | Selenium

Comments in Selenium IDE can be set in two ways
1. Right click on the command in Selenium IDE and select "Inert New Comment"
2. If you want to comment an existing line. You need to follow the below mentioned steps.
a. Select the source tab in IDE
b. Select the line which you want to comment
c. Assume that if you want to comment a open command you need to write like below mentioned code
<tr>
<!--
<td>open&l/td>
<td>/node/304/edit&l/td>
<td></td>
-->
</tr>

How to insert a start point in Selenium IDE? | Selenium

Start point Selenium IDE can be set in two ways:
1. Right click on the command in Selenium IDE and select "Set / Clear Start Point"
2. Select the command in Selenium IDE and press "S" key on the keyboard
3. You can have only one start point
4. If you have already set one start point and you selected other command as start point. Then the first start point will be removed and the new start point will be set.

How to execute a single line command from Selenium IDE? Selenium

Single line command from Selenium IDE can be executed in two ways
1. Right click on the command in Selenium IDE and select "Execute This Command"
2. Select the command in Selenium IDE and press "X" key on the keyboard.

Which are the browsers supported by Selenium IDE? | Selenium

Selenium IDE supports only one browser Mozilla Firefox.
The versions supported as of now are:
Mozilla Firefox 2.x
Mozilla Firefox 3.x
The versions not supported as of now are:
earlier versions of Mozilla Firefox 2.x
Mozilla Firefox 4.x.

What are the challenges with Selenium IDE? | Selenium

Selenium-IDE does not directly support:
1. condition statements
2. iteration or looping
3. logging and reporting of test results
4. error handling, particularly unexpected errors
5. database testing
6. test case grouping
7. re-execution of failed tests
8. test case dependency
9. capture screenshots on test failures
10. Results Report generations.

What are the capabilities of Selenium IDE? | Selenium

Selenium IDE (Integrated Development Environment) works similar to commercial tools like QTP, Silk Test and Test Partner etc.
 The below mentioned points describes well about Selenium IDE.
1. Selenium IDE is a Firefox add-on.
2. Selenium IDE can support recording the clicks, typing, and other actions to make a test cases.
3. Using Selenium IDE A Tester can play back the test cases in the Firefox browser
4. Selenium IDE supports exporting the test cases and suites to Selenium RC.
5. Debugging of the test cases with step-by-step can be done
6. breakpoint insertion is possible
7. Page abstraction functionality is supported by Selenium IDE
8. Selenium IDE can supports an extensibility capability allowing the use of add-ons or user extensions that expand the functionality of Selenium IDE.

What are the test types supported by Selenium? | Selenium

Selenium could be used for testing the web based applications. The test types can be supported are:
1. functional,
2. regression,
3. load testing
The automation tool could be implemented for post release validation with continuous integration tools like:
1. Jenkins,
2. Hudson,
3. QuickBuild
4. CruiseCont

What are the technical challenges with selenium? | Selenium

As you know Selenium is a free ware open source testing tool. There are many challenges with Selenium.
1. Selenium Supports only web based applications
2. It doesn’t support any non web based (Like Win 32, Java Applet, Java Swing, .Net Client Server etc) applications
3. When you compare selenium with QTP, Silk Test, Test Partner and RFT, there are many challenges in terms of maintainability of the test cases
4. Since Selenium is a freeware tool, there is no direct support if one is in trouble with the support of applications
5. There is no object repository concept in Selenium, so maintainability of the objects is very high
6. There are many challenges if one have to interact with Win 32 windows even when you are working with Web based applications
7. Bitmap comparison is not supported by Selenium
8. Any reporting related capabilities, you need to depend on third party tools
9. You need to learn any one of the native language like (.Net, Java, Perl, Python, PHP, Ruby) to work efficiently with the scripting side of selenium.

What do you know about Selenium? | selenium

Selenium is a suite of tools for web automation testing.
Selenium first came to life in 2004 when Jason Huggins was testing an internal application at ThoughtWorks.
Selenium was a tremendous tool, it wasn’t without it’s drawbacks. Because of its Javascript based automation engine and the security limitations browsers apply to Javascript, different things became impossible to do.
Selenium Suite of projects include:
Selenium IDE
Selenium Core
Selenium 1 (known as. Selenium RC or Remote Control)
Selenium 2 (known as. Selenium Webdriver)
Selenium-Grid.

What is difference between QTP and Selenium? | Selenium

 Only web applications can be testing using Selenium testing suite. However, QTP can be used for testing client server applications. Selenium supports following web browsers: Internet Explorer, Firefox, Safari, Opera or Konqueror on Windows, Mac OS X and Linux. However, QTP is limited to Internet Explorer on Windows.

QTP uses scripting language implemented on top of VB Script. However, Selenium test suite has the flexibility to use many languages like Java, .Net, Perl, PHP, Python, and Ruby.

What are the advantages and disadvantages of using Selenium as testing tool? | Selenium

 Advantages: Free, Simple and powerful DOM (document object model) level testing, can be used for continuous integration; great fit with Agile projects.
Disadvantages: Tricky setup; dreary errors diagnosis; can not test client server applications.

What browsers are supported by Selenium Remote Control? | selenium

The test automation expert can use Firefox, IE 7/8, Safari and Opera browsers to run tests in Selenium Remote Control.

What programming languages can you use in Selenium RC? | Selenium

 C#, Java, Perl, PHP, Python, Ruby.

What is the cost of Selenium test suite? selenium

 Selenium test suite a set of open source software tool, it is free of cost.

What test can Selenium do? | Selenium

 Selenium is basically used for the functional testing of web based applications. It can be used for testing in the continuous integration environment. It is also useful for agile testing

What you say about the flexibility of Selenium test suite? | Selenium

 Selenium testing suite is highly flexible. There are multiple ways to add functionality to Selenium framework to customize test automation. As compared to other test automation tools, it is Selenium’s strongest characteristic. Selenium Remote Control support for multiple programming and scripting languages allows the test automation engineer to build any logic they need into their automated testing and to use a preferred programming or scripting language of one’s choice. Also, the Selenium testing suite is an open source project where code can be modified and enhancements can be submitted for contribution.

What is Selenium Grid? | Selenium

Selenium Grid in the selenium testing suit allows the Selenium RC solution to scale for test suites that must be run in multiple environments. Selenium Grid can be used to run multiple instances of Selenium RC on various operating system and browser configurations.

How Selenium Grid works? | Selenium

Selenium Grid sent the tests to the hub. Then tests are redirected to an available Selenium RC, which launch the browser and run the test. Thus, it allows for running tests in parallel with the entire test suite.

What is Selenium RC (Remote Control)? | Selenium

 Selenium RC allows the test automation expert to use a programming language for maximum flexibility and extensibility in developing test logic. For example, if the application under test returns a result set and the automated test program needs to run tests on each element in the result set, the iteration / loop support of programming language’s can be used to iterate through the result set, calling Selenium commands to run tests on each item. Selenium RC provides an API and library for each of its supported languages. This ability to use Selenium RC with a high level programming language to develop test cases also allows the automated testing to be integrated with the project’s automated build environment.

What are the disadvantage of Selenium IDE tool? | Selenium

1. Selenium IDE tool can only be used in Mozilla Firefox browser.
2. It is not playing multiple windows when we record it.

What are the advantage and features of Selenium IDE? | Selenium

1. Intelligent field selection will use IDs, names, or XPath as needed
2. It is a record & playback tool and the script format can be written in various languages including : C#, Java, PERL, Python, PHP, HTML
3. Auto complete for all common Selenium commands
4. Debug and set breakpoints
5. Option to automatically assert the title of every page
6. Support for Selenium user-extensions.js file.

Can tests recorded using Selenium IDE be run in other browsers? | Selenium

 Yes. Although Selenium IDE is a Firefox add on, however, tests created in it can also be run in other browsers by using Selenium RC (Selenium Remote Control) and specifying the name of the test suite in command line.

What is the use of context menu in Selenium IDE? | Selenium

 It allows the user to pick from a list of assertions and verifications for the selected location.

What are the main components of Selenium testing tools? | Selenium

 Selenium IDE, Selenium RC and Selenium Grid.

What is Selenium IDE? | Selenium

 Selenium IDE is for building Selenium test cases. It operates as a Mozilla Firefox add on and provides an easy to use interface for developing and running individual test cases or entire test suites. Selenium-IDE has a recording feature, which will keep account of user actions as they are performed and store them as a reusable script to play back.

What is Selenium? | Selenium

 Selenium is a set of tools that supports rapid development of test automation scripts for web based applications. Selenium testing tools provides a rich set of testing functions specifically designed to fulfil needs of testing of a web based application.

Selenium Interview Questions, Java Selenium Interview Questions 2012

2. What are the main components of Selenium testing tools?
3. What is Selenium IDE?
4. What is the use of context menu in Selenium IDE?
5. Can tests recorded using Selenium IDE be run in other browsers?
6. What are the advantage and features of Selenium IDE?
7. What are the disadvantage of Selenium IDE tool?
8. What is Selenium RC (Remote Control)?
9. What is Selenium Grid?
10. How Selenium Grid works?
11. What you say about the flexibility of Selenium test suite?

12. What test can Selenium do?
13. What is the cost of Selenium test suite?
14. What browsers are supported by Selenium Remote Control?
15. What programming languages can you use in Selenium RC?
16. What are the advantages and disadvantages of using Selenium as testing tool?
17. What is difference between QTP and Selenium?
18. What do you know about Selenium?
19. What are the technical challenges with selenium?
20. What are the test types supported by Selenium?
21. What are the capabilities of Selenium IDE?
22. What are the challenges with Selenium IDE?
23. Which are the browsers supported by Selenium IDE?
24. How to execute a single line command from Selenium IDE?
25. How to insert a start point in Selenium IDE?
26. How to insert a comment in Selenium IDE?
27. How to insert a break point in Selenium IDE?
28. How to debug the tests in Selenium IDE?
29. How to export the tests from Selenium IDE to Selenium RC in different languages?
30.
How to capture bitmaps in Selenium?
31. Which is the command used for displaying the values of a variable into the output console or log?
32. Which are the browsers supported by Selenium RC?
33. Which are the Operating Systems supported by Selenium?
34. What is Selenium RC?
35. Why Selenium RC is used?
36. Which are the languages supported by Selenium RC?
37.
When to use Accessors in Selenium?
38. What is Selenium WebDriver or Google WebDriver or Selenium 2.0?
39. What are the capabilities of Selenium WebDriver or Google WebDriver or Selenium 2.0?
40. What is the architecture of Selenium RC?
41. What is the architecture of Selenium Grid?
42. Does Selenium support mobile internet testing?
43. Does Selenium support Google Android Operating System?
44. What are the types of text patterns available in Selenium?
45. How to use regular expressions in Selenium?
46. What is Selenese?
47. How do you add check points or verification points in Selenium?
48. What is Assertion in Selenium?
49.
What is an Accessor in Selenium?
50. When to use Assert, Verify and WaitFor in Selenium?

Sunday 27 May 2012

How to create measures and Dimensions? | Cognos

By using the Framework Manager we can create measures and dimensions according to our business needs.

How to select multiple values from Type-in prompt? | Cognos

Example - I want to enter into type-in prompt in 'Product name--- Liza' display report data in 'product name is Leza' only OR I want to enter into type-in prompt in 'All', that time display report data in all are report data.

How to crate cubes in transformer ? | Cognos

Cube can be created by using different data sources.
Data sources: iqd, tex file Cube creation by using iqd data sources.
These iqd sources are coming from impromptu

What is model and how to create model and how to test model? | Cognos

Create a Model In framework Manager and then publish it, make sure that Model meets the requirements, don't overload the model with unwanted query items Model is nothing but a project. And the project will be created by framework manager in which we can extract the metadata from the various operational sources... we will test the model by using the TOAD Model contains meta data which is related to business reporting Information. We import this data from the data base. Using this metadata we are creating Packages, Publishing packages, This metadata contains query subjects and namespaces.........

Where u can save the Report net documentation in our local system? | Cognos

Whenever we Install Cognos Server we get it documentation alone otherwise we can store it in Deployment Folder of Cognos.

HOW MANY LEVELS CAN BE USED IN DRILL THROUGH REPORTS? | Cognos

Two levels summary and detail.

Give me some examples for Lifecycle reporting, I mean which lifecycle we will use for reporting? | Cognos

There is no specific reporting lifecycle. We can generate the reports from data warehouse/data marts or we can generate the reports directly from OLTP systems.What I mean generating reports from OLTP systems is loading data into one system and generating the reports. But this is not recommended. This will depends on the business.
1) Generating reports from the OLAP interface system retrieving the data from the data warehouse to generating forms and reports.
2) They can use Business intelligence project life cycle.

What is exact catalog size? | Cognos

There is no limit for catalog size. It may be 3MB Or 4MB.

What is the importance of Dimension in the cognos.? | Cognos

Without Dimension and Fact cannot make a relation between tables it could not be use for joins and retrieve the data as a form of reports in cognos. Dimension is a major subject area through which we can analysis our business.

What are slowly changing dimensions? Why we are used SCD? | Cognos

Slowly Changing Dimensions are those whose data are not fixed.
SCD types:
SCD type 1: Whose data is not fixed.
Historical data are not saved. Data keeps on changing.-> Current Data
SCD type 2: Whose data is fixed and also save historical data.
SCD type 3: Like SCD type 2 only but save historical data in another table. In one table data will updated and in another table historical data will be there. Depends what we are going to use a DWH or Database.

What r the names of the reports that u prepared? | Cognos

List report, Cross tab report, pie charts etcs....
Master detail, Drill through, CascadingList, Cross tab, Chart, Map report are the basic report of Cognos.

What are the different ways of adding data in Transformer? | Cognos

In transformer u import metadata from architect or catalog to create a cube. We just import metadata. we don’t add data to it

What is loop in framework manager ? | Cognos

Loop is an very dangerous exception in framework manager we can resolve the loop create alias table. loop Display wrong results in the reportnet. A Loop is a Closed Path Circuit....
Avoid loops: using shortcuts.We have ambiguous relationships types:Hierarchical relationships Recursive relationships Multi-valid relationships. To avoid these relationships using shortcuts.

What are the limitations of cognos reportnet? | Cognos

In CRN we can't view multi dimensionally,
-we cant' see a report in excel,
-we can't format a report in CRN
Report net does not support drill through and also bursting of reports is no possible in report net. Also it does not support dimensional analysis

What is associated grouping? And how it works in cognos impromptu? | Cognos

You can associate one or more data items with a grouped data item. An associated data item should have a one-to-one relationship with the grouped data item. For example, Order No. is a grouped data item.
For each order number, there is an Order Date. Order No. and Order Date have a one-to-one relationship.

What is log in cognos? | Cognos

While creating reports or creating models logs have all information till session closed.

What is Snapshot ? | Cognos

A Snapshot is a Permanent Local Copy Of the Report.Snapshot is Static Data Source it is saved with .imr File it is suitable for Disconnected Network....

What is cube size? | Cognos

2.0 GBIt depends on ur project requirements.

Saturday 26 May 2012

What is Stitch Query in Reportnet? | Cognos

Framework Manager generates a separate query for each 'FACT' table and joins the result set. This is called Stitched query. I think when there is no join between two tables and we are dragging in 2 cols from 2 diff
tables which doesn’t have joins then cognos will automatically build 2 or more select clauses with full outer join stitching in the 2 select clauses this is called stitched query

How to pass multiple values from pick list prompt to sub report filter? | Cognos

#parameter1#. Give this in ur filter where u pass multiple values.

How you create IQD In ReportNet Framework? | Cognos

Open framework manager click on any query subject and go Open the properties dialogue box and u can observe the EXTERNALIZE METHOD u change the iqd.

What are the special features in COGNOS REPORTNET? | Cognos

 CRN is web based tool. So it will very useful to view the reports very easily. So that they preferred CRN

How we check the errors before running the report, Plz let me know the answer? | Cognos

Before u run a report. U have an option called 'valididate report' in run menu..
Then u can find the errors what u made.
Actually we are migrating one project to ACTUATE business intelligence solution to COGNOS
REPORTNET? why the client want to migrate from ACTUATE to COGNOS REPORTNET?

What is IQD? What is contained in IQD? | Cognos

IQD stands for Impromptu query definition. It is report save extension with .iqd it is use for creating a cube in power play transformer IQD is Impromptu Query Definition. It contains the SQL query to display the data from the database and SQL query is automatically created based on the columns selected from database.
IQD MEANS IMPROMPTU QUERY DEFFINITION,IT CONTAINS MULTIDIMENTIONAL DATA
STRUCTURE WITH ARRAY FORMAT FOR CREATING CUBES.
THIS REPORTS CAN BE SAVED WITH .IQD FILES.

How u migrate the reports from impromptu to reportnet? | Cognos

It's possible to to migrate impromptu reports to reportnet using the migration tool(own by reportnet 1.1)Using this syntax: migratetocrn
HERE crn----Cognos RoportNet

What are the filters in Framework Manager and Report Studio? | Cognos

Filters in framework manager are
1. Standalone filters
2. Embedded filters
Report studio Filters are
1. Detail filters
2. Summary filters.

How you migrate reports to cognos 8 from previous versions? | Cognos

Migration means report net reports to cognos8.rn Upgrade .bat/rs upgrade .sh is a standalone utility that upgrades a single report specification at a time out side of the cognos.

What is loop in framework manager? | Cognos

Loop is closed path in reportnet it called as ambiguous relationship. That means a query subject contains multiple paths to retrieve the data. It is an exception to resolve to create a shortcut on that query subject otherwise it displays wrong results in reports and performance is degrades.
An undefined join between two tables is known as loop.To resolve loop delete the joins, if these joins are necessary then we have to create shortcuts nothing but alias tables. Place the joins in alias tables.
A LOOP IS A CLOSED PATH IN FRAME WORK MANAGER DUE TO JOINS.
WE ILL RESOLVED IT BY CREATING ALLIAS AND CREATING SHORT CUTS.

How to perform single sign on in Cognos by using URL? | Cognos

In cognos configuration under authentication allow anonymous access should be false.In cgi-bin properties (under iis) the enable anonymous access should be false.

What is Report item? | Cognos

Report item is nothing but a query item when it is drag and drop into the work area.
Example in Go sales and retailers package-> Product (is a query subject) and-> Product line is( a query item)->when PL is dropped into the work area then its a report item.

Explain the different stages in creating a report in cognos report net? | Cognos

Open cognos connection in that select Report studio or query studio it will displays there u have packages(ex: gosales and goretailr (defult)) click on that it display Report studio in that select Object pane select required query subject then click run it displays ur report on report viewer screen.

What is drill down and slicing and dicing what are the difference between them? | Cognos

Drill down means it will explains the summary level information to lowest level information.
Slicing is nothing but cutting edge of the cube.
Dicing is nothing but viewing the cube in all possible directions.
Drill down is the way to get the more detailed data.
Slicing and dicing is to get the data according to where clause.

What are the enhancements in Cognos Reportnet ? | Cognos

Enhancements in Cognos reportnet is Cognos 1.0, 1.1, MR1.1, MR1.2 Cognos 1.0,1.1,
MR1.1, MR1.2 AND cognos 8, 8.1.1MR, 8.1.2MR, now new version is 8.2
Enhancement in cognos in the list report:-
1) Apply list column title styles
2) Apply list column body styles
3) Apply table styles.

How to configure the Cognos configurations to work in the Windows 2000 Server machine? | Cognos

Go to Cognos Configuration and see the settings for cognos in the explorer page. There u can set for win2000 server

How you create security to reports? | Cognos

Basically there are two types of securities for any object Levels of Securities:
1. Database level Security
2. Row level security
Even we can provide LDAP security too.
By setting up the Governors in frame work manager also we can give the security to the data accessing through the report.

What is Cardinality? | Cognos

Cardinality is nothing but relation between tables like
One to One,
One to Many and
Many to Many.
Cardinality is the nature of the relationship. 1-1,1-many relation ships Cardinality is the nature of the relation between two query items

How to test reports in cognos? | Cognos

Go to power play transformer, on toolbar select RUN menu. In RUN menu there is one option that is TEST BUILD you can test ur report there. You may also test the outcome of a report by writing and executing SQL Queries and comparing the outcome with the report outcome.
BY USING SYSTEM TESTING, UNIT TESTING, PERFORMANCE TESTING

What is the difference between group and association? | Cognos

In cognos 'group' is used to suppress the duplicate values. And 'associate' is used to suppress the values if it is one-one relationship.
Group - It Eliminates the Duplicate values from the report break the columns. Its having a one to many relationship.
Association-It Eliminates the Duplicate values from the report and its having one-one relationship.
Both Group & Association eliminate duplicates in a column.But we cannot use Association alone.It should have one to one relationship with grouped column.
Using Association is a performance enhancement technique.
A GROUP IS USED TO ELIMINATE THE DUPLICATES IN DATA.WHERE A ASSOCIATION IS
USED TO HIRE OR SUPPRESS THE VALUES IN 1 TO 1 RELATION.

What is the difference between drill down and drill through? | Cognos

Drill down means it will navigate from detail information to summary level information within report. Drill through means it will navigate from summary to detail from report to report.

How many numbers of cubes can we create on a single model? How can we navigate between those cubes? | Cognos

Using a single Model, we can create as many number of cubes u want. By using the dimension views...etc. Regarding the navigation, when we save cubes, these act as separator multidimensional databases. There wont be any relations. Navigate means opening the cubes separately.

When we save a report in report studio with what extn it save? | Cognos

It saves as .XML
It will save as .CRR
When we save the report it save our specifications like u can choose(in report studio RUN MENU by clinking down icon) HTML,XML,CSV,OR PDF Format if u save the report HTML u can also run report different format as u like or different language also Depends on the format on which the report is being run.
By default its .html format. The report can be made to run in any formats like HTML, PDF, XLS, CSV ( Comma separated format) and XML and based on that, report can be saved in either .html, .pdf, .xls, .csv or .xml When you r viewing the report in the package is shown with extension .crr.

How can I convert a list report/Cross tab Report in Cognos EP series into a bar chart or pie chart etc.? | Cognos

This can be done in Impromptu administrator.

What are the Ways to Import Data into Catalog? | Cognos

Create a catalog with .cat file...
Report studio has two SQL tabs one native SQL and another one cognos SQL which one is get more preference? which one we need to consider?
Cognos sql.

What is query subject? | Cognos

A query subject is the basic building block in Framework Manager. A query subject is a set of query items that have an inherent relationship.

What is the difference between macros and prompt? | Cognos

Macro is set of instructions to run report.
Prompt is just like a dialog box which will ask user to select/enter the information what he needs.
A MACRO IS RUN TIME PARAMETER WHICH CAN BE PLACED IN ANY PART OF SQL SELECT
STATEMENT,WHERE AS PROMPT IS USED TO GIVE CONDITIONS.

How to create users and permissions in cognos? | Cognos

Users and Permissions can be given in Access manager - Administration.
Individual users can be created using their names or their Ids (if any) in Access manager and then be given permissions.
This tool is loaded when you install Cognos 7.x in your machine.
In content manager--we have one component called cognos process manager, using process manager we can integrate with third party tools like LDAP or NTLM. we cannot create users in reportnet directly. in real time we can use LDAP.

How can I change reports to another package? | Cognos

Open that report and save as that report Select public folder and then select package in which package u want to save then save it.

What is difference between drill through and drill down? | Cognos

DRILL THROUGH ALLOWS U TO NAVIGATE FROM SUMMARY TO DETAILED INFORMATION.
DRILL DOWN ALSO SIMILAR KIND OF THING,
FOR EXAMPLE WILL DO DRILL DOWN ON YEAR IF We DRILL DOWN ON THIS THE NEXT
LEVEL WILL COME MEANS YEAR CONTAINS QUATERS, IT CONTAINS
MONTHS,
MONTHS CONTAINS WEEKS,
WEEK CONTAINS DAYS.
SO,WE CAN VIEW ALL THE LEVELS THROUGH DRILL DOWN

For example I developed some reports on employee package now I have to develop same reports to another package.

What is the security module used in cognos? | Cognos

The security module used in cognos is cognos access manager.

What is report burn and where it occurs? | Cognos

Report can be divided into different parts and sending these different parts of report to different users. It occurs in cognos connection.

How can we create a dynamic column name in Cognos? | Cognos

Select Properties, and then click the Headers/Footers tab.

What is the difference b/w macros and prompt? | Cognos

Macro-A macro is a set of instructions that can run applications.Example : A macro can open your catalog,select a report(say for instance) convert that to another format and export it to any specified location,provided the code (Program)is such.Prompt-A prompt specifies the manner in which data in the reports are to be displayed.A Prompt can be defined at the catalog level either or during report generation.

What is Cognos Powerhouse and what is it used for? | Cognos

Cognos Powerhouse is High-Productivity Application Development Solutions equips you with high-productivity development environments for creating your data-driven business solutions faster,whether for Web-based, client/server, or traditional terminal-based access. Power House has gained a worldwide reputation for productivity, reliability, performance, and flexibility.

Suppose you run a report with empty data, how will you inform the end user that it has no data while running the report in report studio? is it possible, if so how? | Cognos

Add a list footer and a text messsage inside "No Data". create a booloean conditional variable "Test" with code "rownum()>0". Select the complete list footer and set Style Variable, if Yes, Box Type of the List footer should be set to "none". This should work...RD

In my report contain Product name, Amount, Country, Sales person. | Cognos

I want to create one prompt: Sales Territory.( Ex: asia, US, UK, AUS), but territory column is not there in my model and source.
if u select the Asia in prompt page-ll Asian country results I want in report page.
I discussed with my friends and colleague, they told use the static choice function.
Still I face this problem. if u know please tell me?
Based on country column find out the territory.create territory column in model level. In my expectation we should hard code using case condition.
If u find any best answers please give me solution.

What is meant by Junk Dimension? | Cognos

The junk dimension is simply a structure that provides a convenient place to store the junk attributes

What is catalog and types of catalogs in cagonos and which is better? | Cognos

A catalog is a file containing the information (Database tables) that Impromptu users need to create reports.
? personal
? distributed
? shared
? secured
shared catalog is better.

What Junk Dimension contains? | Cognod

it contains the miscellaneous attributes such as flags , which does belong to the main dimension table.
for eg; In a sales order fact table ,some informations like, web-order , whether this is a online order or not
new_cust , Is this person a new customer ?
verification , whether the order has been verified?

What is drill down and slicing and dicing whats the difference between them? | Cognos

Drilling lets you quickly move from one level of detail to another to explore different aspects of your business. Drilling down moves you down in the hierarchy; drilling up moves you up in the hierarchy.
Slicing and Dicing:
While you can drill to look at information at any level, you can slice and dice to select the exact information you want in your report.

Give me any example of semi and non additive measures? | Cognos

Semi-Additive: Semi-additive facts are facts that can be summed up for some of the dimensions in the fact table, but not the others.
Non-Additive: Non-additive facts are facts that cannot be summed up for any of the dimensions present in the fact table. Current Balance and Profit Margin are the facts.Current Balance is a semi-additive fact, as it makes sense to add them up for all accounts (what's the total current balance for all accounts in the bank?), but it does not make sense to add them up through time (adding up all current balances for a given account for each day of the month does not give us any useful information). Profit Margin is a non-additive fact, for it does not make sense to add them up for the account level or the day level.

What is difference between PAGE BREAK and Section Report? | Cognos

Section-section is eliminate the duplicate recod.but report looking separate bluck.
setpagebreak means to display the reports in onepage. eg. suppose u create a list report ordermethod, orderyear,revenu when u create section on ordermethod.it will eliminate the duplicate record.but when u apply the set pagebreakc.report display in onepage.like fax reports in onepage,email reports in another page.this in cognos 8 querystudio.

What is Zero-foot print? What are the other methods working as deployment functionality? | Cognos

Cognos offers Portal Services that allow organizations to easily manage and display Cognos business intelligence, planning, and scorecarding in your existing enterprise information portals. Including Cognos reports, analysis, dashboards, scorecards, and other capabilities drives higher returns in your information and portal investments.
Cognos portals offer:
Zero Footprint: Cognos portals have no footprint on the user's desktop. Anyone inside or outside the organization with a Web browser can access and interact with content.
Intuitive User Interface: No special training is required to use the portal. Standard browser interface actions-such as following hypertext links, copying, and pasting-allow users to access and organize business intelligence content quickly and easily

What is the difference between enterprise data warehouse and data warehouse? | Cognos

Big Organizations have a lot of diversified sources of data.There might be a dataware house exclusively for transport and others for data related to the project the company runs.In such case the complete enterprise's(company's) date ware house is a big combination of all and is known the Enterprise data Warehouse(EDW).

what is meant by alternate drill down with ex? | Cognos

Alternate drill down path means there will be two path to opt.For example- We will have time dimension now the client requirement is they want two type of year -one is calender year(Jan-Dec) and another is fiscal year(Apr-Mar).

How create measures and Demensions? | Cognos

You can create measure once you import all the data into the data source.You can create measures and dimensions by draging the required source from data source into dimension map and measure tab.(need to find scope of measures for all the dimensions).

What is loop in frameworkmanager? | Cognos

Loop: loop is a closed path (relation) that exists among 3 (or) more tables. For example, if we have '3' tables T1, T2, T3 then, a loop exists among these tables only when we create joins in the following fashion:

Loop: T1 ---> T2 ---> T3 ---> T1

To resolve the above problem, we have to create a shortcut (or) Alias to the Table T1.

No Loop: T1 ---> T2 ---> T3 ---> Alias (or) Shortcut of T1.

What you mean by Drill across and what is the difference between drill through, drill across? | Cognos

Drill across means when you are moving from one report to another report like country in one report and States in another Report whereas if the report is using same report from moving from country to state. In other when you are moving details level if you are using the different report it is drill across and if you are using same report it is drill through.

What is Cognos Visualizer and Cognos Scripting? | Cognos

Visualizer is a representation of data cubes in a dashboard format. We can drill through to the ground level of a hierarchy as like in power play report but cannot add or remove fields dynamically.
Cognos script editor : We can write cognos macros or programs in this tool and can fine tune or process some execution.

How do add dynamic titles in PP? | Cognos

Powerplay From format menu-->title, header & footer-->title-->insert report filename

How can create users and permissions in cognos? | Cognos

n impromptu menu go to Catlog->User profiles -> userclass tab -> click on Creator ->u can give there folder access,table access,filters,Governor etc
you can crate users by using USERS PROFILE option......and you can give permissions using ROLE IN C8 and GOVERNERS in C7

How can i schedule reports in cognos? | Cognos

By using Cognos Schedular, one can schedule the running reports in Impromptu to execute and save it in desired format.
By using Cognos MACRO script language the reports can be executed and distributed to recipients by using mail applications.
Compiled Cognos MACROs can be scheduled using Cognos Schedular.

How can i test reports in cagonos? | Cognos

In cognos report net by the validate report option a report can be tested. If there will be any error, it will specify the the error, unless it will give message -'report specification is valid'.
After creating the report we will connect to the oracle and we will write the sql query and we will compare this 2 reports .

What are products of cognos? | Cognos

Cognos 6.6 7.0,7.3(PowerPlay, Impromptu)--ReportNet1.0,1.1mr1, 1.1mr22---ReportNet 8.0(latest)IWR is use by Impromptu to publish reports, PPES is used by PP, Cognos Connection is used by repornet. there are many other tools but these are the main.

IBM Cognos Interview Questions, Cognos Interview Questions PDF free download

1. What are products of cognos? 
2. How can i test reports in cagonos?
3. How can i schedule reports in cognos?
4. How can create users and permissions in cognos?
5. What is Cognos Visualizer and Cognos Scripting?
6. How do add dynamic titles in PP?
7. What you mean by Drill across and what is the difference between drill through, drill across?

8. What is loop in framework manager?
9. How create measures and Dimensions?
10. what is meant by alternate drill down with ex?
11. What is the difference between enterprise data warehouse and data warehouse?
12. How you drill from powerPLay to Impromptu? Explain all Steps?
13. What is Zero-foot print? What are the other methods working as deployment functionality?

14. What is difference between PAGE BREAK and Section Report?
15. Give me any example of semi and non additive measures?
16. What is drill down and slicing and dicing whats the difference between them?
17. What is the difference between a cascading report and drill through report?why do we go for drill thru report?
18. What Junk Dimension contains?
19. In my report contain Product name, Amount, Country, Sales person.
20. What is meant by Junk Dimension?
21. Suppose you run a report with empty data, how will you inform the end user that it has no data while running the report in report studio? is it possible, if so how?
22. What is the difference b/w macros and prompt?
23. What is Cognos Powerhouse and what is it used for?
24.  How can we create a dynamic column name in Cognos?
25. What is the security module used in cognos?
26. What is report burn and where it occurs?
27. What is difference between drill through and drill down?
28. How can I change reports to another package?
29. How to create users and permissions in cognos?
30. What is the difference between macros and prompt?
31. What is Cognos Visualizer and Cognos Scripting?
32. What is query subject?
33. What are the Ways to Import Data into Catalog?
34. When we save a report in report studio with what extn it save?
35. How can I convert a list report/Cross tab Report in Cognos EP series into a bar chart or pie chart etc.?

36. How many numbers of cubes can we create on a single model? How can wenavigate between those cubes?
37. What is the difference between drill down and drill through?
38. What is the difference between group and association?
39. What is Cardinality?
40. How to test reports in cognos?
41. How you create security to reports?
42. How to configure the Cognos configurations to work in the Windows 2000 Server machine?
43. What is drill down and slicing and dicing what are the difference between them?
44. What are the enhancements in Cognos Reportnet ?
45. Explain the different stages in creating a report in cognos report net?
46. What is Report item?
47. How to perform single sign on in Cognos by using URL?
48. What is loop in framework manager?
49. How you migrate reports to cognos 8 from previous versions?
50. What are the filters in Framework Manager and Report Studio?
51. How u migrate the reports from impromptu to reportnet?

 52. What is IQD? What is contained in IQD?
53. How we check the errors before running the report, Plz let me know the answer?
54. What are the special features in COGNOS REPORT NET?
55. How you create IQD In ReportNet Framework?
56. How to pass multiple values from pick list prompt to sub report filter?
57. What is Stitch Query in Reportnet?
58. What is Snapshot ?
59. What is cube size?
60. What is log in cognos?
61. What is associated grouping? And how it works in cognos impromptu?
62. What are the limitations of cognos reportnet?
63. What is loop in framework manager ?
64. What are the different ways of adding data in Transformer?
65. What are slowly changing dimensions? Why we are used SCD?
66. What r the names of the reports that u prepared?
67. What is the importance of Dimension in the cognos.?
68. What is exact catalog size?
69. Give me some examples for Lifecycle reporting, I mean which life cycle we will use for reporting?
70. HOW MANY LEVELS CAN BE USED IN DRILL THROUGH REPORTS?
71. Where u can save the Report net documentation in our local system?
72. What is model and how to create model and how to test model?
73. How to crate cubes in transformer ?
74. How to create measures and Dimensions?
75. How to select multiple values from Type-in prompt?

Can a SELECT statement fire a trigger? | PL SQL

 No, a SELECT statement cannot fire a trigger. DML statements, such as INSERT, UPDATE, and DELETE, can cause triggers to fire.

Is it possible to pass parameters to triggers? | PL SQL

 No, it is not possible to pass parameters to triggers. However, triggers fired by INSERT and UPDATE statements can reference new data by using the mew prefix. In addition, the triggers fired in response to UPDATE and DELETE statements can reference old, modified, or deleted data using the :old prefix.
 

Which of the following events cannot be customized with triggers? | PL SQL

A.    INSERT INTO statement
B.    CREATE TABLE statement in a schema
C.    DELETE    CASCADE CONSTRAINTS
D.    SET PAUSE ON
  Option D cannot be customized; whereas, all the other options can be customized using triggers.

Does USERJTRIGGERS have entry for triggers with compilation errors? | PL SQL

 Yes, USER_TRIGGERS have entries for all triggers that are created in the schema with or without errors.

How can you view the errors encountered in a trigger? | PL SQL

  The USER_ERRORS view can be used to show all the parsing errors that occur in a trigger during the compilation until they are resolved.

Does a USER_OBJECTS view have an entry for a trigger? | PL SQL

 Yes, the USER_OBJECTS view has one row entry for each trigger in the schema.

Are DDL triggers fired for DDL statements within a PL/SQL code executed using the DBMS.SQL package? | PL SQL

 No, DDL triggers are not executed for DDL statements, which are executed within the PL/SQL code using the DBMS_SQL package.

Do triggers have restrictions on the usage of large datatypes, such as LONG and LONG RAW? | PL SQL

 Triggers have restrictions on the usage of large data types as they cannot declare or reference the LONG and LONG RAW data types and cannot use them even if they form part of the object with which the trigger is associated. Similarly, triggers cannot modify the CLOB and BLOB objects as well; however, they can reference them for read-only access.

What is the difference between ALTER TRIGGER and DROP TRIGGER statements? | PL SQL

An ALTER TRIGGER statement is used to recompile, disable, or enable a trigger; whereas, the DROP TRIGGER statement is used to remove the trigger from the database.

Can a COMMIT statement be executed as part of a trigger? | PL SQL

 No, A COMMIT statement cannot be executed as a part of a trigger because it is a Transaction Control statement, which cannot be executed within a trigger body. Triggers fire within transactions and cannot include any Transaction Control statement within its code.

Can a view be mutating? If yes, then how? | PL SQL

 No, a view cannot be mutating like a table. If an UPDATE statement fires an INSTEAD OF trigger on a view, the view is not considered to be mutating. If the UPDATE statement had been executed on a table, the table would have been considered as mutating.

Can triggers stop a DML statement from executing on a table? | PL SQL

 Yes, triggers have the capability of stopping any DML statement from execution on a table. Any logical business rule can be implemented using PL/SQL to block modification on table data.

What is the meaning of disabling a trigger? | PL SQL

 When a trigger is disabled, it does not mean that it is deleted. The code of the trigger is still stored in the data dictionary but the trigger will not have any effect on the table.

Which column of the USERJTRIGGERS data dictionary view displays the database event that will fire the trigger? | PL SQL

 The Description column of the USER_TRIGGERS view combines information from many columns to display the trigger header, which includes the database event.

In what condition is it good to disable a trigger? | PL SQL

 It is good to disable triggers during data load operations. This improves the performance of the data loading activities. The data modification and manipulation that the trigger would have performed has to be done manually after the data loading.

What is a database event trigger? | PL SQL

 Trigger that is executed when a database event, such as startup, shutdown, or error, occurs is called a database event trigger. It can be used to reference the attributes of the event and perform system maintenance functions immediately after the database startup.

What are schema-level triggers? | PL SQL

 Schema-level triggers are created on schema-level operations, such as create table, alter table, drop table, rename, truncate, and revoke. These triggers prevent DDL statements, provide security, and monitor the DDL operations.

Which data dictionary views have the information on the triggers that are available in the database? | PL SQL

The data dictionary views that have information on database triggers are given as follows:
    USER_OBJECTS — Contain the name and status of a trigger as well as the date and time of trigger creation
   USER_ERRORS— Contain the compilation error of a trigger
   USER_ TRIGGERS— Contain the source code of a trigger
  USER_ TRIGGER_COLS— Contain the information on columns used in triggers.

What is a mutating table? | PL SQL

 A mutating table is a table, which is in the state of transition. In other words, it is a table, which is being updated at the time of triggering action. If the trigger code queries this table, then a mutating table error occurs, which causes the trigger to view the inconsistent data.

What is a CALL statement? Explain with an example. | PL SQL

 A CALL statement within a trigger enables you to call a stored procedure within the trigger rather than writing the Procedural Language/Structured Query Language (PL/SQL) code in it, The procedure may be in PL/SQL, C, or Java language. Following is an example of the CALL statement:
CREAT OR REPLASE TRIGGER<trigger_name>
BEFORE UPDATE OF <column_name> ON <table_name>
FOR EACH ROW
WHEN <condition_clause>
CALL <procedure_name>

What are the events on which a database trigger can be based? | PL SQL

 Database triggers are based on system events and can be defined at database or schema level. The various events on which a database trigger can be based are given as follows:
=>    Data definition statement on a database or schema object
=>    Logging off or on of a specific user
=>   Database shutdown or startup
=>   On any specific error that occurs.

How can the performance of a trigger be improved? | PL SQL

 The performance of a trigger can be improved by using column names along with the UPDATE clause in the trigger. This will make the trigger fire when that particular column is updated and therefore, prevents unnecessary action of trigger when other columns are being updated.
 

What is the difference between database trigger and stored procedure? | PL SQL

  The main difference between database trigger and stored procedure is that the trigger is invoked implicitly and stored procedure is invoked explicitly.
Transaction Control statements, such as COMMIT, ROLLBACK, and SAVEPOINT, are not allowed within the body of a trigger; whereas, these statements can be included in a stored procedure.

What are INSTEAD OF triggers? | PL SQL

 The INSTEAD OF triggers are used in association with views. The standard table-based triggers cannot be used by views.
These triggers inform the database of what actions are to be performed instead of the actions that invoked the trigger.
Therefore, the INSTEAD OF triggers can be used to update the underlying tables, which are part of the views.
They can be used on both relational views and object views. The INSTEAD OF triggers can only be defined as row-level triggers and not as statement-level triggers.

How can triggers be used for the table auditing? | PL SQL

 Triggers can be used to track values for data operations on tables. This is done using the old and new qualifiers within the trigger code. These two clauses help keep track of the data that is being inserted, updated, or deleted in the table; and therefore, facilitate in application auditing of DML statements. The audit trail can be written to a user-defined table and audit records can be generated for both row-level and statement-level triggers.

What are the different types of triggers? | PL SQL

 There are following two types of triggers:
 Database triggers are executed implicitly whenever a Data Manipulation Language (DML) statement is carried out on a database table or a Data Definition Language (DDL) statement, such as CREATE OR ALTER, is performed on the database.
They may also be executed when a user or database event occurs, such as a user logs on or a database is shutdown.  Application triggers are executed implicitly whenever a DML event takes place within an application, such as WHEN_NEW_FORM_INSTANCE in the Oracle Forms application.
 

What are the system privileges that are required by a schema owner (user) to create a trigger on a table? | PL SQL

  A user must be able to alter a table to create a trigger on the table. The user must own the table and either have the ALTER TABLE privilege on that table or have the ALTER ANY TABLE system privilege. In addition, the user must have the CREATE TRIGGER system privilege. User should have the CREATE ANY TRIGGER system privilege to be able to create triggers in any other user account or schema.
A database-level event trigger can be created if the user has the ADMINISTER DATABASE TRIGGER system privilege.

What is the meaning of PRAGMA keyword? | Pl SQL

The PRAGMA keyword signifies that the statement is a compiler directive, which is not processed when the PL/SQL is executed. It is a pseudo-instruction that tells the compiler to interpret all the occurrences of exception name within the block with the associated Oracle server number.

What is the difference between RAISE and RAISE.APPLICATIONJERROR? | PL SQL

 RAISE is used to call pre-defined exceptions declared in the declarative section of the PL/SQL block.
RAISE_APPLICATION.„ERROR is used to call user-defined ORA - error messages from stored subprograms.

What is the difference between user-defined exceptions and Oracle-defined exceptions? | PL SQL

 User-defined exceptions are explicitly raised; whereas, Oracle-defined exceptions are raised implicitly.

What happen when there is no handler for a raised exception? | Pl SQL

 If an exception is raised and there is no handler in the current block, the exception would propagate to the enclosing block. If no handler is found in the enclosing block, the exception will be propagated to the calling environment as an unhanded exception.

What is the advantage of having a separate exception section within a PL/SQL code? | PL SQL

  The advantages of having a separate exception section within a PL/SQL code are as follows:
?    It is easier to understand the program logic as it is easily visible and readable
?    Any error in any statement will be detected and handled easily.

When is the ROWJTYPE.MISMATCH exception raised? | PL SQL

The ROW__TYPE_MISMATCH exception is raised when a host cursor variable and a PL/SQL cursor variable involved in an assignment have incompatible return types.

When is the CURSOR_ALREADY_OPEN exception raised? | PL SQL

 This exception is raised when the program tries to open an already opened cursor. The cursor should be closed before it can be opened again.
 

Where will the control be transferred if an exception is raised within an exception section of the block? | PL SQL

 When an exception is raised within an exception section of a block, the control is transferred to the exception section of the enclosing block.

What causes the INVALID_CURSOR exception? | PL SQL

 This exception is raised when the program attempts to perform an illegal operation, such as closing an unopened cursor.
 

How can a transaction be retried after an exception? | PL SQL

The following method can be used to retry a transaction after an exception is raised:
?    The transaction should be written within a sub-block
?    The sub-block can be placed inside a loop that repeats the transaction  Mark a save point before starting the transaction. If the transaction succeeds, then commit and exit from the loop. If the transaction fails, the control is transferred to the exception handler where the transaction is rolled back to the save point to undo the changes, and then try to fix the problem.

Can processing be resumed from the point exception was raised after the exception is handled? | PL SQL

After the exception is handled, processing cannot be resumed within the executable section of the current block from where the exception was raised. The current block where the exception handier is declared will be terminated. The control will pass to the statement in the enclosing executable block. If there is no enclosing block, control will pass back to the calling host environment.

What happens if an exception is not handled in a sub-block? | PL SQL

 If an exception is not handled in a sub-block, the exception propagates to the enclosing blocks until the associated handler is found. If none of the blocks has a handier for the exception, an unhandled exception error is passed back to the   host environment as follows:
ORA-06510: PL/SQL: unhandled user-defined exception

Can RAISE.APPLICATION.ERROR be called in the executable section of the program unit? | PL SQL

 Yes, the RAISE_APPLICATION_ERROR procedure can be called in the executable section as well as the exception section of the PL/SQL code.

What happens after a sub-block handles an exception? | PL SQL

 When a sub-block handles an exception, the control passes to the next statement in the executable section of the enclosing block immediately after the END statement of the sub-block.

What happens to the program control when the RAISE_APPLICATION_ERROR procedure is encountered? | PL SQL

 When the RAISE„APPLICATION_ERROR procedure is encountered, it ends the program unit and returns the error number and message to the application. The error number and message can be trapped like any Oracle error.

What is RAISE.APPLICATION_ERROR? | PL SQL

 The RAISE_APPLICATION_ERROR is a built-in procedure and part of the DBMS_STANDARD package. It is used to raise an exception and assign an error number and custom message to the user-defined errors in the stored programs. It is also used to report errors to the calling application and helps to avoid unhandled exceptions.
Following is the syntax of the RAISE APPLICATION_ERROR procedure:
RAISE_APPLICATION_ERROR  (error_number, message) In the preceding syntax, error_number is a negative integer in the range of 20999 to 20000, and message is a character string up to 2048 bytes long.

Describe the SQLCODE and SQLERRM functions. | PL SQL

 The SQLCODE function returns the Oracle error number for internal exceptions. This error number can be passed to the SQLERRM function to get the message associated with the error number. The SQLCODE function returns the value +1; whereas, the SQLERRM function returns the User-Defined Exception message for the user-defined exceptions.

What is the advantage of OTHERS exception handler? | PL SQL

 The OTHERS exception handler ensures that no exception goes unhanded and the program terminates successfully.

Give a few pre-defined Oracle errors. | PL SQL

 Pre-defined Oracle errors are as follows:
i.    NO_DATA_FOUND — Refers to an error when a SELECT statement does not return any result set
ii.    DUP_VAL_ON_INDEX — Refers to an error when a program tries to store duplicate values in an indexed column
iii.     TOO_MANY_ROWS — Refers to an error when a SELECT INTO statement returns more than one row.
iv.     VALUE_ERROR — Refers to an error when an arithmetic, conversion, truncation, or size-constraints error occurs
v.    ROWTYPE_MISMATCH — Refers to an error when the actual and formal parameters do not have the same data-types.

Is it possible to have more than one OTHERS clause? | PL SQL

No, it is not possible to have more than one OTHERS clause in the exception section.

Can the PL/SQL block process more than one exception at a time? | PL SQL

 No, the PL/SQL block cannot handle more than one exception. It can process only one exception handler before terminating.

Describe the OTHERS exception handler. | PL SQL

 The exception section handles only those errors that are specified; however, other errors that are not specified cannot be handled. To handle these errors explicitly, the OTHERS exception handler is used that is always defined as the last exception handler.

What are the different types of exceptions? | PL SQL

  The three types of exceptions that can be handled at runtime are as follows:
=> Predefined Oracle error — Refers to an undeclared error, which is raised by the Oracle server implicitly
=> Non-predefined Oracle error— Refers to an error declared in the declarative section of the code that is raised by the Oracle server implicitly
=> User-defined error — Refers to an error declared in the declarative section of the code that is raised explicitly

Give the block structure of an exception section within the PL/SQL code. | PL SQL

 The structure of an exception section within the PL/SQL code is given as follows:
DECLARE
PL/SQL code .....;
BEGIN
PL/SQL code .....;
EXCEPTION
WHEN exception1 then
PL/SQL code .....;
WHEN exception2 then
PL/SQL code .....;
WHEN OTHERS THEN
PL/SQL code .....;
END;

When is an exception propagated to the outside environment? | PL SQL

 An exception is raised within the program and if there is no corresponding exception handler, the PL/SQL block terminates unsuccessfully and the exception is propagated to the calling environment.

How is an exception raised and handled? | PL SQL

 When a runtime error occurs, an exception is raised. The exception is handled when this error is successfully handled by  the PL/SQL code and is not allowed to propagate to the outward environment. Compilation error cannot be handled within the program; only runtime errors can be handled within the PL/SQL code.
An exception can be raised:
=>    By a runtime Oracle error
=>    By the RAISE statement
=>    By calling the RAISE_APPLICATION_ERROR procedure
After an exception is raised, the control is passed to the exception section, where the code is written about how to handle the error that has occurred. The control cannot pass back to the executable section of the same block after the exception is handled.

What is an exception? | PL SQL

An exception is an identifier, which defines an error condition within the Procedural Language/Structured Query Language  (PL/SQL) code. When an error occurs, it is trapped and the program control unconditionally branches to the exception section of the PL/SQL block.

What is the meaning of the following error statement: ORA-06575: Package or function func_test is in an invalid state? | PL SQL

 This error is displayed if the function is executed when it is in the invalid state. The ORA-06575 error indicates that for some reason the function is not valid and needs to be checked and compiled again.
 

Can you invoke a stored function or procedure from the Oracle Forms in the database? | PL SQL

 Yes, a stored procedure or function can be invoked from the Oracle Forms and the result can be used for further programming.

Is it possible to make procedure or function part of the IF THEN ELSE block? | PL SQL

 Procedure cannot be called from within the IF THEN ELSE block however, functions can become a part of the IF THEN ELSE block because functions return the value in such a manner that the function call in the block acts like a variable.

Can BOOLEAN datatype be used in functions that are called from SQL statements? | PL SQL

 No, BOOLEAN datatype cannot be used in functions that are called from SQL statements.

Suppose a procedure proc_get_lighest_rank is stored in the user schema, user_a. How can you access the procedure within this schema? | PL SQL

 The proc_get„hlghest„rank procedure can be accessed within the user_a schema from another stored procedure. It can also be accessed either from an anonymous PL/SQL block executed on the SQL prompt logged in as user_a or directly at the SQL prompt using the EXECUTE command. In addition, it can be accessed by other users if they have the EXECUTE privilege.

Can an IN parameter be assigned a value within a procedure? | PL SQL

 No, an IN parameter cannot be assigned values within a procedure.

Can an OUT parameter, v_total_marks, be referenced within the procedural code without being assigned a value? | PL SQL

 Any OUT parameter cannot be referenced without being assigned a value, as the OUT parameter cannot be assigned a default value. Therefore, the v_total_marks parameter cannot be referred within the code until the executable statements of the procedure have begun; the OUT parameter is assigned a value using the PL/SQL assignment statements.

Can a parameter use a sequence generator for the assignment of default value to a parameter? | PL SQL

No, a sequence generator cannot be used to assign a default value to a parameter.

Suppose a procedure is created using the CREATE PROCEDURE command; however, it gives a syntax error. Which data dictionary views will have the source code of the procedure? | PL SQL

  The USER_SOURCE, ALL_SOURCE, and DBA_SOURCE data dictionary views will have the source code, as a procedure is stored in the database even if it has a syntax error.

Suppose a procedure proc__calc_student_marks inserts the values into the student_total_marks table. If the table is modified by adding another column, what needs to be done to make the procedure valid? | PL SQL

 Oracle recompiles the procedure automatically when the procedure is invoked. Therefore, no action has to be taken if the INSERT statement is using column names. However, if the INSERT statement is just adding values without using the column names, then the procedure has to be modified, as another column has been added.

Friday 25 May 2012

Which of the following is a correct option to input a parameter to a procedure from a calling block? | PL SQL

a.    Studentjd OUT STUDENT.STUDENTJD%TYPE
b.    Studentjd IN OUT NUMBER (2)
c.    STUDENT OUT NUMBER
d.    STUDENT IN STUDENT.STUDENT JD%TYPE
 Option d is correct because it uses the IN parameter mode and defines the parameter using the %TYPE datatype for the STUDENTJD column in the STUDENT table.

What are the restrictions on functions that are called within SQL statements? | PL SQL

 The functions that are called within SQL statements have the following restrictions:
a.    They must be stored in a database.
b.    They cannot modify any database table.
c.    They can only take the IN parameter modes. The OUT and IN OUT parameter modes are not allowed in a function.
d.    They can only use valid SQL datatypes, such as NUMBER, VARCHAR2, and DATE. However, they cannot use PL/SQL datatypes, such as BOOLEAN, RECORD, and TYPE.
e.    The return type of a function should be of SQL datatype.
f.    They cannot have the COMMIT and ROLLBACK statements.
h.   They cannot have the ALTER SESSION and ALTER SYSTEM commands.

What are function purity levels? | PL SQL

 Function purity levels define what type of data structures can be read or modified by a function. There are four function purity levels, which are given as follows:
?     WNDS —  Writes no database state. The function does not modify any database table using any DML statement.
?    RNDS— Reads no database state. The function does not read any database tables using the SELECT statement.
?     WNPS — Writes no package state. The function does not modify any packaged variables.
?    RNPS— Reads no package state. The function does not read any packaged variables.

Can stand-alone programs be overloaded? | PL SQL

 No, stand-alone programs cannot be overloaded; however, packaged sub-programs can be overloaded within the same package.

When should a procedure and a function be used? | pl sql

 Procedure is used when there are more than one return values however, if there is only one return value, then a function should be used. Although functions may have more than one OUT parameters, it is considered as a poor programming style.
In addition, when a subprogram has to be invoked within an SQL statement, function should be used.

When does a subprogram need recompilation? | Pl SQL

 When any database object associated with the subprogram changes, the program needs to be recompiled. When the program is executed the next time, after the object is changed, the system will automatically perform runtime recompilation.
To avoid this performance overhead, it is better to explicitly recompile the subprogram using the ALTER [PROCEDURE | FUCNTION] command, as shown in the following statement: ALTER PROCEDURE proc_get_marks compile;

How can you bug a procedure or function for errors? | PL SQL

 The procedures or functions can be debugged using the SHOW_ERROR command or the DBMS_OUTPUT command within the subprogram code.

What is the significance of AUTHID property while creating a procedure? | PL SQL

 The AUTHID property affects the name resolution and privilege checking of SQL statements at runtime; however, it does not affect the compilation, and has no meaning for blocks that have no code, such as collection types.
Any procedure may be created with its AUTHID property set to either the DEFINER or the INVOKER rights. If a procedure is created with the DEFINER rights, then the user executing the procedure need not have an access to database objects, which the procedure is accessing. However, if a procedure is created with the INVOKER rights, then the user must have access rights to all the objects that the procedure is accessing.

Which privileges are required to execute a subprogram owned by another user? | PL SQL

 To execute a subprogram owned by another user, the user must be granted either the EXECUTE privilege on a procedure or function or the EXECUTE ANY PROCEDURE system privilege.

What is a One-Time-Only procedure and how is it declared within a package? | PL SQL

 A One-Time-Only procedure is executed only once, when the package is called for the first time. While declaring a One-Time-Only procedure the keyword END is not used at the end of the one-time-only procedure however, the procedure uses the package body's END clause, as the procedure's code is placed at the bottom of the package body.

What is forward declaration and how can it be achieved within a package? | PL SQL

 PL/SQL does not allow the use of any subprogram before it is declared and defined. However, in a package, forward declaration is allowed in case the subprogram specification is terminated by a semi-colon. This enables the subprogram to be defined in a logical manner and groups the subprograms in a package. It also helps in defining mutually recursive programs that call each other directly or indirectly.

How the concept of overloading is implemented within a package? | PL SQL

 PL/SQL allows you to overload the subprogram names and type methods. The package can include subprograms that have the same name as long as they have different formal parameters.
PL/SQL determines which subprogram to be called depending on the formal parameters. In PI/SQL, only packaged subprograms can be overloaded.