Sunteți pe pagina 1din 18

What Is a Control File?

Every Oracle Database has a control file, which is a small binary file that
records the physical structure of the database. The control file includes:

The database name


Names and locations of associated datafiles and redo log files
The timestamp of the database creation
The current log sequence number
Checkpoint information

The control file must be available for writing by the Oracle Database server
whenever the database is open. Without the control file, the database cannot
be mounted and recovery is difficult.
The control file of an Oracle Database is created at the same time as the
database. By default, at least one copy of the control file is created during
database creation. On some operating systems the default is to create
multiple copies. You should create two or more copies of the control file
during database creation. You can also create control files later, if you lose
control files or want to change particular settings in the control files.

2 What is activer explain difference between activer exe and dll

A standard exe application is one that is created using


Standard EXE project. It is the most widely used Project
type using VB6. Standard EXE application is normally the
most widely used among the available Project types in Visual
Basic. Stand-alone programs have an .EXE file extension.
Usage
A standard EXE application is normally used when you want to
develop a stand-alone application. Examples include
calculators, text editors, and other similar applications.
An ActiveX EXE application is one that is created using
ActiveX EXE project. ActiveX EXE are widely used in
conjunction with standard EXE applications. There are three
types of widely used of ActiveX projects. These are:
a. ActiveX EXE
b. ActiveX DLL
c. ActiveX Control
ActiveX EXE: Unlike a stand-alone EXE file, an ActiveX EXE
file is designed to work as an OLE server, which is nothing
more than a program designed to share information with
another program. It has an .EXE file extension.
ActiveX DLL: ActiveX DLL files are not meant to be used by
themselves. Instead, these types of files contain
subprograms designed to function as building blocks when
creating a stand-alone program. It has a .DLL file extension.
ActiveX Control: Unlike an ActiveX DLL or ActiveX EXE file,
an ActiveX Control file usually provides both subprograms
and a user interface that you can reuse in other programs.

It has an .OCX file extension.


Usage
1. The ActiveX EXE/DLL is normally used when you need to
build a component that is separate from the main program.
The concept is based on COM model.
2. ActiveX DLL/EXE allows multiple applications to share the
same code. This allows for scalability of programs, and
saves time because you only need to write the code once.
3. ActiveX DLLs and ActiveX EXEs are almost same in the ways
they are built and used. In either case, you build one or
more classes that applications can use to do something.
4. One of the main differences between ActiveX EXE and an
ActiveX DLL's is that the code is executed within the main
program's address space for ActiveX DLL. This is because the
code lies inside the program's address space, calling
methods and execution of code is very fast.
Differences
An ActiveX Exe provides the reusability of code, by
accessing it from different clients.
An ActiveX Exe is a component that can be called by another
application by providing a reference to the component. But a
Standard Exe application cannot be called in this way.
An ActiveX EXE's code is run in a separate process. When the
main program calls an ActiveX EXE's method, the application
passes required parameters into the ActiveX EXE's and calls
the method. The ActiveX EXE, upon execution may return the
results to the main program. This is slower than running an
ActiveX DLL's method inside the main program's address space

3 write advantages of active hdl over active hehe


Components provide reusable code in the form of objects. An application that uses a
components code, by creating objects and calling their properties and methods, is
referred to as a client.
Components can run either in-process or out-of-process with respect to the clients
that use their objects. An in-process component, or ActiveX DLL, runs in another
applications process. The client may be the application itself, or another in-process
component that the application is using.
Figure 2.1 In-process components are used by applications or other inprocess components

The series of step-by-step procedures in this chapter builds an in-process


component called ThingDemo, with class modules that demonstrate object lifetime,
global objects, and objects that control modal and modeless dialog boxes.
Youll also see how to debug an ActiveX DLL in process, by running the DLL and a
test project together in the Microsoft Visual Basic development environment.
The procedures for creating the ThingDemo component build on each other. The
sequence in which you perform the procedures is therefore important.

4 WHAT IS ODBC ? HOW WE CAN CREATE DSN?


WebAccess uses an ODBC connection to SQL Server. ODBC is an acronym for Open
Database Connection. DSN is an acronym for Data Source Name.
The Microsoft SQL Server ODBC Device Drivers must be installed on the Project
Node.
There are two SQL ODBC drivers that appear to work with SQL Server 2005:
1) the SQL Native Client Driver installed as part of the SQL Server 2005 client
services. Use this driver is the Project Node and the SQL Server 2005 are the same
PC or if you installed the SQL Server 2005 client services on the WebAccess Project
Node.
2) The SQL Server Driver part of Windows XP Professional and Windows 2000 dated
10/28/2003 and later (version 3.70.11.46 of SQLSRV32.DLL). Use this if the SQL
Server is on a remote node.
It is easier to use a System DSN. The System DSN allows access to the SQL ODBC
drivers no matter who is logged on to the Project Node. The System DSN also
makes for less confusion later on.
A User DSN will work as well. The User DSN is specific to each user and allows you to
restrict which users have access. However, you must configure a User DSN for each
user that might be logged on the Project Node.
Any name can be given to the DSN. But make it one that you can remember This
DSN name must be entered into the WebAccess Project Manger as the ODBC Log
Data Source.

