Browse by Tags

Related Posts
  • Blog Post: Turn Identity Insert Off and On

    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 confused like I did though - it's reverse logic...
  • Blog Post: What service pack is on my 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 what service pack you are running on a SQL Server...
  • Blog Post: Change owner on all database objects by stored procedure

    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 ( SELECT * FROM sysobjects WHERE id = object_id...
  • Blog Post: SQL Script to attach a database

    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
  • Blog Post: Add a Column To An Existing Table

    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
  • Blog Post: SharePoint Crawl and SQL Server Errors - Event ID: 17310

    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 Server 2005 installed.  That will resolve...
  • Blog Post: Change default location for SharePoint Database files: .mdf .ldf

    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 automatically.  To change where the config and content...
  • Blog Post: Kill database connections to SharePoint

    There will be occasions where you need to work with the databases for SharePoint in SQL Server Management Studio.  Backups, restores, etc... If you run into problems with there being existing connections to the databases preventing you from performing maintenance items, here’s a way to kill those...
  • Blog Post: Free Microsoft SQL Server 2008 R2 E-Book

    Microsoft Learning is offering a free E-Book on the latest release of SQL Server.  You only have to register to download it (quick registration I might add). https://profile.microsoft.com/RegSysProfileCenter/wizard.aspx?wizid=bd9adb0f-cca3-4096-96f1-f834754d1b0b&lcid=1033%20 Book Excerpt: “This...
  • Blog Post: Report Builder 2.0 for SharePoint 64 bit Integration

    When you integrate SSRS with SharePoint, by default the Report Builder is 1.0.  You can install the Report Builder 2.0 and configure SharePoint to use it instead.  But you are going to run into issues if your SharePoint environment is 64-bit.  Reporting Services Add-in for SharePoint products...
  • Blog Post: Date and Time in a SQL Statement (DateTime)

    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 know the date/time in a select statement or a where...
  • Blog Post: Earliest date known to mankind

    Okay… maybe not mankind - but it is the earliest date SQL Server will except for a SQL Date. 01/01/1753
  • Blog Post: Reporting Services Error

    Getting SQL Server Reporting Services up and running and then integrated with SharePoint can be a bit of a challenge.  There are just different pieces and too many areas where something can go wrong.  When testing your Report Server, you may get this dreaded error message: “The report server...