Hello friend, In this post i would like share solution of one small problem, which occurs many times in SQL Server.
When we restore Database to any other server and try to create database diagram then it does not allow to create database diagram and its give error

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
Solution is very small. just execute below query:
Replace MYDB with your DB name then execute the query
ALTER AUTHORIZATION ON DATABASE::MYDB TO sa
After executing above query we can create DB diagram
You also like to know about:
- Do you know what happens when you hit url www.goolge.com?
- Know about Debouncing & Throttling
- AngularJS advanced trick and techniques
- Restrict input to allow only required value (jQuery plugin for input type validation)
- Spread operator or Rest parameter or Ellipsis in JavaScript
- Why call and apply two methods available in JavaScript
- Automatic Form Input Validation for complete site
- Number of ways you can create function in JavaScript +what are they called
- JavaScript Native objects
- How to Create private function in JavaScript
- functions as first class object in JavaScript
- Object Oriented concept in JavaScript
- Advanced JavaScript questions
- One good way to declare Global Variables in JavaScript
- how to align elements in a row with equal space around
- Closures in JavaScript
- AJAX call in AngularJS for cross domain service using JSONP
- Cross Site Scripting in WCF Web Service. How to use AJAX in JavaScript to Get/Consume JSON from WCF in C#
- How to add AngularJS in rails application
- Git configuration all about
- Pass XML file in stored procedure as a input parameter from C#
- XML Parser in SQL Server (T-SQL), How to parse XML in SQL
- Wish your friend with your own words and love
- Create Message in Hindi by typing in Hinglish
- Convert Multiline Text Into Single Line for HTML page