!--a11y-->
Creating a DataSource 
In certain scenarios – for example, if you need to use a different database from the default one – you need to create a new DataSource.
You can register a DataSource in the Visual Administrator using the functions provided by the JDBC Connector Service. For more information, see:
· Creating a DataSource with JDBC 1.x Driver
· Creating a DataSource with JDBC 2.0 Driver
The SAP J2EE Engine supports deployment of DataSource objects with an application or a library.
· Deploying DataSource with an application
You have to
include an XML definition of the DataSource in the META-INF directory of the application archive file (EAR). For
more information about the format of the XML file, see
data-sources.dtd in the Reference Manual. You can use the DataSource
when the associated application is started.
· Deploying DataSource with a library
You can include a DataSource deployment descriptor in a library archive file (SDA) and deploy it on the SAP J2EE Engine. Unlike the case when you deploy the DataSource with an application, in this scenario the DataSource becomes functional when the JDBC Connector Service is started.
To deploy a DataSource in an SDA, you have to include the XML that describes the DataSource in the ../server/descriptors directory of the library SDA.

You can also
deploy an alias for an existing DataSource with your library. To do this, you
have to include a relevant XML file in the ../server/descriptors
directory of the SDA. For more information about the format of the XML file,
see
data-source-aliases.dtd.