Configure "Native Client SQL Server" DSN


1.

From Control Panel open ODBC Data Source Administrator, on the


Project Node.
Start -> Control Panel -> Administrative Tools -> Data Sources
(ODBC).

2.

3.

Select System DSN.

Click on the ADD button. This will open the Create New Data
Source dialog box, shown below.

4.

Look for the driver titled SQL Native Client. If this driver is not listed in
the window and the SQL Server is, go to Section 2. Configure SQL
Server DSN.

5.

Double-click on the driver SQL Native Client. The Create a New Data
Source to SQL Server Setup dialog box will open, as shown below.

6.

In the Name text box, enter a name for this DSN. You will have to
enter this name in WebAccess Project Node.
For example, bwSQLData

7.

In the Server combo-box, you must enter the name of the computer
running SQL server.
If SQL Server is installed on the Project Node, Select (local).
Otherwise, select the computer with the SQL Server. (Note - if you do
not see the other computer listed, you should try to Register SQL
server as described earlier).

8.
9.

Click on the Next > button.


Select "SQL Server authentication".
Enter the sa as the user login ID and the password you created
in step 14 of Section 23.3.1 Install SQL Server 2005.

Figure 23.3 Use SQL Server Authentication and SQL Server login ID and
Password.
Select Next after you have entered the password for the sa account. (or
whatever account you know will work).
10.

Check the Change the default database to.


Use the Pull Down box or type the Database name you created in SQL
Server Management Studio. This name has to match exactly. Go back
to Section 23.3.2 Create and SQL Server Database if you skipped this
step or forgot the Database name. In the example it was
WebAccessPData.

Select Next.
11.

Check "Use regional settings.....".

12.

Select Test Data Source.

13.

You should see "TESTS COMPLETED SUCCESSFULLY!". Select OK.

If it did not Test Successfully. Try these steps:


If the SQL Server is a remote node, verify that TCP port 1433 is open
on the SQL Server Node (i.e. check any firewalls or Windows Firewall).
Verify the SA Login Password or whatever Login ID you used to
configure this DSN.
Verify the Database name.
Verify that SQL Server is running.
14.

Select OK three times (one for each dialog box) to exit ODBC
configuration.

15.

You should remember the DSN name, because this is what you will
tell WebAccess to use. In this example the ODBC DSN isbwSQLData.
It could have been any name that you used, just remember it.

16. Next and last step is to tell WebAccess to use the DSN. See
Section 20.8.1 Create an ODBC Log Data Source. and 20.8.2 Select
new ODBC Log Data Source. And be sure to Select the ODBC Data
source

5 EXPLAIN DAO , RDO AND ADO WHAT OLE EXPLAIN ?

ADO, DAO and RDO in


Visual Basic
In Visual Basic, three data access interfaces are available to you: ActiveX Data
Objects (ADO), Remote Data Objects (RDO), and Data Access Objects (DAO). A data
access interface is an object model that represents various facets of accessing data.
Using Visual Basic, you can programmatically control the connection, statement
builders, and returned data for use in any application.
Why are there three data access interfaces in Visual Basic? Data access technology
is constantly evolving, and each of the three interfaces represent a different state of
the art. The latest is ADO, which features a simpler yet more flexible object
model than either RDO or DAO. For new projects, you should use ADO as your data
access interface.

Why Use ADO?


ADO is designed as an easy-to-use application level interface to Microsoft's newest
and most powerful data access paradigm, OLE DB. OLE DB provides highperformance access to any data source, including relational and non-relational
databases, email and file systems, text and graphics, custom business objects, and
more. ADO is implemented for minimal network traffic in key Internet scenarios, and
a minimal number of layers between the front-end and data source all to provide
a lightweight, high-performance interface. ADO is called using a familiar metaphor
the OLE Automation interface. And ADO uses conventions and features similar to
DAO and RDO, with simplified semantics that make it easy to learn.

6 WRITE DIFFERENCE BETWEEN ODBC AND OLEDB?


