studio NETSOULS

Applying Web To Your Business

When you restore a Microsoft SQL Server database on a different machine, you cannot access the database until you fix the permissions.

The problem is that the user in the database is an "orphan". This means that there is no login id or password associated with the user. This is true even if there is a login id that matches the user, since there is a GUID (called a SID in Microsoft-speak) that has to match as well.

This used to be a pain to fix, but currently (SQL Server 2000, SP3 and higher) there is a stored procedure that does.

You should execute the stored procedure as a database admin, with the restored database selected

--First, make sure that this is the problem. This will lists the orphaned users:
EXEC sp_change_users_login 'Report' 
 
--If you already have a login id and password for this user, fix it by doing: 
EXEC sp_change_users_login 'Auto_Fix', 'user' 
 
--If you want to create a new login id and password for this user, fix it by doing: 
EXEC sp_change_users_login 'Auto_Fix', 'user', 'login', 'password' 
  • Currently 0 /5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

A neat regular expression function to strip the passed string of all HTML Tags.

public static string StripHTML ( string value )
{
    // Strip the html tagstring
    pattern = "<(.|\n)+?>"; 
    string strOutput = string.Empty; 
 
    Regex regex = new Regex ( pattern, RegexOptions.IgnoreCase ); 
 
    // Replace all HTML tag matches with an empty 
    stringstrOutput = regex.Replace(value, string.Empty); 
    // Replace all < and > with &lt; and &gt; 
    strOutput = strOutput.Replace("<", "&lt;"); 
    strOutput = strOutput.Replace ( ">", "&gt");
 
    return strOutput; 
}
  • Currently 0 /5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

studio NetSouls completes the design and development of this unique online shopping experience, The Scandihoovians Shopping Experience.

The Scandihoovians shopping experience of elegant design, cutting-edge jewellery and fashion, and friendly service.

Make it Simple
Make it Beautiful

A new wave of Scandinavian design is sweeping the world. It is colourful, stylish and just plain fun and you will find it first at Scandihoovians.

Scandinavian design is built on centuries of tradition, craftsmanship and innovation. It brings art, texture, beauty and the simplest of solutions to daily tasks in our homes and workplaces, combining elegance and function with lasting quality and enjoyment.

Scandihoovians brings it all together in our constantly expanding collection of modern Scandinavian design complemented by carefully selected international designs of exceptional quality.

We offer the same low prices at our store locations in Northampton, and Amherst, Massachusetts, as we offer nationally online. And great service, too.

Visit: www.scandihoovians.com

  • Currently 0 /5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

About Us

studio NETSOULS is a complete IT services company, offering strategy, design, development and implementation of the total solution for your web and IT initiatives. The solutions we provide, enables businesses to leverage leading edge technology to gain sustainable competitive advantages in today's marketplace.

We specialize in designing, developing and deploying the next generation of IT solutions including e-business solutions Read more...

Tags

This will be shown to users with no Flash or Javascript.

Contact Us

My status

Quote of the Day

"Do you see a man wise in his own eyes? There is more hope for a fool than for him."

- Proverbs 26:12

NutritionVista

www.NutritionVista.com

Archives


Advertisements


Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008

Log in