Interview Questions Headline Animator

Saturday, May 30, 2009

Does not have a valid user

“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”

You are sitting at home, working on your work laptop, you have a deadline to meet, give an entity relationship diagram for your technical specification document for the module you are working on. So you decide to create a temporary database on your machine itself and then generate a database diagram.

You try to create the diagram and this is the error message you get. You go check the “Files” page of the database properties and it rightly contains your office alias. you refresh it and it still doesn’t work. You think it is some security / privilege issue. You check the Securities tab and everything is in order. It still doesn’t work.

You distinctly remember it to be working when you tried it yesterday at work. It just doesn’t budge now. Wonder what’s wrong.

The problem is you were at work yesterday which you are not now. Meaning you are not on the corporate network and you don’t have the Domain Server available. SQL Server tries to validate your credentials with the Domain Server. It doesn’t find it. If you have any means to get on to your corporate network, like RAS, perhaps, then you should and you will see it will work like magic.

Thursday, May 28, 2009

Xsd to Database

There are times when you have to work with XML. Yes those dreadful times. Specially the times when you get data as XML. And not just master data you sometimes get transactional data in XML. Think about it. How much worse can it get if you had to work with transactional data, and sync it with the database?

I am working on something in that direction. Although I haven’t finalized the approach yet, but it would involve creating an xsd, converting the xsd into datasets and then moving the data into the database.

But have you wondered how you would create a database that is similar to the xsd? Of course you won’t hand code it? Smart developers use smart tools. I found this cool tool that does it all for me. it is called XSD2DB. Isn’t that an intuitive name? It is available download for here.