25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-26 17:38:45 +01:00

Improve documentation of MSSQL database configuration

This commit is contained in:
Badlop 2013-03-27 17:05:26 +01:00
parent 9b735450b3
commit 06a98ae6fa

View File

@ -2106,19 +2106,11 @@ relational databases like MySQL. To enable storage to your database, just make
sure that your database is running well (see previous sections), and add the sure that your database is running well (see previous sections), and add the
module option \term{\{db\_type, odbc\}}. module option \term{\{db\_type, odbc\}}.
\makesubsection{mssql}{Microsoft SQL Server} \makesubsection{mssql}{Microsoft SQL Server}
\ind{Microsoft SQL Server}\ind{Microsoft SQL Server!schema} \ind{Microsoft SQL Server}\ind{Microsoft SQL Server!schema}
Although this section will describe \ejabberd{}'s configuration when you want to ejabberd can be configured to use Microsoft SQL Server for storing authentication and other information instead of the internal database. MS SQL Server 2000 is known to be supported. You need an ejabberd with the MSSQL patch.
use Microsoft SQL Server, it does not describe Microsoft SQL Server's
installation and database creation. Check the MySQL documentation and the
tutorial \footahref{http://support.process-one.net/doc/display/MESSENGER/Using+ejabberd+with+MySQL+native+driver}{Using ejabberd with MySQL native driver} for information regarding these topics.
Note that the tutorial contains information about \ejabberd{}'s configuration
which is duplicate to this section.
Moreover, the file mssql.sql in the directory src/odbc might be interesting for
you. This file contains the \ejabberd{} schema for Microsoft SQL Server. At the end
of the file you can find information to update your database schema.
\makesubsubsection{compilemssql}{Driver Compilation} \makesubsubsection{compilemssql}{Driver Compilation}
@ -2143,24 +2135,46 @@ is the same as the configuration for
ODBC compatible servers (see section~\ref{configureodbc}). ODBC compatible servers (see section~\ref{configureodbc}).
\makesubsubsection{mssqlauth}{Authentication} \begin{enumerate}
\ind{Microsoft SQL Server!authentication} \item Install Microsoft SQL Server 2000.
%TODO: not sure if this section is right!!!!!! \item Open "SQL Server Enterprise Manager" to create and setup the database. Create a new database called 'ejabberd'.
\item Use the "Query Analyzer" tool to run the database creation script.
\item Create an ODBC datasource (from "Config Panel" -> "Data source (ODBC)"). The new ODBC datasource can be named ejabberd.
\item Modify the config file to use your newly created MSSQL database:
The configuration of Authentication for a Microsoft SQL Server The configuration of Authentication for a Microsoft SQL Server
is the same as the configuration for is the same as the configuration for ODBC compatible servers (see section~\ref{odbcauth}).
ODBC compatible servers (see section~\ref{odbcauth}). \begin{verbatim}
% Comment Internal Authentication:
%{auth_method, internal}.
% Define ODBC authentication:
{auth_method, odbc}.
{odbc_server, "DSN=ejabberd;UID=sa;PWD=nimda"}.
Start ejabberd (from the "Start" menu, and from the console try creating a new user:
(ejabberd@home-68006dc09b)2> ejabberd_auth:try_register("admin", "localhost", "nimda").
{atomic,ok}
\end{verbatim}
\makesubsubsection{mssqlstorage}{Storage} \item Try connecting from a Jabber client, with your newly connected user.
\ind{Microsoft SQL Server!storage}
Microsoft SQL Server also can be used to store information into from several \item Check that the newly created user has been correctly added to your database using the MSSQL "Query Analyzer":
modules. See section~\ref{modoverview} to see which modules can be used with \begin{verbatim}
select * from [dbo].[users];
\end{verbatim}
\item Modify the config file to enable odbc storage in the modules you want.
See section~\ref{modoverview} to see which modules can be used with
relational databases like MySQL. To enable storage to your database, just make relational databases like MySQL. To enable storage to your database, just make
sure that your database is running well (see previous sections), and add the sure that your database is running well (see previous sections), and add the
module option \term{\{db\_type, odbc\}}. module option \term{\{db\_type, odbc\}}.
\item Restart ejabberd
\end{enumerate}
\makesubsection{pgsql}{PostgreSQL} \makesubsection{pgsql}{PostgreSQL}
\ind{PostgreSQL}\ind{PostgreSQL!schema} \ind{PostgreSQL}\ind{PostgreSQL!schema}