Please register

Registration is simple, painless and free! All you need to do is provide a name and email. Once you are registered you will have full access to the site, which includes the FREE Award Winning SQLRanger™ application, Standards Booklet, Install Checklist, as well as scripts and other useful stuff.

Set all databases to Simple Recovery

On our development servers we run a job once a day that sets all databases to Simple Recovery Model. The reason we do this is simple, we do not do log backups on dev boxes and we do not want the database logs filling up the disks. We do go ahead and set the model databases to Simple as well so that new databases are created with the Simple Model, but sometimes databases get restored from production that are set to Full Recovery Model and the DBA forgets to reset the Recovery Model. Here is a simple script that you can create a scheduled job for to reset all of the databases back to Simple Recovery Model:

 

DECLARE
@db nvarchar(max)

BEGIN
DECLARE #cd CURSOR LOCAL FAST_FORWARD FOR
SELECT [name] FROM master..sysdatabases
WHERE [name] NOT IN (‘tempdb’,’master’)

OPEN #cd
FETCH NEXT FROM #cd INTO @db

WHILE(@@fetch_status=0)
BEGIN
EXEC (‘ALTER DATABASE [' + @db + '] SET RECOVERY SIMPLE’)
FETCH NEXT FROM #cd INTO @db
END

CLOSE #cd
DEALLOCATE #cd

END

SQL Server Standards and Conventions Booklet

Here is a standards booklet you can use. It is in word format and prints out as a nice little booklet you can distribute to new developers or DBAs. You should consider this as more of a template, as you may or may not agree with some of the standards set forth in this booklet. That’s OK, all shops are different. You can customize it as you like of course, but if you do, please send us a comment or email and tells us what you changed and why. I’d like this booklet to continue to evolve into a modern standards guide. Standards

Download SQL Server Standards and Conventions

Mail – No global profile is configured

Msg 14636, Level 16, State 1, Procedure sp_send_dbmail, Line 112
No global profile is configured. Specify a profile name in the @profile_name parameter.

Follow these steps:

1. Go to Management –> Database Mail
2. Right Click then Configure Database mail, you will see a wizard, click next
3. Select Manage Profile security — Next
4. Beside Profile Name Under Default Profile there will be a No , Change it to Yes
5. Finish

p1-300x260 p2-300x261

Repair Suspect DB

EXEC sp_resetstatus ‘DBName’
GO
ALTER DATABASE DBName SET EMERGENCY
DBCC checkdb(‘DBname’)
ALTER DATABASE DBName SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DBCC CheckDB (‘DBName’, REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE DBName SET MULTI_USER
GO
– Rebuild the index
ALTER INDEX ALL ON [ TableName] REBUILD

SQL Ranger – The Application

 

SQL Ranger is a full featured tool to help DBA’s with everyday tasks. This is purely a client application. Absolutely nothing is installed on your SQL Server. So, download it and give it a try.

Here are a few screen shots of some of the features:

Monitor your SQL Servers in a low-touch innovative and intuitive interface:

Monitor

Get vital information at the touch of a button:

2

See the server schedule at a glance:

Scheduled Jobs

Get database specific information too:

5

And much more!

Contribute to the development, then:

Download SQLRanger HERE