blob: c3b6bf89408c70fc768f5f1cf68401b5db625cdb [file] [log] [blame]
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9038],{15680:(e,r,t)=>{t.d(r,{xA:()=>d,yg:()=>y});var n=t(96540);function a(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function o(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function i(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?o(Object(t),!0).forEach((function(r){a(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function s(e,r){if(null==e)return{};var t,n,a=function(e,r){if(null==e)return{};var t,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)t=o[n],r.indexOf(t)>=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)t=o[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var l=n.createContext({}),p=function(e){var r=n.useContext(l),t=r;return e&&(t="function"==typeof e?e(r):i(i({},r),e)),t},d=function(e){var r=p(e.components);return n.createElement(l.Provider,{value:r},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},m=n.forwardRef((function(e,r){var t=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),c=p(t),m=a,y=c["".concat(l,".").concat(m)]||c[m]||u[m]||o;return t?n.createElement(y,i(i({ref:r},d),{},{components:t})):n.createElement(y,i({ref:r},d))}));function y(e,r){var t=arguments,a=r&&r.mdxType;if("string"==typeof e||a){var o=t.length,i=new Array(o);i[0]=m;var s={};for(var l in r)hasOwnProperty.call(r,l)&&(s[l]=r[l]);s.originalType=e,s[c]="string"==typeof e?e:a,i[1]=s;for(var p=2;p<o;p++)i[p]=t[p];return n.createElement.apply(null,i)}return n.createElement.apply(null,t)}m.displayName="MDXCreateElement"},51536:(e,r,t)=>{t.r(r),t.d(r,{assets:()=>d,contentTitle:()=>l,default:()=>y,frontMatter:()=>s,metadata:()=>p,toc:()=>c});var n=t(58168),a=t(98587),o=(t(96540),t(15680)),i=["components"],s={id:"sqlserver",title:"Microsoft SQLServer"},l=void 0,p={unversionedId:"development/extensions-contrib/sqlserver",id:"development/extensions-contrib/sqlserver",title:"Microsoft SQLServer",description:"\x3c!--",source:"@site/docs/29.0.0/development/extensions-contrib/sqlserver.md",sourceDirName:"development/extensions-contrib",slug:"/development/extensions-contrib/sqlserver",permalink:"/docs/29.0.0/development/extensions-contrib/sqlserver",draft:!1,tags:[],version:"current",frontMatter:{id:"sqlserver",title:"Microsoft SQLServer"}},d={},c=[{value:"Setting up SQLServer",id:"setting-up-sqlserver",level:2}],u={toc:c},m="wrapper";function y(e){var r=e.components,t=(0,a.A)(e,i);return(0,o.yg)(m,(0,n.A)({},u,t,{components:r,mdxType:"MDXLayout"}),(0,o.yg)("p",null,"To use this Apache Druid extension, ",(0,o.yg)("a",{parentName:"p",href:"/docs/29.0.0/configuration/extensions#loading-extensions"},"include")," ",(0,o.yg)("inlineCode",{parentName:"p"},"sqlserver-metadata-storage")," in the extensions load list."),(0,o.yg)("h2",{id:"setting-up-sqlserver"},"Setting up SQLServer"),(0,o.yg)("ol",null,(0,o.yg)("li",{parentName:"ol"},(0,o.yg)("p",{parentName:"li"},"Install Microsoft SQLServer")),(0,o.yg)("li",{parentName:"ol"},(0,o.yg)("p",{parentName:"li"},"Create a druid database and user"),(0,o.yg)("p",{parentName:"li"},"Create the druid user"))),(0,o.yg)("ul",null,(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("p",{parentName:"li"},"Microsoft SQL Server Management Studio - Security - Logins - New Login...")),(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("p",{parentName:"li"},"Create a druid user, enter ",(0,o.yg)("inlineCode",{parentName:"p"},"diurd")," when prompted for the password."),(0,o.yg)("p",{parentName:"li"},"Create a druid database owned by the user we just created")),(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("p",{parentName:"li"},"Databases - New Database")),(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("p",{parentName:"li"},"Database Name: druid, Owner: druid"))),(0,o.yg)("ol",{start:3},(0,o.yg)("li",{parentName:"ol"},"Add the Microsoft JDBC library to the Druid classpath")),(0,o.yg)("ul",null,(0,o.yg)("li",{parentName:"ul"},"To ensure the com.microsoft.sqlserver.jdbc.SQLServerDriver class is loaded you will have to add the appropriate Microsoft JDBC library (sqljdbc*.jar) to the Druid classpath."),(0,o.yg)("li",{parentName:"ul"},'For instance, if all jar files in your "druid/lib" directory are automatically added to your Druid classpath, then manually download the Microsoft JDBC drivers from ( ',(0,o.yg)("a",{parentName:"li",href:"https://www.microsoft.com/en-ca/download/details.aspx?id=11774"},"https://www.microsoft.com/en-ca/download/details.aspx?id=11774"),") and drop it into my druid/lib directory.")),(0,o.yg)("ol",{start:4},(0,o.yg)("li",{parentName:"ol"},(0,o.yg)("p",{parentName:"li"},"Configure your Druid metadata storage extension:"),(0,o.yg)("p",{parentName:"li"},"Add the following parameters to your Druid configuration, replacing ",(0,o.yg)("inlineCode",{parentName:"p"},"<host>"),"\nwith the location (host name and port) of the database."),(0,o.yg)("pre",{parentName:"li"},(0,o.yg)("code",{parentName:"pre",className:"language-properties"},"druid.metadata.storage.type=sqlserver\ndruid.metadata.storage.connector.connectURI=jdbc:sqlserver://<host>;databaseName=druid\ndruid.metadata.storage.connector.user=druid\ndruid.metadata.storage.connector.password=diurd\n")))))}y.isMDXComponent=!0}}]);