{"id":317,"date":"2012-01-20T11:34:03","date_gmt":"2012-01-20T10:34:03","guid":{"rendered":"http:\/\/www.bussink.ch\/?p=317"},"modified":"2018-05-23T18:00:17","modified_gmt":"2018-05-23T16:00:17","slug":"create-vcenter-database-quickly-with-transact-sql","status":"publish","type":"post","link":"https:\/\/www.bussink.ch\/?p=317","title":{"rendered":"Create vCenter database quickly with Transact-SQL"},"content":{"rendered":"<p>Creating new databases for VMware vCenter is something I have to do over and over again. I use mostly Microsoft SQL Server 2008 R2 so here are six quick procedures to simplify the creation and make all your vCenter databases to the same standard. I keep my Transact-SQL scripts in Evernote, so I just need to make six Copy &amp; Paste and my vCenter database is created within 3 minutes. You can find the Transact-SQL to download at the bottom of this post.<\/p>\n<p>My general rule when I create the VMware vCenter database is to have my user database on a separate disk from the operating system. This disk is formatted with 64K block size. SQL Server works with two specific IO request size 8K and 64K in general, so having 64K block size is optimum for SQL Server databases (See <a title=\"Disk Partition Alignment Best Practices for SQL Server\" href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/dd758814(v=sql.100).aspx\" target=\"_blank\">Disk partition alignment Best Practice for SQL Server<\/a> ). I usually create a directory path for my SQL database D:\\Microsoft SQL Server in which I will create two directories for the vCenter databses, vcenter-server and vcenter-update-manager.<\/p>\n<div id=\"attachment_321\" style=\"width: 310px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.bussink.ch\/wp-content\/uploads\/\/2012\/01\/SQL-Server-Directory-Structure.png\"><img aria-describedby=\"caption-attachment-321\" loading=\"lazy\" class=\"size-medium wp-image-321 \" title=\"SQL Server Directory Structure\" alt=\"\" src=\"http:\/\/www.bussink.ch\/wp-content\/uploads\/\/2012\/01\/SQL-Server-Directory-Structure-300x118.png\" width=\"300\" height=\"118\" srcset=\"https:\/\/www.bussink.ch\/wp-content\/uploads\/2012\/01\/SQL-Server-Directory-Structure-300x118.png 300w, https:\/\/www.bussink.ch\/wp-content\/uploads\/2012\/01\/SQL-Server-Directory-Structure.png 742w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-321\" class=\"wp-caption-text\">Microsoft SQL Server directory structure for User Databaes<\/p><\/div>\n<p>Using the Microsoft SQL Server Management Studio interface we can start a New Query, in which we will add the Transact-SQL code.<\/p>\n<div id=\"attachment_327\" style=\"width: 310px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.bussink.ch\/wp-content\/uploads\/\/2012\/01\/SQL-Server-Management-Studio-New-Query.png\"><img aria-describedby=\"caption-attachment-327\" loading=\"lazy\" class=\"size-medium wp-image-327  \" title=\"SQL Server Management Studio - Open a New Query\" alt=\"\" src=\"http:\/\/www.bussink.ch\/wp-content\/uploads\/\/2012\/01\/SQL-Server-Management-Studio-New-Query-300x153.png\" width=\"300\" height=\"153\" srcset=\"https:\/\/www.bussink.ch\/wp-content\/uploads\/2012\/01\/SQL-Server-Management-Studio-New-Query-300x153.png 300w, https:\/\/www.bussink.ch\/wp-content\/uploads\/2012\/01\/SQL-Server-Management-Studio-New-Query.png 724w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-327\" class=\"wp-caption-text\">SQL Server Management Studio &#8211; Open a New Query<\/p><\/div>\n<p>Now let&#8217;s insert the Transact-SQL script to create the new vcenter-server database. My database settings limit the database to grow past 16GB, and increases the database as it grows by blocks of 512MB. The initial size starts at 1GB. The code below is a bit wide for this blog, but you can find the full Transact-SQL code at the bottom.<\/p>\n<div><span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">USE<\/span>\u00a0<span style=\"color: #010101; font-family: Courier New; font-size: x-small;\">[master]<\/span><\/div>\n<div align=\"left\"><span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">GO<\/span><\/div>\n<div align=\"left\"><span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">CREATE<\/span>\u00a0<span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">DATABASE<\/span>\u00a0<span style=\"color: #010101; font-family: Courier New; font-size: x-small;\">[vcenter-server]<\/span>\u00a0<span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">on<\/span>\u00a0<span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">PRIMARY<\/span><\/div>\n<div align=\"left\"><span style=\"color: #808080; font-family: Courier New; font-size: x-small;\">(<\/span><span style=\"color: #010101; font-family: Courier New; font-size: x-small;\">NAME<\/span>\u00a0<span style=\"color: #808080; font-family: Courier New; font-size: x-small;\">=<\/span>\u00a0<span style=\"color: #ff0000; font-family: Courier New; font-size: x-small;\">N&#8217;vcenter-server&#8217;<\/span><span style=\"color: #808080; font-family: Courier New; font-size: x-small;\">,<\/span>\u00a0<span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">FILENAME<\/span>\u00a0<span style=\"color: #808080; font-family: Courier New; font-size: x-small;\">=<\/span>\u00a0<span style=\"color: #ff0000; font-family: Courier New; font-size: x-small;\">N&#8217;D:\\Microsoft SQL Server\\vcenter-server\\vcenter-server.mdf&#8217;<\/span><span style=\"color: #808080; font-family: Courier New; font-size: x-small;\">,<\/span>\u00a0<span style=\"color: #010101; font-family: Courier New; font-size: x-small;\">SIZE<\/span>\u00a0<span style=\"color: #808080; font-family: Courier New; font-size: x-small;\">=<\/span>\u00a0<span style=\"color: #010101; font-family: Courier New; font-size: x-small;\">1024MB<\/span><span style=\"color: #808080; font-family: Courier New; font-size: x-small;\">,<\/span>\u00a0<span style=\"color: #010101; font-family: Courier New; font-size: x-small;\">MAXSIZE<\/span>\u00a0<span style=\"color: #808080; font-family: Courier New; font-size: x-small;\">=<\/span>\u00a0<span style=\"color: #010101; font-family: Courier New; font-size: x-small;\">16384MB<\/span><span style=\"color: #808080; font-family: Courier New; font-size: x-small;\">,<\/span>\u00a0<span style=\"color: #010101; font-family: Courier New; font-size: x-small;\">FILEGROWTH<\/span>\u00a0<span style=\"color: #808080; font-family: Courier New; font-size: x-small;\">=<\/span>\u00a0<span style=\"color: #010101; font-family: Courier New; font-size: x-small;\">512MB<\/span><span style=\"color: #808080; font-family: Courier New; font-size: x-small;\">)<\/span><\/div>\n<div align=\"left\"><span style=\"color: #ff00ff; font-family: Courier New; font-size: x-small;\">LOG<\/span>\u00a0<span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">ON<\/span><\/div>\n<div align=\"left\"><span style=\"color: #808080; font-family: Courier New; font-size: x-small;\">(<\/span><span style=\"color: #010101; font-family: Courier New; font-size: x-small;\">NAME<\/span>\u00a0<span style=\"color: #808080; font-family: Courier New; font-size: x-small;\">=<\/span>\u00a0<span style=\"color: #ff0000; font-family: Courier New; font-size: x-small;\">N&#8217;vcenter-server_log&#8217;<\/span><span style=\"color: #808080; font-family: Courier New; font-size: x-small;\">,<\/span>\u00a0<span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">FILENAME<\/span>\u00a0<span style=\"color: #808080; font-family: Courier New; font-size: x-small;\">=<\/span>\u00a0<span style=\"color: #ff0000; font-family: Courier New; font-size: x-small;\">N&#8217;D:\\Microsoft SQL Server\\vcenter-server\\vcenter-server.ldf&#8217;<\/span><span style=\"color: #808080; font-family: Courier New; font-size: x-small;\">,<\/span>\u00a0<span style=\"color: #010101; font-family: Courier New; font-size: x-small;\">SIZE<\/span>\u00a0<span style=\"color: #808080; font-family: Courier New; font-size: x-small;\">=<\/span>\u00a0<span style=\"color: #010101; font-family: Courier New; font-size: x-small;\">512MB<\/span><span style=\"color: #808080; font-family: Courier New; font-size: x-small;\">,<\/span>\u00a0<span style=\"color: #010101; font-family: Courier New; font-size: x-small;\">MAXSIZE<\/span>\u00a0<span style=\"color: #808080; font-family: Courier New; font-size: x-small;\">=<\/span>\u00a0<span style=\"color: #010101; font-family: Courier New; font-size: x-small;\">2048MB<\/span><span style=\"color: #808080; font-family: Courier New; font-size: x-small;\">,<\/span>\u00a0<span style=\"color: #010101; font-family: Courier New; font-size: x-small;\">FILEGROWTH<\/span>\u00a0<span style=\"color: #808080; font-family: Courier New; font-size: x-small;\">=<\/span>\u00a0<span style=\"color: #010101; font-family: Courier New; font-size: x-small;\">256MB<\/span><span style=\"color: #808080; font-family: Courier New; font-size: x-small;\">)<\/span><\/div>\n<div align=\"left\"><span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">COLLATE<\/span>\u00a0SQL_Latin1_General_CP1_CI_AS<\/div>\n<div align=\"left\"><span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">GO<\/span><\/div>\n<div id=\"attachment_328\" style=\"width: 310px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.bussink.ch\/wp-content\/uploads\/\/2012\/01\/vCenter-SQL-Database-creation-with-settings.png\"><img aria-describedby=\"caption-attachment-328\" loading=\"lazy\" class=\"size-medium wp-image-328 \" title=\"vCenter SQL Database creation with settings\" alt=\"\" src=\"http:\/\/www.bussink.ch\/wp-content\/uploads\/\/2012\/01\/vCenter-SQL-Database-creation-with-settings-300x77.png\" width=\"300\" height=\"77\" srcset=\"https:\/\/www.bussink.ch\/wp-content\/uploads\/2012\/01\/vCenter-SQL-Database-creation-with-settings-300x77.png 300w, https:\/\/www.bussink.ch\/wp-content\/uploads\/2012\/01\/vCenter-SQL-Database-creation-with-settings-1024x264.png 1024w, https:\/\/www.bussink.ch\/wp-content\/uploads\/2012\/01\/vCenter-SQL-Database-creation-with-settings.png 1508w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-328\" class=\"wp-caption-text\">vCenter SQL Database creation with settings<\/p><\/div>\n<p>Lets now change the Recovery mode of our database for our needs, to Simple.<\/p>\n<div align=\"left\"><span style=\"color: #0000ff; font-family: 'Courier New';\"><span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">USE<\/span>\u00a0<span style=\"color: #010101; font-family: Courier New; font-size: x-small;\">[vcenter-server]<\/span><\/span><\/div>\n<div align=\"left\"><span style=\"color: #0000ff; font-family: 'Courier New';\"><span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">GO<\/span><\/span><\/div>\n<div align=\"left\"><span style=\"color: #0000ff; font-family: 'Courier New';\"><span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">ALTER<\/span>\u00a0<span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">DATABASE<\/span>\u00a0<span style=\"color: #010101; font-family: Courier New; font-size: x-small;\">[vcenter-server]<\/span>\u00a0<span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">SET<\/span>\u00a0<span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">RECOVERY<\/span>\u00a0<span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">SIMPLE<\/span><span style=\"color: #808080; font-family: Courier New; font-size: x-small;\">;<\/span><\/span><\/div>\n<div align=\"left\"><span style=\"color: #0000ff; font-family: 'Courier New';\"><span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">GO<\/span><\/span><\/div>\n<div id=\"attachment_331\" style=\"width: 310px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.bussink.ch\/wp-content\/uploads\/\/2012\/01\/vCenter-SQL-Database-alter-recovery-mode.png\"><img aria-describedby=\"caption-attachment-331\" loading=\"lazy\" class=\"size-medium wp-image-331 \" title=\"vCenter SQL Database alter recovery mode to Simple\" alt=\"\" src=\"http:\/\/www.bussink.ch\/wp-content\/uploads\/\/2012\/01\/vCenter-SQL-Database-alter-recovery-mode-300x124.png\" width=\"300\" height=\"124\" srcset=\"https:\/\/www.bussink.ch\/wp-content\/uploads\/2012\/01\/vCenter-SQL-Database-alter-recovery-mode-300x124.png 300w, https:\/\/www.bussink.ch\/wp-content\/uploads\/2012\/01\/vCenter-SQL-Database-alter-recovery-mode.png 737w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-331\" class=\"wp-caption-text\">vCenter SQL Database alter recovery mode to Simple<\/p><\/div>\n<p>Lets create a dedicated vCenter database user such as vpxdb.<\/p>\n<div align=\"left\"><span style=\"color: #0000ff; font-family: 'Courier New';\"><span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">USE<\/span>\u00a0<span style=\"color: #010101; font-family: Courier New; font-size: x-small;\">[vcenter-server]<\/span><\/span><\/div>\n<div align=\"left\"><span style=\"color: #0000ff; font-family: 'Courier New';\"><span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">GO<\/span><\/span><\/div>\n<div align=\"left\"><span style=\"color: #0000ff; font-family: 'Courier New';\"><span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">CREATE<\/span>\u00a0<span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">LOGIN<\/span>\u00a0<span style=\"color: #010101; font-family: Courier New; font-size: x-small;\">[vpxdb]<\/span>\u00a0<span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">WITH<\/span>\u00a0<span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">PASSWORD<\/span>\u00a0<span style=\"color: #808080; font-family: Courier New; font-size: x-small;\">=<\/span>\u00a0<span style=\"color: #ff0000; font-family: Courier New; font-size: x-small;\">&#8216;insert-a-password-here&#8217;<\/span><span style=\"color: #808080; font-family: Courier New; font-size: x-small;\">,<\/span>\u00a0<span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">DEFAULT_DATABASE<\/span>\u00a0<span style=\"color: #808080; font-family: Courier New; font-size: x-small;\">=<\/span>\u00a0<span style=\"color: #010101; font-family: Courier New; font-size: x-small;\">[vcenter-server]<\/span><span style=\"color: #808080; font-family: Courier New; font-size: x-small;\">,<\/span>\u00a0<span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">DEFAULT_LANGUAGE<\/span><span style=\"color: #808080; font-family: Courier New; font-size: x-small;\">=<\/span><span style=\"color: #010101; font-family: Courier New; font-size: x-small;\">[us_english]<\/span><span style=\"color: #808080; font-family: Courier New; font-size: x-small;\">,<\/span>\u00a0<span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">CHECK_POLICY<\/span><span style=\"color: #808080; font-family: Courier New; font-size: x-small;\">=<\/span><span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">OFF<\/span><\/span><\/div>\n<div align=\"left\"><span style=\"color: #0000ff; font-family: 'Courier New';\"><span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">GO<\/span><\/span><\/div>\n<div align=\"left\"><span style=\"color: #0000ff; font-family: 'Courier New';\"><span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">CREATE<\/span>\u00a0<span style=\"color: #ff00ff; font-family: Courier New; font-size: x-small;\">USER<\/span>\u00a0<span style=\"color: #010101; font-family: Courier New; font-size: x-small;\">[vpxdb]<\/span>\u00a0<span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">for<\/span>\u00a0<span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">LOGIN<\/span>\u00a0<span style=\"color: #010101; font-family: Courier New; font-size: x-small;\">[vpxdb]<\/span><\/span><\/div>\n<div align=\"left\"><span style=\"color: #0000ff; font-family: 'Courier New';\"><span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">GO<\/span><\/span><\/div>\n<div id=\"attachment_332\" style=\"width: 310px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.bussink.ch\/wp-content\/uploads\/\/2012\/01\/vCenter-SQL-Database-user-creation.png\"><img aria-describedby=\"caption-attachment-332\" loading=\"lazy\" class=\"size-medium wp-image-332  \" title=\"SQL Database vpxdb user creation\" alt=\"\" src=\"http:\/\/www.bussink.ch\/wp-content\/uploads\/\/2012\/01\/vCenter-SQL-Database-user-creation-300x63.png\" width=\"300\" height=\"63\" srcset=\"https:\/\/www.bussink.ch\/wp-content\/uploads\/2012\/01\/vCenter-SQL-Database-user-creation-300x63.png 300w, https:\/\/www.bussink.ch\/wp-content\/uploads\/2012\/01\/vCenter-SQL-Database-user-creation-1024x216.png 1024w, https:\/\/www.bussink.ch\/wp-content\/uploads\/2012\/01\/vCenter-SQL-Database-user-creation.png 1450w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-332\" class=\"wp-caption-text\">SQL Database vpxdb user creation<\/p><\/div>\n<p>Now we let the newly create database user connect to the vCenter database.<\/p>\n<div align=\"left\"><span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">USE<\/span>\u00a0<span style=\"color: #010101; font-family: Courier New; font-size: x-small;\">[msdb]<\/span><\/div>\n<div align=\"left\"><span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">GO<\/span><\/div>\n<div align=\"left\"><span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">CREATE<\/span>\u00a0<span style=\"color: #ff00ff; font-family: Courier New; font-size: x-small;\">USER<\/span>\u00a0<span style=\"color: #010101; font-family: Courier New; font-size: x-small;\">[vpxdb]<\/span>\u00a0<span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">FOR<\/span>\u00a0<span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">LOGIN<\/span>\u00a0<span style=\"color: #010101; font-family: Courier New; font-size: x-small;\">[vpxdb]<\/span><\/div>\n<div align=\"left\"><span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">GO<\/span><\/div>\n<div id=\"attachment_333\" style=\"width: 310px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.bussink.ch\/wp-content\/uploads\/\/2012\/01\/vCenter-SQL-Database-user-login.png\"><img aria-describedby=\"caption-attachment-333\" loading=\"lazy\" class=\"size-medium wp-image-333 \" title=\"SQL Database vpxdb user login for vCenter Database\" alt=\"\" src=\"http:\/\/www.bussink.ch\/wp-content\/uploads\/\/2012\/01\/vCenter-SQL-Database-user-login-300x152.png\" width=\"300\" height=\"152\" srcset=\"https:\/\/www.bussink.ch\/wp-content\/uploads\/2012\/01\/vCenter-SQL-Database-user-login-300x152.png 300w, https:\/\/www.bussink.ch\/wp-content\/uploads\/2012\/01\/vCenter-SQL-Database-user-login.png 574w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-333\" class=\"wp-caption-text\">SQL Database vpxdb user login for vCenter Database<\/p><\/div>\n<p>We allow the newly create vpxdb database user have db_owner rights to the [MSDB] database, so that the user can create the SQL Agent jobs in SQL.<\/p>\n<div align=\"left\"><span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">USE<\/span>\u00a0<span style=\"color: #010101; font-family: Courier New; font-size: x-small;\">[msdb]<\/span><\/div>\n<div align=\"left\"><span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">GO<\/span><\/div>\n<div align=\"left\"><span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">EXEC<\/span>\u00a0<span style=\"color: #800000; font-family: Courier New; font-size: x-small;\">sp_addrolemember<\/span>\u00a0<span style=\"color: #ff0000; font-family: Courier New; font-size: x-small;\">N&#8217;db_owner&#8217;<\/span><span style=\"color: #808080; font-family: Courier New; font-size: x-small;\">,<\/span>\u00a0<span style=\"color: #ff0000; font-family: Courier New; font-size: x-small;\">N&#8217;vpxdb&#8217;<\/span><\/div>\n<div align=\"left\"><span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">GO<\/span><\/div>\n<div id=\"attachment_335\" style=\"width: 310px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.bussink.ch\/wp-content\/uploads\/\/2012\/01\/vCenter-SQL-Database-user-vpxdb-db_owner-rights-to-msdb.png\"><img aria-describedby=\"caption-attachment-335\" loading=\"lazy\" class=\"size-medium wp-image-335 \" title=\"SQL Database user vpxdb db_owner rights to MSDB\" alt=\"\" src=\"http:\/\/www.bussink.ch\/wp-content\/uploads\/\/2012\/01\/vCenter-SQL-Database-user-vpxdb-db_owner-rights-to-msdb-300x210.png\" width=\"300\" height=\"210\" srcset=\"https:\/\/www.bussink.ch\/wp-content\/uploads\/2012\/01\/vCenter-SQL-Database-user-vpxdb-db_owner-rights-to-msdb-300x210.png 300w, https:\/\/www.bussink.ch\/wp-content\/uploads\/2012\/01\/vCenter-SQL-Database-user-vpxdb-db_owner-rights-to-msdb.png 633w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-335\" class=\"wp-caption-text\">SQL Database user vpxdb db_owner rights to MSDB<\/p><\/div>\n<p>And last we change the ownership of the vCenter Database for the vpxdb user.<\/p>\n<div align=\"left\"><span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">USE<\/span>\u00a0<span style=\"color: #010101; font-family: Courier New; font-size: x-small;\">[vcenter-server]<\/span><\/div>\n<div align=\"left\"><span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">GO<\/span><\/div>\n<div align=\"left\"><span style=\"color: #800000; font-family: Courier New; font-size: x-small;\">sp_addrolemember<\/span>\u00a0<span style=\"color: #010101; font-family: Courier New; font-size: x-small;\">[db_owner]<\/span><span style=\"color: #808080; font-family: Courier New; font-size: x-small;\">,<\/span><span style=\"color: #010101; font-family: Courier New; font-size: x-small;\">[vpxdb]<\/span><\/div>\n<div align=\"left\"><span style=\"color: #0000ff; font-family: Courier New; font-size: x-small;\">GO<\/span><\/div>\n<div id=\"attachment_336\" style=\"width: 310px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.bussink.ch\/wp-content\/uploads\/\/2012\/01\/vCenter-SQL-Database-user-vpxdb-db_owner-rights-to-vcenter-database.png\"><img aria-describedby=\"caption-attachment-336\" loading=\"lazy\" class=\"size-medium wp-image-336 \" title=\"SQL Database user vpxdb db_owner rights to vcenter-database\" alt=\"\" src=\"http:\/\/www.bussink.ch\/wp-content\/uploads\/\/2012\/01\/vCenter-SQL-Database-user-vpxdb-db_owner-rights-to-vcenter-database-300x148.png\" width=\"300\" height=\"148\" srcset=\"https:\/\/www.bussink.ch\/wp-content\/uploads\/2012\/01\/vCenter-SQL-Database-user-vpxdb-db_owner-rights-to-vcenter-database-300x148.png 300w, https:\/\/www.bussink.ch\/wp-content\/uploads\/2012\/01\/vCenter-SQL-Database-user-vpxdb-db_owner-rights-to-vcenter-database.png 613w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-336\" class=\"wp-caption-text\">SQL Database user vpxdb db_owner rights to vcenter-database<\/p><\/div>\n<p>You can find the all the Transact-SQL code in this simple text file <a title=\"vCenter-SQL-TransactSQL-database.txt\" href=\"http:\/\/www.bussink.ch\/vCenter-SQL-TransactSQL-database.txt\" target=\"_blank\">vCenter-SQL-TransactSQL-database.txt<\/a>. If you want the same type of Transact-SQL script to help you setup the vCenter Update Manager database check out this text file <a title=\"vCenter-Update-Manager-SQL-TransactSQL-database\" href=\"http:\/\/www.bussink.ch\/vCenter-Update-Manager-SQL-TransactSQL-database\" target=\"_blank\">vCenter-Update-Manager-SQL-TransactSQL-database.txt<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Creating new databases for VMware vCenter is something I have to do over and over again. I use mostly Microsoft SQL Server 2008 R2 so here are six quick procedures to simplify the creation and make all your vCenter databases to the same standard. I keep my Transact-SQL scripts in Evernote, so I just need [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":329,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[9],"tags":[28,19,29,30],"_links":{"self":[{"href":"https:\/\/www.bussink.ch\/index.php?rest_route=\/wp\/v2\/posts\/317"}],"collection":[{"href":"https:\/\/www.bussink.ch\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bussink.ch\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bussink.ch\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bussink.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=317"}],"version-history":[{"count":19,"href":"https:\/\/www.bussink.ch\/index.php?rest_route=\/wp\/v2\/posts\/317\/revisions"}],"predecessor-version":[{"id":1972,"href":"https:\/\/www.bussink.ch\/index.php?rest_route=\/wp\/v2\/posts\/317\/revisions\/1972"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bussink.ch\/index.php?rest_route=\/wp\/v2\/media\/329"}],"wp:attachment":[{"href":"https:\/\/www.bussink.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=317"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bussink.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=317"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bussink.ch\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=317"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}