Both are specifications which describe how an application program can access the data in a data store.
ODBC stands for Open Database Connectivity. The ODBC call-level interface specification was created
by Microsoft in 1992 as a way to standardize program-to-SQL data communication. Before ODBC,
application programmers had to use a different set of API calls for every type of database. By creating a
standard interface, programmers could write one set of code (for the most part) that would work with any
ODBC-compliant database. ODBC was quickly embraced by most major database vendors and became
a de facto standard. Notice that this cooperation happened when Microsoft was not a very large company.
OLE DB originally stood for Object Linking and Embedding for Databases, but now the acronym just
means a COM-based interface to a wide range of data sources. OLE DB is sometimes written as OLEDB
or OLE-DB. OLE DB came into being in the mid 1990s through an evolution and merging of several
Microsoft technologies. The idea of OLE DB is to provide programmers with a consistent interface to
many different types of data, including SQL databases, Excel spreadsheets, and so on.
The best way to understand the relationship between ODBC and OLE DB is by way of a picture. (Click on
the image at the bottom of this blog entry to enlarge it so you can see it clearly). Imagine that you are a
developer or tester writing a program which needs to access and manipulate some data. If the data is
stored in a SQL relational database, use can use ODBC calls. It turns out that working directly with ODBC
is a bit awkward. An alternative is to use OLE DB. OLE DB programming tends to be quite a bit easier
than ODBC programming, in part because OLE DB operates at a higher level of abstraction. The
downside of OLE DB is a slight performance penalty in most cases. Now if you want to get at Excel data,
you can also use OLE DB calls to access and manipulate the data. Of course Ive left out a lot of details,
but this overview should help you understand the difference between ODBC and OLE DB.

7 what do you mean by sql explain ddl dml dcl in detail

DDL
Data Definition Language (DDL) statements are used to define the database structure or
schema. Some examples:
o

CREATE - to create objects in the database

ALTER - alters the structure of the database

DROP - delete objects from the database

TRUNCATE - remove all records from a table, including all spaces allocated for the
records are removed

COMMENT - add comments to the data dictionary

RENAME - rename an object

DML
Data Manipulation Language (DML) statements are used for managing data within schema
objects. Some examples:
o

SELECT - retrieve data from the a database

INSERT - insert data into a table

UPDATE - updates existing data within a table

DELETE - deletes all records from a table, the space for the records remain

MERGE - UPSERT operation (insert or update)

CALL - call a PL/SQL or Java subprogram

EXPLAIN PLAN - explain access path to data

LOCK TABLE - control concurrency

DCL
Data Control Language (DCL) statements. Some examples:
o

GRANT - gives user's access privileges to database

REVOKE - withdraw access privileges given with the GRANT command

TCL
Transaction Control (TCL) statements are used to manage the changes made by DML
statements. It allows statements to be grouped together into logical transactions.
o

COMMIT - save work done

SAVEPOINT - identify a point in a transaction to which you can later roll back

ROLLBACK - restore database to original since the last COMMIT

SET TRANSACTION - Change transaction options like isolation level and what rollback
segment to use
SQLupDifference between TRUNCATE, DELETE and DROP commands

Login to post comments

Submitted by madhuker (not verified) on Wed, 2005-04-06 03:20.

DML statements can be rollbacked where DDL are autocommit.

Login to post comments

DML commands can't be


Submitted by ramakrishna (not verified) on Thu, 2006-01-05 09:35.

DML commands can't be rollback when a DDL command is executed immediately after a DML. DDL after
DML means "auto commit". The changes will return on disk not on the buffer. If the changes return on
the buffer it is possible to rollback not from the disk.

Login to post comments

Submitted by R. SATISH KUMAR (not verified) on Wed, 2005-04-13 03:09.

DEAR SIR,
Let me tell you the difference between DDL,DML,TCL and DCL:
DDL COMMANDS:
CREATE,ALTER,DROP AND TRUNCATE ARE CALLED DDL COMMANDS. They are called Data Definition since
they are used for defining the data. That is the structure of the data is known through these DDL
commands.
DML COMMANDS:
DML commands are used for data manipulation. Some of the DML commands
insert,select,update,delete etc. Even though select is not exactly a DML language command oracle still
recommends you to consider SELECT as an DML command.
TCL:
For revoking the transactions and to make the data commit to the database we use TCL. Some of the
TCL commands are:
1. ROLLBACK
2. COMMIT
ROLLBACK is used for revoking the transactions until last commit.
COMMIT is used for commiting the transactions to the database.
Once we commit we cannot rollback. Once we rollback we cannot commit.
Commit and Rollback are generally used to commit or revoke the transactions that are with regard to
DML commands.
DCL:
Data Control Language is used for the control of data. That is a user can access any data based on the
priveleges given to him. This is done through DATA CONTROL LANGUAGE. Some of the DCL Commands
are:
1. GRANT
2. REVOKE.
"THESE ARE REFERRED FROM THE BOOK 'ORACLE 9i complete Reference' written by Kooch and George.
This is an Oracle Press Release." If you want further details about this topic I can give you. Since I don't
know your e-mail address I am not able to send you the complete information. I will give my e-mail
address. That is, satish_sathya1983@yahoo.co.in . You can send your email address to my email and i
will discuss about this topic with you. If you can send me your email address I can send you an
complete attachment of this topic.

S-ar putea să vă placă și