Database​​ Replication​​ for​​ Tradeshow

Database​​ Replication​​ for​​ Tradeshow

1.​​ Install​​ SQL​​ Server​​ 2012​​ or​​ 2014

  • Create​​ data​​ folders​​ (Data,​​ Log,​​ Backup)​​ in​​ appropriate​​ disk​​ in​​ MSSQL​​ root​​ folder

  • Installation​​ >​​ new​​ SQL​​ Server​​ stand-alone​​ installation​​ ...

  • SQL​​ Server​​ Feature​​ installation

 

  • Select​​ only​​ two​​ options:​​ SQL​​ Server​​ Replication​​ &​​ Management​​ Tools​​ ​​ Complete

  • Instance:​​ Default​​ instance

  • Server​​ configuration​​ >​​ Service​​ Account:​​ Startup​​ Automatic​​ for​​ SQL​​ Server​​ Agent​​ &​​ SQL​​ Server​​ Database​​ Engine

  • Server​​ configuration​​ >​​ Authentication​​ Mode:​​ Mixed,​​ add​​ sa​​ password​​ and​​ "add​​ current​​ user"

  • Set​​ default​​ data​​ directories

  • Enable​​ FILESTREAM

 

2.​​ If​​ service​​ pack​​ is​​ available​​ install​​ last​​ service​​ pack​​ (SP​​ is​​ cumulative)

  • click​​ Next,​​ Next,​​ Next,​​ Update

 

3.​​ Setup​​ SQL​​ Server​​ inbound​​ firewall

  • open​​ Firewall​​ setting​​ (from​​ search​​ or​​ in​​ Control​​ panel)

  • open​​ "Advanced​​ Settings"

  • Create​​ Inbound​​ Rules​​ >​​ new​​ Rule...

  • Port:​​ TCP​​ 1433

  • Allow​​ Connection​​ from​​ Domain​​ and​​ Private

  • Name​​ it​​ "SQL​​ Server"

 

 

4.​​ SQL​​ Server​​ Network​​ Configuration

  • Disable​​ "Shared​​ Memory"

Setup​​ GotoMeeting

  • Setup​​ unattended​​ Support

Sonicwall​​ VPN​​ Setup

1.​​ Enable​​ WAN​​ GroupVPN,​​ and​​ copy​​ Shared​​ Secret

  • Client​​ section

    • Cache​​ XAUTH​​ User​​ Name​​ and​​ Password​​ on​​ Client:​​ Always

    • Virtual​​ Adapter​​ settings:​​ DHCP​​ Lease​​ or​​ Manual​​ Configuration

    • Allow​​ Connections​​ to:​​ Spilt​​ Tunnels

    • don't​​ check​​ any​​ check​​ box

2.​​ DHCP​​ over​​ VPN:​​ Central​​ Gateway

  • check​​ "Use​​ Internal​​ DHCP​​ Server"

  • check​​ "For​​ Global​​ VPN​​ Client"

3.​​ add​​ Local​​ User​​ (n41,​​ groups:​​ Trusted​​ Users,​​ VPN​​ Access:​​ LAN​​ Subnets)

 

4.​​ In​​ case​​ VPN​​ is​​ malfunctioning,​​ change​​ MTU​​ for​​ interface​​ WAN(X1)​​ from​​ 1500​​ to​​ 1380

 

Configure​​ Database​​ Replication

In​​ Main​​ Server

1.​​ Configure​​ Distribution

  • Set​​ distribution​​ database​​ location

 

  • Set​​ Snapshop​​ folder

 

  • Next,​​ Next,​​ Next,​​ Finish

2.​​ Share​​ ReplData​​ folder​​ with​​ Users​​ full​​ control

3.​​ Add​​ user​​ account​​ for​​ sql​​ agent​​ named​​ sqlreplication​​ with​​ default​​ N41​​ password

4.​​ Give​​ permission​​ to​​ sqlreplication​​ user

5.​​ Prepare​​ merge​​ replication​​ script

  • change​​ dbname

  • change​​ publication​​ name

  • change​​ publisher​​ name

  • change​​ snapshop​​ folder​​ name

  • change​​ job​​ login​​ and​​ password

6.​​ Run​​ merge​​ replication​​ script

7.​​ Verify​​ Snapshot​​ is​​ generated

 

In​​ Laptop

1.​​ Copy​​ N41​​ database​​ backup​​ from​​ main​​ database​​ server​​ to​​ show​​ laptop

2.​​ Restore​​ N41​​ database​​ backup​​ in​​ laptop

3.​​ Add​​ user​​ account​​ for​​ sql​​ agent​​ named​​ sqlreplication​​ with​​ default​​ N41​​ password

  • same​​ as​​ main​​ server

4.​​ Give​​ permission​​ to​​ sqlreplication​​ user

  • same​​ as​​ main​​ server

5.​​ Change​​ NVLT_SERIALNO​​ table​​ values​​ starting​​ from​​ 1000000​​ except​​ PREPACK_SKU​​ which​​ start​​ from​​ 2000000

 

6.​​ Subscribe​​ and​​ initialize​​ replication

  • Select​​ publisher​​ using​​ <Find​​ SQL​​ Server​​ Publisher…>​​ dropdown​​ box

  • Set​​ “Merge​​ Agent​​ Location”​​ as​​ pull​​ subscriptions

 

 

  • Set​​ “Merge​​ Agent​​ Security”

Install​​ N41

1.​​ Install​​ SQL​​ Server​​ 2008​​ R2​​ Client

2.​​ Copy​​ runtime​​ to​​ \Source\NVLT​​ folder​​ (Powerbuilder​​ 11.5​​ 5097​​ build:​​ EBF​​ 21406)

3.​​ Copy​​ same​​ version​​ of​​ N41​​ to​​ laptop​​ \Source\NVLT​​ folder

4.​​ Share​​ \Source\NVLT​​ folder​​ as​​ designated​​ drive​​ letter​​ (usually​​ N​​ or​​ Z)

5.​​ Update​​ N:\NVLT\nvlt.ini​​ file

  • check​​ values​​ in​​ [Database]​​ section:​​ DBMS,​​ Database,​​ LogId,​​ LogPassword(encrypted),​​ DBParm

  • check​​ values​​ in​​ [userInfo]​​ section:​​ t1,​​ t1​​ should​​ be​​ empty

  • check​​ value​​ in​​ [version​​ section:​​ server​​ ->​​ shared​​ drive​​ folder

6.​​ Run​​ N:\NVLT\n41upd.exe​​ to​​ install​​ N41

 

N41​​ &​​ images​​ folder​​ synchronization​​ with​​ main​​ N41

1.​​ Create​​ sync_n41.bat

Ex)​​ when​​ main​​ server​​ name​​ is​​ N41-SERVER​​ and​​ laptop​​ source​​ folder​​ is​​ in​​ D:​​ drive

copy​​ /Y​​ D:\Source\NVLT\nvlt.ini​​ D:\Source\

robocopy​​ /S​​ \\N41-SERVER\Source\NVLT​​ D:\Source\NVLT

copy​​ /Y​​ D:\Source\nvlt.ini​​ D:\Source\NVLT\

2.​​ Create​​ sync_images.bat

Ex)​​ when​​ main​​ server​​ name​​ is​​ N41-SERVER​​ and​​ laptop​​ source​​ folder​​ is​​ in​​ D:​​ drive

robocopy​​ /S​​ \\N41-SERVER\Source\IMAGES​​ D:\Source\IMAGES​​ /XD​​ USPS

3.​​ Create​​ shortcut​​ of​​ sync_n41.bat​​ and​​ sync_images.bat​​ in​​ Desktop