Jason Parks 的个人资料Jason Parks SharePoint &...日志列表 工具 帮助

日志


2月23日

Restoring a database to SQL 2005 breaks Diagrams Support

Just ran into this issue...here's the fix....
 
I restored a SQL 2000 db to SQL 2005, everything went smooth.  When I tried to build a Database Diagram, I got the following error
 
************************************************************
Database diagram support objects cannot be installed because this database
does not have a valid owner. To continue, first use the Files page of the
Database Properties dialog box or the ALTER AUTHORIZATION statement to set
the database owner to a valid login, then add the database diagram support
objects.
************************************************************
 
Here's the Fix
 
  1. Run the following query:      EXEC sp_dbcmptlevel 'newDatabase', '90';

  2. Then, execute:

ALTER AUTHORIZATION ON DATABASE::[newDatabase] TO newUser
go
use [newDatabase]
go
EXECUTE AS USER = N'dbo' REVERT
go

I used the "sa" account to be safe, then changed the owner once more afterward using standard methods.


2月14日

SQL 2005 Services and VPC

For those of you who have to live by building VPC's on Virtual PC 2004, you may have installed the Microsoft Loopback Adapter to connect the Host PC to the Virtual PC.
 
(To add the Loopback Adapter, run through an "Add Hardware Wizard" and choose the Microsoft Driver)
 
After installing it on one of my laptops with .NET 2.0 and SQL 2005, it completely crushed the both the Database Engine and the SQL Agent services, giving me an "unable to start service" error"for any account be it system or user.
 
I disabled the Loopback Adapter (working backwards) and that didn't help.  Then uninstalled the LA and Voila!  Everything was back to normal.
 
I'll get to the bottom of this later, but heads up in the meantime.
 
 
12月10日

Adventure Works Samples for SQL 2005

Don't think that you can simply add the "install sample databases" option to your SQL Server 2005 install...to make a long story short, the databases and sample applications will be placed on your hard drive, but you will have to run through a wizard to actually attach the sample databases to your SQL Server and manually deploy the sample applications via the VS IDE...