<?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>Blargh!</title>
	<atom:link href="http://smargh.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://smargh.com</link>
	<description>Things that I work on</description>
	<lastBuildDate>Mon, 21 Jun 2010 19:34:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Change SQL name</title>
		<link>http://smargh.com/?p=42</link>
		<comments>http://smargh.com/?p=42#comments</comments>
		<pubDate>Mon, 21 Jun 2010 19:30:21 +0000</pubDate>
		<dc:creator>Suspence</dc:creator>
				<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://smargh.com/?p=42</guid>
		<description><![CDATA[view sql name
select @@servername
Change name
sp_dropserver &#8216;old_name&#8217;
go
sp_addserver &#8216;new_name&#8217;,'local&#8217;
go
then restart sql
found info here:
http://coderjournal.com/2008/02/how-to-change-instance-name-of-sql-server/
]]></description>
			<content:encoded><![CDATA[<p>view sql name<br />
select @@servername</p>
<p>Change name</p>
<p>sp_dropserver &#8216;old_name&#8217;<br />
go<br />
sp_addserver &#8216;new_name&#8217;,'local&#8217;<br />
go</p>
<p>then restart sql</p>
<p>found info here:</p>
<p>http://coderjournal.com/2008/02/how-to-change-instance-name-of-sql-server/</p>
]]></content:encoded>
			<wfw:commentRss>http://smargh.com/?feed=rss2&amp;p=42</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reset Mysql root password on windows</title>
		<link>http://smargh.com/?p=39</link>
		<comments>http://smargh.com/?p=39#comments</comments>
		<pubDate>Thu, 15 Apr 2010 20:10:39 +0000</pubDate>
		<dc:creator>Suspence</dc:creator>
				<category><![CDATA[Mysql]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://smargh.com/?p=39</guid>
		<description><![CDATA[reseting a mysql password on windows
1.  stop mysql
2.  Open a command prompt by selecting Start&#62;   run&#62;   typing in cmd
3.  Changed directory to C:\program files\mysql\MySQL Server 5.1_orig\bin by running
cd &#8220;C:\program files\mysql\MySQL Server 5.1_orig\bin&#8221;
4.  Started mysql from the command line with:
mysqld &#8211;defaults-file=&#8221;C:\Program Files\MySQL\MySQL Server 5.1\my.ini&#8221; &#8211;skip-grant-tables
5.  Opened a 2nd command prompt
6.  Changed directory to C:\program files\mysql\MySQL Server [...]]]></description>
			<content:encoded><![CDATA[<p>reseting a mysql password on windows</p>
<p>1.  stop mysql</p>
<p>2.  Open a command prompt by selecting Start&gt;   run&gt;   typing in cmd</p>
<p>3.  Changed directory to C:\program files\mysql\MySQL Server 5.1_orig\bin by running<br />
cd &#8220;C:\program files\mysql\MySQL Server 5.1_orig\bin&#8221;</p>
<p>4.  Started mysql from the command line with:<br />
mysqld &#8211;defaults-file=&#8221;C:\Program Files\MySQL\MySQL Server 5.1\my.ini&#8221; &#8211;skip-grant-tables</p>
<p>5.  Opened a 2nd command prompt</p>
<p>6.  Changed directory to C:\program files\mysql\MySQL Server 5.1_orig\bin</p>
<p>7.  log into mysql by typing<br />
mysql</p>
<p>8.  select the database<br />
USE mysql</p>
<p>9.  update the password<br />
UPDATE user SET password=(&#8216; &#8216;) WHERE user=&#8217;root&#8217;;</p>
<p>10. exit mysql</p>
<p>11. kill the mysql service running in the first command prompt with<br />
taskkill /F /IM mysqld.exe</p>
<p>12. Start mysql normally</p>
<p>13.  from the command prompt or the mysql command line client connect to mysql<br />
mysql -uroot -p<br />
just hit enter for the password</p>
<p>14.  update permissions<br />
GRANT all on *.* to root@&#8217;localhost&#8217; identified BY &#8216;newpassword&#8217;;<br />
GRANT all on *.* to root@&#8217;%&#8217; identified BY &#8216;newpassword&#8217;;<br />
flush PRIVILEGES;</p>
<p>15. exited out of mysql</p>
<p>16.  tested new password with<br />
mysql -uroot -p<br />
this time entering the password specified.</p>
]]></content:encoded>
			<wfw:commentRss>http://smargh.com/?feed=rss2&amp;p=39</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySql Upgrade on Windows</title>
		<link>http://smargh.com/?p=36</link>
		<comments>http://smargh.com/?p=36#comments</comments>
		<pubDate>Thu, 15 Apr 2010 20:04:34 +0000</pubDate>
		<dc:creator>Suspence</dc:creator>
				<category><![CDATA[Mysql]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://smargh.com/?p=36</guid>
		<description><![CDATA[A quick way to upgrade mysql on a windows server without using an installer
1.  download the mysql-noinstall 32/64 bit version from  mysql
2.  stop mysql
3.  Extract the folder to c:\program files\mysql
4.  Renam the MySQL Server 5.1 folder to MySQL Server 5.1_orig
5.  rename the extracted folder to MySQL Server 5.1
6.  copy C:\program files\mysql\MySQL Server 5.1_orig\data to C:\program [...]]]></description>
			<content:encoded><![CDATA[<p>A quick way to upgrade mysql on a windows server without using an installer</p>
<p>1.  download the mysql-noinstall 32/64 bit version from  <a href="http://www.mysql.com/downloads/mysql/">mysql</a></p>
<p>2.  stop mysql</p>
<p>3.  Extract the folder to c:\program files\mysql</p>
<p>4.  Renam the MySQL Server 5.1 folder to MySQL Server 5.1_orig</p>
<p>5.  rename the extracted folder to MySQL Server 5.1</p>
<p>6.  copy C:\program files\mysql\MySQL Server 5.1_orig\data to C:\program files\mysql\MySQL Server 5.1\data</p>
<p>7.  copy C:\program files\mysql\MySQL Server 5.1_orig\my.ini to C:\program files\mysql\MySQL Server 5.1\my.ini</p>
<p>8.  Start mysql</p>
<p>9.  Open a command prompt by selecting Start&gt;   run&gt;   typing in cmd</p>
<p>10.  Change directory to C:\program files\mysql\MySQL Server 5.1_orig\bin by running<br />
cd &#8220;C:\program files\mysql\MySQL Server 5.1_orig\bin&#8221;</p>
<p>11.  upgrade mysql by running<br />
mysql_upgrade<br />
This syncs up the databases with the newly installed version.</p>
]]></content:encoded>
			<wfw:commentRss>http://smargh.com/?feed=rss2&amp;p=36</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Storegrid troubleshooting tips</title>
		<link>http://smargh.com/?p=27</link>
		<comments>http://smargh.com/?p=27#comments</comments>
		<pubDate>Thu, 08 Apr 2010 16:34:37 +0000</pubDate>
		<dc:creator>Suspence</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Storegrid]]></category>

		<guid isPermaLink="false">http://smargh.com/?p=27</guid>
		<description><![CDATA[partyly taken from
http://www.storegrid.com/forum/viewtopic.php?t=4608&#38;sid=bcf279ac6a6d4e4f4687893715c60e3d
partly taken from
http://www.storegrid.com/forum/viewtopic.php?p=7516
to find out the problem with storegrid:
1) Stop StoreGrid if it is already running.
2) Open a command prompt and go to &#60;STOREGRID_HOME&#62; folder and start StoreGrid by executing the following command: &#8220;./bin/StoreGrid &#62; sgoutput.txt&#8221;
to fix a corrupt database file
1. Stop StoreGrid
2. Open the terminal window and go to the location
&#8220;&#60;StoreGrid_Installation_Dir&#62;/lib/&#8221; and [...]]]></description>
			<content:encoded><![CDATA[<p>partyly taken from</p>
<p>http://www.storegrid.com/forum/viewtopic.php?t=4608&amp;sid=bcf279ac6a6d4e4f4687893715c60e3d</p>
<p>partly taken from</p>
<p>http://www.storegrid.com/forum/viewtopic.php?p=7516</p>
<p>to find out the problem with storegrid:</p>
<p>1) Stop StoreGrid if it is already running.<br />
2) Open a command prompt and go to &lt;STOREGRID_HOME&gt; folder and start StoreGrid by executing the following command: &#8220;./bin/StoreGrid &gt; sgoutput.txt&#8221;</p>
<p>to fix a corrupt database file<br />
1. Stop StoreGrid<br />
2. Open the terminal window and go to the location<br />
&#8220;&lt;StoreGrid_Installation_Dir&gt;/lib/&#8221; and copy the &#8217;sqlite.bin&#8217; file to /home/storegrid/Vembu/StoreGrid/data folder.<br />
3. Access the Database base file (sgserver.db) from command line, by  executing &#8220;./sqlite.bin  sgserver.db&#8221;.<br />
4. Execute the command &#8220;pragma integrity_check;&#8221;<br />
5. If the output is &#8216;ok&#8217; then the database is not corrupted, if not then  the database gets corrupted.<br />
6. Quit sqlite application using &#8220;.q&#8221; command.<br />
7. If sgserver.db is corrupted rename the sgserver.db file available in  /home/storegrid/Vembu/StoreGrid/data/ folder to &#8217;sgserver.db.corrupt&#8217;.<br />
8. Access the Database base file (sgserver.db.bak) from command line, by  executing &#8220;./sqlite.bin  sgserver.db.bak&#8221;. If the output is &#8216;ok&#8217; then  please proceed with step 9 and step 10.<br />
9. Take a another copy of &#8217;sgserver.db.bak&#8217; file and save it as  &#8217;sgserver.db.bak.ori&#8217;.<br />
10. Copy the &#8217;sgserver.db.bak&#8217; file available in  /home/storegrid/Vembu/StoreGrid/data/ folder and save it as  &#8217;sgserver.db&#8217; in the same location.</p>
<p>the example I ran myself:</p>
<p>root@data]# ../lib/sqlite.bin sgclient.db<br />
SQLite version 3.5.4<br />
Enter &#8220;.help&#8221; for instructions<br />
sqlite&gt; pragma integrity_check;<br />
SQL error: malformed database schema</p>
<p>replace database with backup<br />
[root@data]# mv sgclient.db<br />
sgclient.db      sgclient.db.bak<br />
[root@data]# mv sgclient.db sgclient.db_bad<br />
[root@data]# cp -p sgclient.db.bak sgclient.db</p>
<p>start database &amp; verify its running<br />
[root@data]# /etc/init.d/storegrid start<br />
Starting StoreGrid!<br />
[root@data]# /etc/init.d/storegrid status<br />
StoreGrid is running as pid 28613 pts/0    00:00:01 StoreGrid</p>
]]></content:encoded>
			<wfw:commentRss>http://smargh.com/?feed=rss2&amp;p=27</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Resize partition without losing data</title>
		<link>http://smargh.com/?p=23</link>
		<comments>http://smargh.com/?p=23#comments</comments>
		<pubDate>Thu, 18 Mar 2010 14:57:17 +0000</pubDate>
		<dc:creator>Suspence</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://smargh.com/?p=23</guid>
		<description><![CDATA[find the device name
fdisk -l
unmount the partition
umount /dev/sde1
run a filesystem check
fsck -n /dev/sde1
remove the journal from the partition
tune2fs -O ^has_journal /dev/sde1
use the fdisk utility on the drive
fdisk /dev/sde
type P to view the paritions
type d to delete the current partition table, if there are more than one type the # of the partition you&#8217;re deleting.  this [...]]]></description>
			<content:encoded><![CDATA[<p class="command">find the device name<br />
fdisk -l</p>
<p class="command">unmount the partition<br />
umount /dev/sde1</p>
<p class="command">run a filesystem check<br />
fsck -n /dev/sde1</p>
<p class="command">remove the journal from the partition<br />
tune2fs -O ^has_journal /dev/sde1</p>
<p class="command">use the fdisk utility on the drive<br />
fdisk /dev/sde</p>
<p class="command">type P to view the paritions<br />
type d to delete the current partition table, if there are more than one type the # of the partition you&#8217;re deleting.  this will not remove any data<br />
type n to create a new paritional table<br />
type p for primary partition then the number of the partition<br />
for the first and last cylinder do the lowest/highest number if you&#8217;re using all of the space<br />
type a to readd the bootable flag then the # of the partition<br />
type w to write to the server and exit fdisk</p>
<p class="command">check the partition<br />
e2fsck -f /dev/sde1</p>
<p>resize the partition to include the new space<br />
resize2fs /dev/sde1</p>
<p class="command">check the files again<br />
fsck -n /dev/sde1</p>
<p class="command">create a new journal for the partition<br />
tune2fs -j /dev/sda1</p>
<p class="command">mount the drive<br />
mount /dev/sde1</p>
<p class="command">verify the space<br />
df -h<br />
or<br />
fdisk -l</p>
<p class="command">
<p class="command">If you&#8217;re doing this to a doing this to a drive with system files on instead of unmounting and mounting you will reboot into a knopix recovery disk and perform the operations from there.</p>
<p class="command">
<p class="command">
<p class="command">
<p class="command">
]]></content:encoded>
			<wfw:commentRss>http://smargh.com/?feed=rss2&amp;p=23</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migrate from IIS7 to IIS7</title>
		<link>http://smargh.com/?p=17</link>
		<comments>http://smargh.com/?p=17#comments</comments>
		<pubDate>Fri, 12 Mar 2010 15:40:04 +0000</pubDate>
		<dc:creator>Suspence</dc:creator>
				<category><![CDATA[IIS]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://smargh.com/?p=17</guid>
		<description><![CDATA[log into the originating server, open a command prompt and run:
cd %windir%\system32\inetsrv
appcmd add backup backupname
Then copy over %windir%\system32\inetsrv\backup\backupname from the originating server to the server you&#8217;re migrating too.
on the ending server open up a command prompt and run:
cd %windir%\system32\inetsrv
appcmd restore backupname
Then update any IPs/file paths in IIS.
]]></description>
			<content:encoded><![CDATA[<p>log into the originating server, open a command prompt and run:</p>
<p>cd %windir%\system32\inetsrv</p>
<p>appcmd add backup backupname</p>
<p>Then copy over %windir%\system32\inetsrv\backup\backupname from the originating server to the server you&#8217;re migrating too.</p>
<p>on the ending server open up a command prompt and run:</p>
<p>cd %windir%\system32\inetsrv</p>
<p>appcmd restore backupname</p>
<p>Then update any IPs/file paths in IIS.</p>
]]></content:encoded>
			<wfw:commentRss>http://smargh.com/?feed=rss2&amp;p=17</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migrating SQL users</title>
		<link>http://smargh.com/?p=11</link>
		<comments>http://smargh.com/?p=11#comments</comments>
		<pubDate>Fri, 16 Oct 2009 13:49:28 +0000</pubDate>
		<dc:creator>Suspence</dc:creator>
				<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://smargh.com/?p=11</guid>
		<description><![CDATA[This is from http://support.microsoft.com/kb/918992/
Migrating SQL Logins from Server to Server
Okay, So chances are if you are reading this, you want to migrate an entire instance of SQL. That is pretty simple. You just want to detach all databases, and copy over the MDF and LDF users. But what about the Logins? &#8230; Yea &#8230; The [...]]]></description>
			<content:encoded><![CDATA[<p>This is from http://support.microsoft.com/kb/918992/</p>
<h2>Migrating SQL Logins from Server to Server</h2>
<p>Okay, So chances are if you are reading this, you want to migrate an entire instance of SQL. That is pretty simple. You just want to detach all databases, and copy over the MDF and LDF users. But what about the Logins? &#8230; Yea &#8230; The logins AND Passwords.<br />
Thats where this KB comes in handy.</p>
<div class="editsection" style="FLOAT: right; MARGIN-LEFT: 5px">[<a title="Edit section: SQL 2005 -&gt; 2005" href="https://kb.hostmysite.net/index.php?title=How_Do_I_Migrate_SQL_Logins_From_Server_to_Server%3F&amp;action=edit&amp;section=2">edit</a>]</div>
<p><a name="SQL_2005_-.3E_2005"></a></p>
<h2>SQL 2005 -&gt; 2005</h2>
<p>To transfer the logins and the passwords from the instance of SQL Server on server A to the instance of SQL Server on server B, follow these steps:</p>
<ul>
<li>1. On server A, start SQL Server Management Studio, and then connect to the instance of SQL Server from which you moved the database.</li>
</ul>
<ul>
<li>2. Open a new Query Editor window, and then run the following script.</li>
</ul>
<pre>USE master
GO
IF OBJECT_ID ('sp_hexadecimal') IS NOT NULL
  DROP PROCEDURE sp_hexadecimal
GO
CREATE PROCEDURE sp_hexadecimal
    @binvalue varbinary(256),
    @hexvalue varchar (514) OUTPUT
AS
DECLARE @charvalue varchar (514)
DECLARE @i int
DECLARE @length int
DECLARE @hexstring char(16)
SELECT @charvalue = '0x'
SELECT @i = 1
SELECT @length = DATALENGTH (@binvalue)
SELECT @hexstring = '0123456789ABCDEF'
WHILE (@i &lt;= @length)
BEGIN
  DECLARE @tempint int
  DECLARE @firstint int
  DECLARE @secondint int
  SELECT @tempint = CONVERT(int, SUBSTRING(@binvalue,@i,1))
  SELECT @firstint = FLOOR(@tempint/16)
  SELECT @secondint = @tempint - (@firstint*16)
  SELECT @charvalue = @charvalue +
    SUBSTRING(@hexstring, @firstint+1, 1) +
    SUBSTRING(@hexstring, @secondint+1, 1)
  SELECT @i = @i + 1
END

SELECT @hexvalue = @charvalue
GO

IF OBJECT_ID ('sp_help_revlogin') IS NOT NULL
  DROP PROCEDURE sp_help_revlogin
GO
CREATE PROCEDURE sp_help_revlogin @login_name sysname = NULL AS
DECLARE @name sysname
DECLARE @type varchar (1)
DECLARE @hasaccess int
DECLARE @denylogin int
DECLARE @is_disabled int
DECLARE @PWD_varbinary  varbinary (256)
DECLARE @PWD_string  varchar (514)
DECLARE @SID_varbinary varbinary (85)
DECLARE @SID_string varchar (514)
DECLARE @tmpstr  varchar (1024)
DECLARE @is_policy_checked varchar (3)
DECLARE @is_expiration_checked varchar (3)

DECLARE @defaultdb sysname

IF (@login_name IS NULL)
  DECLARE login_curs CURSOR FOR

      SELECT p.sid, p.name, p.type, p.is_disabled, p.default_database_name, l.hasaccess, l.denylogin FROM
sys.server_principals p LEFT JOIN sys.syslogins l
      ON ( l.name = p.name ) WHERE p.type IN ( 'S', 'G', 'U' ) AND p.name &lt;&gt; 'sa'
ELSE
  DECLARE login_curs CURSOR FOR

      SELECT p.sid, p.name, p.type, p.is_disabled, p.default_database_name, l.hasaccess, l.denylogin FROM
sys.server_principals p LEFT JOIN sys.syslogins l
      ON ( l.name = p.name ) WHERE p.type IN ( 'S', 'G', 'U' ) AND p.name = @login_name
OPEN login_curs

FETCH NEXT FROM login_curs INTO @SID_varbinary, @name, @type, @is_disabled, @defaultdb, @hasaccess, @denylogin
IF (@@fetch_status = -1)
BEGIN
  PRINT 'No login(s) found.'
  CLOSE login_curs
  DEALLOCATE login_curs
  RETURN -1
END
SET @tmpstr = '/* sp_help_revlogin script '
PRINT @tmpstr
SET @tmpstr = '** Generated ' + CONVERT (varchar, GETDATE()) + ' on ' + @@SERVERNAME + ' */'
PRINT @tmpstr
PRINT ''
WHILE (@@fetch_status &lt;&gt; -1)
BEGIN
  IF (@@fetch_status &lt;&gt; -2)
  BEGIN
    PRINT ''
    SET @tmpstr = '-- Login: ' + @name
    PRINT @tmpstr
    IF (@type IN ( 'G', 'U'))
    BEGIN -- NT authenticated account/group

      SET @tmpstr = 'CREATE LOGIN ' + QUOTENAME( @name ) + ' FROM WINDOWS WITH DEFAULT_DATABASE = [' + @defaultdb + ']'
    END
    ELSE BEGIN -- SQL Server authentication
        -- obtain password and sid
            SET @PWD_varbinary = CAST( LOGINPROPERTY( @name, 'PasswordHash' ) AS varbinary (256) )
        EXEC sp_hexadecimal @PWD_varbinary, @PWD_string OUT
        EXEC sp_hexadecimal @SID_varbinary,@SID_string OUT

        -- obtain password policy state
        SELECT @is_policy_checked = CASE is_policy_checked WHEN 1 THEN 'ON' WHEN 0 THEN 'OFF' ELSE NULL END FROM sys.sql_logins WHERE name = @name
        SELECT @is_expiration_checked = CASE is_expiration_checked WHEN 1 THEN 'ON' WHEN 0 THEN 'OFF' ELSE NULL END FROM sys.sql_logins WHERE name = @name

            SET @tmpstr = 'CREATE LOGIN ' + QUOTENAME( @name ) + ' WITH PASSWORD = ' + @PWD_string + ' HASHED, SID = ' + @SID_string + ', DEFAULT_DATABASE = [' + @defaultdb + ']'

        IF ( @is_policy_checked IS NOT NULL )
        BEGIN
          SET @tmpstr = @tmpstr + ', CHECK_POLICY = ' + @is_policy_checked
        END
        IF ( @is_expiration_checked IS NOT NULL )
        BEGIN
          SET @tmpstr = @tmpstr + ', CHECK_EXPIRATION = ' + @is_expiration_checked
        END
    END
    IF (@denylogin = 1)
    BEGIN -- login is denied access
      SET @tmpstr = @tmpstr + '; DENY CONNECT SQL TO ' + QUOTENAME( @name )
    END
    ELSE IF (@hasaccess = 0)
    BEGIN -- login exists but does not have access
      SET @tmpstr = @tmpstr + '; REVOKE CONNECT SQL TO ' + QUOTENAME( @name )
    END
    IF (@is_disabled = 1)
    BEGIN -- login is disabled
      SET @tmpstr = @tmpstr + '; ALTER LOGIN ' + QUOTENAME( @name ) + ' DISABLE'
    END
    PRINT @tmpstr
  END

  FETCH NEXT FROM login_curs INTO @SID_varbinary, @name, @type, @is_disabled, @defaultdb, @hasaccess, @denylogin
   END
CLOSE login_curs
DEALLOCATE login_curs
RETURN 0
GO</pre>
<p>Note This script creates two stored procedures in the master database. The two stored procedures are named the sp_hexadecimal stored procedure and the sp_help_revlogin stored procedure.</p>
<ul>
<li>3. Run the following statement.</li>
</ul>
<p><code>EXEC sp_help_revlogin </code></p>
<p>The output script that is generated by the sp_help_revlogin stored procedure is the login script. This login script creates the logins that have the original Security Identifier (SID) and the original password.</p>
<ul>
<li>4. On server B, start SQL Server Management Studio, and then connect to the instance of SQL Server to which you moved the database. Important Before you go to step 5, review the information in the &#8220;Remarks&#8221; section.</li>
</ul>
<ul>
<li>5. Open a new Query Editor window, and then run the output script that is generated in step 3.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://smargh.com/?feed=rss2&amp;p=11</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cloning a VM without VC</title>
		<link>http://smargh.com/?p=9</link>
		<comments>http://smargh.com/?p=9#comments</comments>
		<pubDate>Wed, 17 Jun 2009 14:36:56 +0000</pubDate>
		<dc:creator>Suspence</dc:creator>
				<category><![CDATA[ESX]]></category>

		<guid isPermaLink="false">http://smargh.com/?p=9</guid>
		<description><![CDATA[taken from:
http://blogs.sun.com/danielc/entry/a_little_script_to_clone and http://hsukumar.wordpress.com/2008/05/14/esx-clone-without-virtual-center/
1. Log into the ESX server using the vmware infrastructure client and turn off the server you want to clone. 2. SSH into the server, sudo to root
3. run: /clone.sh &#60;origina&#62; &#60;clone&#62; example: /clone.sh &#8220;App Server 1&#8243; &#8220;App Server 2&#8243;
4. Once the clone process finishs go back to the Vmware infrastructure client [...]]]></description>
			<content:encoded><![CDATA[<p>taken from:</p>
<p>http://blogs.sun.com/danielc/entry/a_little_script_to_clone and http://hsukumar.wordpress.com/2008/05/14/esx-clone-without-virtual-center/</p>
<p>1. Log into the ESX server using the vmware infrastructure client and turn off the server you want to clone. 2. SSH into the server, sudo to root<br />
3. run: /clone.sh &lt;origina&gt; &lt;clone&gt; example: /clone.sh &#8220;App Server 1&#8243; &#8220;App Server 2&#8243;<br />
4. Once the clone process finishs go back to the Vmware infrastructure client and create a new VM.<br />
5. Select Custom configuration then browse through the options setting anything you&#8217;d like until you get to Select a disk. Browse to the vmdk that you cloned and select it, then select finish.<br />
6.  Power on the VM, log in and change the IP</p>
<p>The script:</p>
<p>SOURCEVM=$1<br />
TARGETVM=$2<br />
DATASTORE=/vmfs/volumes/MY-VM-STORE</p>
<p>mkdir $DATASTORE/&#8221;$2&#8243;</p>
<p>vmkfstools -i $DATASTORE/&#8221;$1&#8243;/&#8221;$1&#8243;.vmdk $DATASTORE/&#8221;$2&#8243;/&#8221;$2&#8243;.vmdk</p>
]]></content:encoded>
			<wfw:commentRss>http://smargh.com/?feed=rss2&amp;p=9</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install mod_suphp</title>
		<link>http://smargh.com/?p=3</link>
		<comments>http://smargh.com/?p=3#comments</comments>
		<pubDate>Tue, 21 Apr 2009 18:32:44 +0000</pubDate>
		<dc:creator>Suspence</dc:creator>
				<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://smargh.com/?p=3</guid>
		<description><![CDATA[suphp configuration:
download a copy of an rpm from http://dag.wieers.com/rpm/packages/mod_suphp/
after the rpm is installed install
Plesk
1) make following changes to /etc/suphp.conf:
; docroot=/
[handlers]
;Handler for php-scripts
;x-httpd-php=php:/usr/bin/php
suphp-script=php:/usr/bin/php-cgi

;Handler for CGI-scripts
x-suphp-cgi=execute:!self
2) make following changes to /etc/httpd/conf.d/suphp.conf (these are the most important changes, as they&#8217;ll prevent other vhosts from using suPHP or just breaking randomly)
suPHP_Engine off
#AddHandler x-httpd-php .php
#AddHandler x-httpd-php .php .php4 .php3 .phtml
3) [...]]]></description>
			<content:encoded><![CDATA[<p>suphp configuration:</p>
<p>download a copy of an rpm from <a class="external free" title="http://dag.wieers.com/rpm/packages/mod_suphp/mod_suphp-0.6.2-1.el5.rf.i386.rpm" rel="nofollow" href="http://dag.wieers.com/rpm/packages/mod_suphp/mod_suphp-0.6.2-1.el5.rf.i386.rpm">http://dag.wieers.com/rpm/packages/mod_suphp/</a></p>
<p>after the rpm is installed install</p>
<p>Plesk</p>
<p>1) make following changes to /etc/suphp.conf:</p>
<pre>; docroot=/
[handlers]
;Handler for php-scripts
;x-httpd-php=php:/usr/bin/php
suphp-script=php:/usr/bin/php-cgi

;Handler for CGI-scripts
x-suphp-cgi=execute:!self</pre>
<p>2) make following changes to /etc/httpd/conf.d/suphp.conf (these are the most important changes, as they&#8217;ll prevent other vhosts from using suPHP or just breaking randomly)</p>
<pre>suPHP_Engine off
#AddHandler x-httpd-php .php
#AddHandler x-httpd-php .php .php4 .php3 .phtml</pre>
<p>3) create /var/www/vhosts/&lt;domain&gt;/conf/vhost.conf as follows:</p>
<pre>&lt;Directory /var/www/vhosts/&lt;domain/httpdocs&gt;
suPHP_Engine on
suPHP_UserGroup &lt;user&gt; &lt;group&gt;
suPHP_ConfigPath /var/www/vhosts/&lt;domain&gt;/etc
AddHandler suphp-script .php
&lt;/Directory&gt;</pre>
<p>4) create /var/www/vhosts/&lt;domain&gt;/etc and copy /etc/php.ini to it</p>
<p>5) create var/www/vhosts/&lt;domain&gt;/tmp and update session save path in php.ini</p>
<p>6) run /usr/local/psa/admin/sbin/websrvmng -av, and restart apache</p>
<p>Not plesk:<br />
remove the /etc/httpd/conf.d/suphp.conf file and did everything in the httpd.conf folder</p>
<p>These are the lines that are needed outside the vhosts</p>
<pre>LoadModule suphp_module modules/mod_suphp.so
suPHP_Engine on</pre>
<p>These are the lines needed inside of the vhosts</p>
<pre>&lt;Directory /var/www/html/&lt;domain&gt;/httpdocs&gt;
       php_admin_flag engine off
       suPHP_Engine on
       suPHP_UserGroup user user
       suPHP_ConfigPath /var/www/html/mobile/etc/php.ini
       SuPHP_AddHandler suphp-script
       AddHandler suphp-script .php
   &lt;/Directory&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://smargh.com/?feed=rss2&amp;p=3</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
