Каталог статей
Меню сайта


Форма входа


Категории раздела
WebLogic administration and programming [7]
JSF and Primefaces [1]
Java general programming [12]
Other Java problems [11]
JPA and Hibernate [2]
Spring [2]
Spring


Поиск


Друзья сайта
  • Официальный блог
  • Сообщество uCoz
  • FAQ по системе
  • Инструкции для uCoz


  • Статистика

    Онлайн всего: 1
    Гостей: 1
    Пользователей: 0


    Приветствую Вас, Гость · RSS 08.05.2024, 17:55
    Главная » Статьи » Java » Java general programming

    JDBC url format

    In case of PostgreSQL it is documented here.

    With JDBC, a database is represented by a URL (Uniform Resource Locator). With PostgreSQL™, this takes one of the following forms:

    • jdbc:postgresql:database
    • jdbc:postgresql://host/database
    • jdbc:postgresql://host:port/database

    In case of MySQL it is documented here.

    The general format for a JDBC URL for connecting to a MySQL server is as follows, with items in square brackets ([ ]) being optional:

    jdbc:mysql://[host1][:port1][,[host2][:port2]]...[/[database]] » [?propertyName1=propertyValue1[&propertyName2=propertyValue2]...]

    In case of Oracle it is documented here.

    There are 2 URL syntax, old syntax which will only work with SID and the new one with Oracle service name.

    Old syntax jdbc:oracle:thin:@[HOST][:PORT]:SID

    New syntax jdbc:oracle:thin:@//[HOST][:PORT]/SERVICE

    Категория: Java general programming | Добавил: basil (25.10.2016)
    Просмотров: 388 | Рейтинг: 0.0/0
    Всего комментариев: 0
    Имя *:
    Email *:
    Код *:
    Бесплатный конструктор сайтов - uCoz