Dec20

SharePoint Comic Server Security

Categories: SharePoint Comic, SQL Server
  I created this comic for Joel Oleson to use in his Tech Ed presentation.  Cross-Posting it here after the fact, mainly because I have been too busy to create a new comic.  :)...
 
Sep25

What service pack is on my SQL Server?

Categories: SQL Server
Quick way to determine which SP is on your SQL Server:  "If you are a DBA in a big SQL Server database shop, keeping track of what service packs are on each SQL Server can become daunting. Here are a couple of scripts that help you determine wh...
 
Sep25

SharePoint Crawl and SQL Server Errors - Event ID: 17310

Categories: SQL Server
After setting up a crawl rule to crawl something other than SharePoint sites (such as a file share), you may encounter some errors for SQL Server.  If you start to see these repeatedly - check that you have the latest service pack for Microsoft SQL ...
 
Sep19

Change default location for SharePoint Database files: .mdf .ldf

Categories: SQL Server
When installing SharePoint, you may have decided you want to keep your data files for the database on a separate directory / drive.  However, you need to keep in mind that the SharePoint installer is going to create the databases for you automatical...
 
May8

SQL Script to attach a database

Categories: SQL Server
note: this script detaches it first   EXEC sp_detach_db @dbname = 'dbnametoattach' EXEC sp_attach_single_file_db @dbname = 'dbnametoattach', @physname = 'c:\yourdirectory\dbnametoattach.mdf'   - Dan Lewis...
 
Oct2

Turn Identity Insert Off and On

Categories: SQL Server
This is a really great thing to know if you are migrating data from one database to another and absolutely must retain the Id field of your records.  You can turn Indentity Insert Off / On so that you can specify the Id during insertion. Don't get c...
 
Sep12

Add a Column To An Existing Table

Categories: SQL Server
If you need to add a column to an existing table with a default value:   ALTER TABLE YourTableName ADD YourColumnName varchar(50) DEFAULT ‘your default value’ WITH VALUES...
 
Feb22

Change owner on all database objects by stored procedure

Categories: SQL Server
Another handy dandy script:  http://codebetter.com/blogs/darrell.norton/archive/2004/06/18/16932.aspx Darrell Norton (MVP) has a script that will allow you change the database owner on all of your databases/objects - super helper script! IF EXISTS ...
 
Feb2

Earliest date known to mankind

Categories: SQL Server
Okay… maybe not mankind - but it is the earliest date SQL Server will except for a SQL Date. 01/01/1753 ...
 
Apr11

Date and Time in a SQL Statement (DateTime)

Categories: SQL Server
To get the date and time for a datetime value in SQL Server, use the GetDate method.  It will return the current system date and time in the SQL Server standard internal format for datetime values. This is a pretty useful function if you need to ...