<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>devtrends.com &#187; SQL</title>
	<atom:link href="http://www.devtrends.com/index.php/category/sql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.devtrends.com</link>
	<description>developing trends in information technology</description>
	<lastBuildDate>Fri, 03 Sep 2010 21:32:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Changing the SA password in SQL Express 2005</title>
		<link>http://www.devtrends.com/index.php/changing-the-sa-password-in-sql-express-2005/</link>
		<comments>http://www.devtrends.com/index.php/changing-the-sa-password-in-sql-express-2005/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 02:48:07 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[sql express]]></category>

		<guid isPermaLink="false">http://www.devtrends.com/?p=18</guid>
		<description><![CDATA[Sometimes when you install SQL Express 2005 as a component of another product, that application installation will configure the environment, effectively restricting your access to the SQL database. This is primarily due to the application setting the SA password and not telling you what it...]]></description>
			<content:encoded><![CDATA[<p>Sometimes when you install SQL Express 2005 as a component of another product, that application installation will configure the environment, effectively restricting your access to the SQL database. This is primarily due to the application setting the SA password and not telling you what it is.</p>
<p>With SQL Express 2005, the new command line is sqlcmd, which supposedly replaces osql.</p>
<p><strong><span style="font-size: medium;">Resetting the SA password</span></strong></p>
<p>If you need access to the database, you can reset the SA password using the following commands from a command prompt (cmd):</p>
<p>sqlcmd –S SQLSERVER\INSTANCE</p>
<p>Once in the interface for sqlcmd, which is represented by a 1&gt;, type the following on separate lines:</p>
<ul>
<li>sp_password @new = ’newpassword’, @loginame = ‘sa’</li>
<li>go</li>
<li>exit</li>
</ul>
<p>Just so you know, the @loginame procedure does have only one “n”.</p>
<h2>Unlocking the SA user</h2>
<p>If you have tried to access the database too many times with the wrong password, the SA account may be locked out. Do the following to unlock the account from a command prompt (cmd):</p>
<p>sqlcmd –S SQLSERVER\INSTANCE</p>
<p>Once in the interface for sqlcmd, which is represented by a 1&gt;, type the following on separate lines:</p>
<ul>
<li>ALTER LOGIN sa WITH PASSWORD = ‘newpassword’ UNLOCK</li>
<li>go</li>
<li>exit</li>
</ul>
<h2>Test It</h2>
<p>You can test the user account, SA, by trying to connect with the SA account from whatever program you are using, installing, et cetera, or you can use OSQL to attempt a connection. From a command prompt (cmd), type the following:</p>
<p>osql –U sa –S SQLSERVER\INSTANCE<br />
Enter your password<br />
At the 1&gt; prompt, type exit</p>
<h2>Links</h2>
<p>Microsoft has more information about the topic covered in this article at: <a href="http://support.microsoft.com/kb/322336">http://support.microsoft.com/kb/322336</a></p>
<p><a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=306429&amp;SiteID=1">http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=306429&amp;SiteID=1</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.devtrends.com/index.php/changing-the-sa-password-in-sql-express-2005/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
