- FreeNas...
- Windows 2008 R2 2 node Cluster build
- IIS 7.5
- php.iis.net
- WordPress 3.0 Post Setup
- mySQL - with phpmyadmin
- SQL 2008 R2 Enterprise cluster build
- Majority node set with cluster, witness server
- Shared disk with quorum from iSCSI Target from FreeNAS
- Self-Signed certs (SSL)
- ISA - 443 to 80
- RDP default port add/change - entry on http://d.patrickoneill.com/?p=83
- MOSS 2007 to MOSS 2010 upgrade/migrate
- get patches for Mom's computer :)
Showing posts with label t-SQL. Show all posts
Showing posts with label t-SQL. Show all posts
Thursday, August 19, 2010
Stop whining list
Friday, August 6, 2010
To put the entire SQL server into single user mode
Open Cluster Admin - stop SQL services
open cmd prompt and type (or copy/paste) the following:
cd "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn"
sqlservr.exe /s SQL1 /c /m /T3608
- you will see a bunch of stuff fly by on the cmd window, this is normal
start SQL Management Studio
Click CANCEL! on the connection prompt
Click New Query - then select your database from the drop list (it's right under the New Query button)
Paste in your DB reindex t-SQL script in the query window and execute
Set a database into Single User Mode
ALTER DATABASE [URSTUPIDDATABASE] SET MULTI_USER WITH NO_WAIT
ALTER DATABASE [URSTUPIDDATABASE] SET SINGLE_USER WITH NO_WAIT
or
EXEC sp_dboption 'URSTUPIDDATABASE', 'single user', 'false'
EXEC sp_dboption 'URSTUPIDDATABASE', 'single user', 'true'
Thursday, August 5, 2010
t-SQL to allow comments and ping backs on all your posts
If you want to update all of your posts in your Word Press blog site from closed commentsand closed pingbacks, then you can run this update script to update all of your posts to allow comments and pingbacks. Log in to your PHPMyAdmin where your database for your site lives, select the database, then select Query and insert the following, then click Go. :)
NOTE: Now, sometimes, when these SQL queries are placed in block-quotes, the single quotes get all weird and you might have to re-type them.
UPDATE wp_posts
SET Comment_Status = 'open',Ping_Status = 'open'
WHERE ID > 0
NOTE: Now, sometimes, when these SQL queries are placed in block-quotes, the single quotes get all weird and you might have to re-type them.
Subscribe to:
Posts (Atom)