Databases Reference
In-Depth Information
You cannot create a user with the same name as the administrator login. that's because the administrator login
is already mapped to user dbo. You can find the administrator login in the properties pane in Figure 1-8 .
Note
Assigning Access Rights
So far, you've created the login account in the master database and the user account in the user database. But this user
account hasn't been assigned any access rights.
To allow the test account to have unlimited access to the selected user database, you need to assign the user to
the db_owner group :
EXEC sp_addrolemember 'db_owner', 'test'
At this point, you're ready to use the test account to create tables, views, stored procedures, and more.
in SQL Server, user accounts are automatically assigned to the public role. however, in SQL database the public
role can't be assigned to user accounts for enhanced security. as a result, specific access rights must be granted in order
to use a user account.
Note
Understanding Billing for SQL Database
SQL Database is a pay-as-you-go model, which includes a monthly fee based on the cumulative number and size of
your databases consumed daily, and a usage fee based on actual bandwidth usage. With SQL Database you pay for
what you use; so a 7GB database instance will be cheaper than an 8GB database instance. And as you might expect,
the cost per GB of space used goes down with larger database sizes. So it is cheaper to have one 100GB database
instance than two 50GB database instances. Also, as of this writing, when the consuming application of a SQL
Database instance is deployed as a Windows Azure application or service, and it belongs to the same geographic
region as the database, the bandwidth fee is waived.
To view your current bandwidth consumption and the databases you've provisioned from a billing standpoint,
you can run the following commands:
SELECT * FROM sys.database_usage -- databases defined
SELECT * FROM sys.bandwidth_usage -- bandwidth
The first statement returns the number of databases available per day of a specific type: Web or Business
edition. This information is used to calculate your monthly fee. The second statement shows a breakdown of hourly
consumption per database.
Note that information stored in this database is available for a period of time, but is eventually purged by
Microsoft. You should be able to view up to three months of data in this table.
Figure 1-16 shows a sample output of the statement returning bandwidth consumption. This statement returns
the following information:
 
 
Search WWH ::




Custom Search