Create a SQL Server Database and User for vCenter Server
2016-12-08 11:32
609 查看
We will begin with SQL Server Database creation.
Login to SQL Server Management Studio as user with administrative privileges. Once you will see login screen connect to SQL Server Management Studio by selecting correct authentication type and proper account. In my case it is domain user which I used to installSQL Server.
Open vCenter Server installation media and navigate to /vCenter-Server/dbschema/DB_and_schema_creation_scripts_MSSQL.txt file.
Please remember to change location of database file and log file. Adjust vpxuser password – I highlighted it for you.
Remember that by default SQL Server use strong password policy and if you will not meet complexity of password SQL Query will fail. You can read more about it on Microsoft website – https://msdn.microsoft.com/en-us/library/ms161959(v=sql.120).aspx.
Below you will find adjusted query with database file and log location changed.
use [master]
go
CREATE DATABASE [VCDB] ON PRIMARY
(NAME = N'vcdb', FILENAME = N'<strong>H:\Program Files\Microsoft SQL Server\MSSQLSERVER\MSSQL\Data\VCDB.mdf</strong>', SIZE = 10MB, FILEGROWTH = 10% )
LOG ON
(NAME = N'vcdb_log', FILENAME = N'<strong>I:\Program Files\Microsoft SQL Server\MSSQLSERVER\MSSQL\Data\VCDB.ldf</strong>', SIZE = 1000KB, FILEGROWTH = 10%)
COLLATE SQL_Latin1_General_CP1_CI_AS
go
use VCDB
go
CREATE LOGIN [vpxuser] WITH PASSWORD=N'<strong>!long_and_complex_password1</strong>', DEFAULT_DATABASE=VCDB, DEFAULT_LANGUAGE=us_english, CHECK_POLICY=OFF
go
CREATE USER [vpxuser] for LOGIN [vpxuser]
go
use MSDB
go
CREATE USER [vpxuser] for LOGIN [vpxuser]
go
Click New Query and paste script from above.
After that click execute and wait for script to complete.
Next step is to grant user we created – in my case vpxuser db_owner rights to VCDB and MSDB databases. We will do it simply by clicking to Logins and
selecting vpxuser.
Right mouse button click on vpxuser. Select User
Mapping, choose msbd and assign db_owner role membership and click ok.
Once we granted vpxuser db_owner rights we can create ODBC connection for vCenter Server installation. In order to do it navigate to Administrative
Tools and select ODBC Data Sources (64-bit).
Select System DSN and click Add.
Choose SQL Server Native Client 11.0 and click Finish.
We need to provide name for vCenter Server Database, optional description and to which SQL Server we would like to connect.
Click Next and select desired SQL Server authentication – I use Integrated Windows authentication. Click next.
Change default database to one we created before – in my case VCDB and click next.
If you know what you are doing you can adjust some settings – otherwise click Finish.
Last step is to test data source connectivity. Just click on Test Data Source and if you configured everything correctly you should see success
as result.
Final word
We managed to finish vCenter Server database creation and SQL Server configuration and we are ready to do vCenter Server installation. As you probably suspect this will be done in third part which you can find here: http://wojcieh.net/vmware-vcenter-server-6-on-windows-server-2012-r2-with-microsoft-sql-server-2014-part-3/.
相关文章推荐
- Northwind and pubs Sample Databases for SQL Server 2000
- Database user and Sqlserver system user
- create sqlserver login user and add it to certain db user (sqlserver authentication)
- The SQL Server Service Broker for the current database is not enabled, and as a result query notifications are not supported.
- Create XML Files Out Of SQL Server With SSIS And FOR XML Syntax
- SQL Server User-defined Function Create and Call 與Stored Procedures 不同
- Create country table and insert all the countries script for SQL Server
- Problem to create "New Database Diagram" in Microsoft SQL Server Management Studio for SQL Server 2012
- create a first user and a first database for him in mysql
- SQL Server Database Login and User
- Northwind and pubs Sample Databases for SQL Server 2000
- Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance
- Sample Databases for SQL Server 2000/2005
- Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.
- 《Microsoft Sql server 2008 Internals》读书笔记--第三章Databases and Database Files(1)
- Restore SQL Server 2005 error : "The tail of the log for the database "TEST1" has not been backed up."
- use jscript Create a SQL Server database
- [翻译]SQL Server And XML: FOR XML EXPLICIT - Part 3
- SQL Server script to rebuild all indexes for all tables and all databases
- Stored Procedures, Triggers And User Defined Functions on DB2 Universal Database for Iseries