Innitec's Unofficial Citrix Blog

you've got questions, we've got answers

How to Redeploy XenDesktop Without Re-Installing

leave a comment »

To clean the environment and remove the database, perform the following steps:

Load a PowerShell window as a full administrator (this is the administrator that was used to previous deploy XenDesktop)
Run the following command to initialise the PowerShell environment.
Add-PSSnapin Citrix.*
Inform the services to not use a database:
Set-ConfigDBConnection -DBConnection $null
Set-AcctDBConnection -DBConnection $null
Set-HypDBConnection -DBConnection $null
Set-ProvDBConnection -DBConnection $null
Set-PvsVmDBConnection -DBConnection $null
Set-BrokerDBConnection -DBConnection $null
Make sure these commands are run on every Desktop Delivery Controller that was previously set up to use the same database or deployment.
You should now have no connections on the database. Go to the database server and drop the database.
Now that the database has been dropped. Go to the first (or only) XenDesktop Deployment Controller and restart Desktop Studio. Desktop Studio will load with the initial setup options, following these options as if you have just installed XenDesktop.

source: http://support.citrix.com/article/CTX127421

 

Note: Different versions of SQLExpress store the sqlcmd command in different directories. It’s easiest to use Windows Explorer to search C:\Program Files\Microsoft SQL Server for the correct location.

  • Change to the binary directory where sqlcmd resides:
    cd \Program Files\Microsoft SQL Server\100\Tools\Binn<enter>
  • Connect to the local SQLExpress database instance:
    sqlcmd -S localhost\SQLEXPRESS<enter>
  • List the databases to determine the name of the database to drop:
    sp_databases<enter>
    go<enter>
  • Drop the database
    drop database CitrixXenDesktopDB<enter>
    go<enter>
  • List the databases again to validate it is no longer there:
    sp_databases<enter>
    go<enter>
  • Exit sqlcmd:
    exit<enter>
http://www.danieletosatto.com/2011/05/10/resetting-the-xendesktop-5-sqlexpress-database/
Advertisement

Written by Nicolas Lin

April 25, 2011 at 2:03 am

Posted in xendesktop

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.