RE: Redundancy Vworkspace

Hi Paul,

Not a problem as I don't envisage the 'live' DB to die frequently but some form of HA would be preferable than clustering SQL currently. Yorker is wrong when he says 'Database Mirroring is supported' then?

Okay, when I look at the System DSN on the servers through the ODBC Administrator, be it a Connection Broker role or a Terminal Server role I don't see anything. Where is the ODBC information for the DB held so I can script a change over?

Cheers,

0 Kudos
Denis B
1 Copper

RE: Redundancy Vworkspace

Hi,

I do not know if this will help, but on lab, I mirrored sql (No witness yet ^ ^).

I created (on the broker) with ODBC Data source Administrator a systeme DSN for failover_Partner

And it work (when I failover manualy,pending witness).

I did not need to change the ODBC configuration from servers TS user test can connect (webaccess) after a failover sql.

screen of my draft doc

screen_Doc.JPGDenis

I continuing my test

any comments are welcome 🙂

0 Kudos

RE: Redundancy Vworkspace

Hi Dennis,

Good stuff... I;ve tried this also using the SQL Native clien but after a failover, manual also, I cannot get the vWorkspace console to connect... Checking in the 32bit version of ODBC Admin it fails saying

18-11-2010 11-04-09.jpg

I've added the PNADMIN account as an dbo on the mirrored "vworkspace_database" database and use "sa" as the account for mirroring.

Further help would be greatly received!

0 Kudos
Denis B
1 Copper

RE: Redundancy Vworkspace

Can you open the database mirror (after failover on principal) with you pnadmin account on the "sql management studio"  console?

your monitor mirroring is Synchronized?(no error?)

Denis

0 Kudos

RE: Redundancy Vworkspace

Caleb,

See if this .vbs script of mine helps but *please test before using* and modify as you see fit.  It will change the DSN and restart the required services.  Alternativly you could have both databases setup in the console on each broker and TS server.  You would then manully change the db (File > Database Configuration > Change DSN drop down) and restart the services.  I guess that would depend on how many servers you have though.

Paul

--------------------------------------------------------------------------------------------------

Const ERROR_SUCCESS = 0
Const ERROR_INSTALL_FAILURE = 1603
Const ERROR_FUNCTION_FAILED = 1627
Const CRITICAL_ERROR_ICON = 16

On Error Resume Next
   
'---------Restart Services-----------

MsgBox "Setting DSN", vbInformation + vbOKOnly

Dim oPNAdminSystem, sSQLServerName, sSAUserName, sSAPassword, sDatabaseName, sSQLLoginAccount, sSQLLoginPassword, sDataSourceName, sReturnMsg, oShell
  
Set oPNAdminSystem = CreateObject("pnadmin.system")

If wscript.agruments.count = 0 Then
     sSQLServerName = "SERVER\VWORKSPACE2"
     sDatabaseName = "vWorkspace_Database"
     sSQLLoginAccount = "pnadmin"
     sSQLLoginPassword = "password"
Else
     sSQLServerName = wscript.agruments(0)
     sDatabaseName = wscript.agruments(1)
     sSQLLoginAccount = wscript.agruments(2)
     sSQLLoginPassword = wscript.agruments(3)
End If
   
sDataSourceName = "vWorkspace Database"

If oPNAdminSystem.MiscFunctions.CreateDSN(sDataSourceName, sSQLServerName, sDatabaseName, sSQLLoginAccount, sSQLLoginPassword, sReturnMsg) Then
        Set oShell = CreateObject("WScript.Shell")
        oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\ODBC\ODBC.INI\ODBC Data Sources\" & sDataSourceName, "SQL Server", "REG_SZ"
        Set oShell = Nothing
        MsgBox "The data source was created successfully.", vbInformation + vbOKOnly, "Data Source Created Successfully"
Else  
        MsgBox "Failed to create the data source. Please verify that the specified connection parameters are correct.", vbExclamation + vbOKOnly, "Failed to Create Data Source"
End If
   
oPNAdminSystem.Disconnect

Set oPNAdminSystem = Nothing
 

'---------Restart Services-----------

Set objWMI = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
ArrSvcs = Array("pndcsvc", "pnregsvc", "pnbrksvc")
        
'Stop each service in the Array
For i = 0 to UBound(ArrSvcs) - 1
     Set colServices = objWMI.ExecQuery("Select * from Win32_Service where Name = '" & arrSvcs(i) & "'")
            
     For each service in colServices
         service.StopService()
     Next
  
     Do While numRet = "Stopped"
         numRet = funcCheckServiceState(objWMI, strSVCName)
         WScript.Sleep 1000   'check every second
     Loop
     WScript.Echo "Service " & ArrSvcs(i) & " has been stopped."
Next
  
'Start each service in the Array
For i = 0 to UBound(ArrSvcs) - 1
   Set colServices = objWMI.ExecQuery("Select * from Win32_Service where Name = '" & arrSvcs(i) & "'")
   For each service in colServices
      service.StartService()
   Next
  
   Do While numRet = "Started"
      numRet = funcCheckServiceState(objWMI, strSVCName)
      WScript.Sleep 1000   'check every second
   Loop
   WScript.Echo "Service " & ArrSvcs(i) & " has been started."
Next
  
Function funcCheckServiceState(objWMI, strSVCName)
   Set colServices = objWMI.ExecQuery("Select * from Win32_Service where Name = 'pndcsvc'")
   For each service in colServices
      funcCheckServiceState = service.State
   Next
End Function


WScript.Echo "Script has finsihed"

----------------------------------------------------------------------------------------------------------

0 Kudos

RE: Redundancy Vworkspace

Hi,

After granting the PNADMIN account sysadmin role on the server the connection issue has gone, but now I get the:

18-11-2010 12-33-25.jpg

error, which was posted here under the 'Changing vWorkspace Database' thread.

Any ideas?

Paul I'll look at the script after I've given up on this

0 Kudos
Denis B
1 Copper

RE: Redundancy Vworkspace

On my first Installation, i had the same problem,  but I've not succeeded to resolve (i post "How to change Database")

it's a right problem (schéma i think), but i did not insist .

if you find solution, .

Denis

0 Kudos

RE: Redundancy Vworkspace

Yeah, I'm stuck at that error, I've rebuilt, reinstalled, resecurity, banged head... but nothing I can do will get around this...

I guess I'll be looking at that script now

As my Connection brokers are 64-bit the ODBC key is at HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI

Problem is I can see the same error happening as the script does what I'm doing manually...

Watch this space!

0 Kudos

RE: Redundancy Vworkspace

OKay... I got it working with DB mirroring! without using any scripts!

Took some effort... but it works seamlessly! I'm very pleased!

Paul do you want me to email you the details?

0 Kudos
Highlighted
yorker1
1 Copper

RE: Redundancy Vworkspace

I’m currently out of the office on leave but will be checking e-mail periodically. I will return to the office on the 22nd November, 2010.

Stephen Yorke

QC Analyst 4 | Quest Software Smart Systems Management | www.quest.com<http://www.quest.com/>

T +1.902.442.5700 x 25729 | 5151 George Street, 12th Floor, Halifax, NS B3J 1M5

stephen.yorke@quest.com<mailto:Your.Name@quest.com

0 Kudos