Login to participate
Endpoint Management & Virtualization ArticlesRSS

Backstage Pass to the DS 6.9 Deployment Database, Part 1

dallasr's picture

Ever wonder where those options and settings you enable in the deployment console are stored? Or have you ever wanted to automate these settings? If you read on, you'll discover that most of the options you set from the console are stored directly in the deployment database, which means they can be automated simply be executing a SQL query against the database.

I put this article together for those that want to dig a little deeper with Deployment Server 6.9 and find out what is happening behind the scenes, specifically with the Deployment Database. In this particular article, I wanted to just take a look at some of the tables in the DS 6.9 database and how they correspond to the configurations you make through the deployment console. We'll look at 2 specific tables just to get the ball rolling on this topic: domain_accounts and aclient_prop.

First off, I'm using Deployment Server 6.9 with SQL Server Express 2005 and I'm using SQL Server Management Studio Express to explore through the eXpress database and perform queries against it. You can download Management Studio from Microsoft's website for free here: http://www.microsoft.com/downloads/details.aspx?Fa... Now, open up Management Studio and connect to your Deployment Server. Then expand the databases folder > eXpress > Tables folder.

I recommend you just start opening up a couple different tables (right click > Open table) just to get a general idea of what can be found where and how some things are represented in the database. For example, take a peak inside the computer table and the event table. The computer table contains, you guessed it, computers. In fact it contains all of the computers in your DS. The event table contains all of the jobs that are defined in your DS. Ok, now let's move on to the tables we will be focusing on in this article, first up ... the Domain_Accounts table.

Domain_Accounts -- This table contains accounts that are used by Deployment Server to add computers to a domain during configuration or imaging tasks. These accounts are normally added through the Deployment Console from the Tools > Options > Domain Accounts tab. The username and password values in this table are encrypted. However, if you know the encrypted values, and you inserted the encrypted forms directly into the table then the domain account will show up in its unencrypted form in the deployment console, but we'll get into these types of things more in a subsequent article.

Table columns explained:

  • Domain -- name of domain that that account will be used to join computers to
  • Username -- account name with access to join computers to this domain (ENCRYPTED)
  • Password -- password of above account (ENCRYPTED)

So to illustrate what is happening behind the scenes with this, in the screenshot below I am adding a Domain Account from the Deployment Console with the following information:

  • Domain = mydomain.com
  • Username = user1
  • Password = password

And here is the resulting information in the Domain_Accounts table:

That's it, so the neat part is that I can just add this record directly to the domain_accounts table in my deployment database instead of having to add it through the deployment console. This can really come in handy. Think about it, if you want to add 10 domain accounts for example, you can execute a single sql query that would run in less than a second and you'd be done instead of having to manually add the accounts inside the deployment console. Granted, having to add 10 domain accounts is not a common occurrence, but it does illustrate the point of how you can automate deployment console settings very quickly and easily.

Aclient_prop -- this table stores the aclient properties for each computer including the default aclient properties that are usually set through the Tools > Options > Agent Settings tab > Windows Agent Settings in the Deployment Console. Now if you open the aclient_prop table you will see an entry at the top with computer_id set to 0. The values for this record are all of the default settings that are normally set from Tools > Options > Agent Settings tab in the deployment console. All of the other entries in this table are settings specific to individual computers.

Note: When you enable the "Force new agents to take these default settings" option that is required before you can change the default settings through the console, the force_default_settings value in the database_info table is set to 1 as shown in the screen shots below. All of the other settings pertaining to the default agent settings are located in the aclient_prop table. I'll be digging deeper into the database_info table in a subsequent article, but for now you just need to know about the force_default_settings value.

Let's take a deeper look at a few key columns in this table. NOTE: This is not a complete list as I decided to just highlight a few key ones that you might be interested in. If there is a setting that you are interested in you can probably figure it out based on the name of the column in the database or just by experimenting (changing a setting through the console and then looking to see what value changed in the table, etc.)

  • tcp_addr -- Set to ip address or hostname of the deployment server you want the aclient to connect to. This is the Address/Hostname setting on the Server Connection tab in aclient properties
  • tcp_port -- set to port number of the deployment server you want the aclient to connect to. This corresponds to the port field on the Server Connection tab in aclient properties
  • use_hard_timeout -- set to 1 or 0 to Enable/Disable the Refresh Connection After Idle setting
  • hard_timeout -- set to x number of seconds for the "Refresh connection after idle x" option. Example, a value of 3600 would set this to 1 hour. 3600 seconds = 1 hour.
  • allow_remote_control -- set to 1 or 0 to Enable/Disable the "Allow this computer to be remote controlled" setting on the Access tab in aclient properties
  • prompt_remote_control -- set to 1 or 0 to Enable/Disable setting to Prompt user before remote controlling on the Access tab in aclient properties
  • prompt_reboot -- set to 1 or 0 to Enable/Disable setting to Prompt user before rebooting on the Access tab in aclient properties
  • seconds_to_wait -- Set to x number of seconds for the Time to Wait for user response setting on the Access tab in aclient properties
  • use_timeout -- set to 1 or 0 to Continue/Abort operation if no response setting on the Access tab in aclient properties
  • log_file -- set to 1 or 0 to Enable/Disable the "Save log information to text file" option on the Log File tab in aclient properties
  • log_filename -- set to full path of log file name, this corresponds to the File Name field on the Log File tab in aclient properties
  • log_size -- set to maximum size of the log file (in bits), this corresponds to the Maximum Size field on the Log File tab in aclient properties. Example, setting this field to 4194304 will make the Maximum Size 4096KB
  • log_errors -- set to 1 or 0 to Enable/Disable the "Log Errors" setting on the Log File tab in aclient properties
  • log_information -- set to 1 or 0 to Enable/Disable the "Log informational messages" setting on the Log File tab in aclient properties
  • allow_mod -- set to 1 or 0 to Enable/Disable "Password Protect admin properties from user" option on the Security Tab in aclient properties
  • client_id -- set to the password that you want to use to password protect the admin properties of the aclient. This corresponds to the Password/Confirm Password fields on the Security Tab in aclient settings. NOTE: the password is in its encrypted form.
  • force_reboot -- set to 1 or 0 to Enable/Disable the "Force all programs to close when shutting down" option on the Startup/Shutdown tab in aclient properties

So, hopefully this will get you interested in playing around with the Deployment Database a little more. Just start examining the different tables to get an understanding of what information the database is storing and how it is reflected in the deployment console. I'll be looking at some more tables in other articles and also how create a script to automate the configuration of your deployment server. Stay tuned!

DS 6.9 Deployment Database - A Backstage Pass - Index of Articles

Backstage Pass to the DS 6.9 Deployment Database, Part 2
 

daggy_b's picture

Thanks

Great article explaining the database side of DS 6.9. This will definately help with finding things in the database.