Skip to content

Bernd's Blog

Just another .NET and SharePoint developer blog

  • Home
  • About
  • Contact

Category: Database

Attaching User to a Login (SQL Server)

2009-06-22 Bernd

Probably most people already know – but it still happens often to me: When restoring a SQL database you cannot login even though the database user matches the SQL Server login. This can easily be fixed with the following command:… Read moreAttaching User to a Login (SQL Server)

Database  Leave a comment

Favourite database scripts

2007-10-31 Bernd

Here are the T-SQL database scripts I most frequently use when trouble-shooting. — Clear transaction log for SQL Server 2008 and after (log file) USE [DatabaseName] DBCC SHRINKFILE(‘TransactionLogLogicalName’, 1) BACKUP LOG [DatabaseName] TO DISK=’NUL’ DBCC SHRINKFILE(‘TransactionLogLogicalName’, 1)   — Clear… Read moreFavourite database scripts

Database  Leave a comment

Slet al data i SQL Server database

2007-10-31 Bernd

Hvis det er nødvendigt at slette al data i alle tabeller i en SQL Server database kan følgende T-SQL script hjælpe: — Source: http://vadivel.blogspot.com/2006/07/easiest-fastest-way-to-delete-all.html Set nocount on Exec sp_MSForEachTable ‘Alter Table ? NoCheck Constraint All’ Exec sp_MSForEachTable ‘ If ObjectProperty(Object_ID(”?”),… Read moreSlet al data i SQL Server database

Database  Leave a comment

Send e-mail fra sql server

2007-10-31 Bernd

Der findes nogle muligheder for at sende e-mail fra en SQL 2000 server med fordele og ulemper: SQL e-mail. Det er sql serverens indbyggede e-mail forsendelse, som kræver at en e-mail klient er installeret på serveren. Det vil man ikke… Read moreSend e-mail fra sql server

Database  Leave a comment

Categories

  • .NET
  • Database
  • Home LAN
  • Javascript
  • Mountaineering
  • Public Speaking
  • SharePoint
  • SharePoint 2010
  • Windows

Recent Posts

  • Playing with PnP Partner Pack v2.0
  • Hyper-V Integration Services Update fails
  • Flexible SharePoint Deployment
  • SharePoint Saturday Stockholm 2014
  • Enterprise Solutions Part 1: Content Type Syndication

Archives

  • December 2016
  • October 2014
  • January 2014
  • August 2012
  • March 2012
  • October 2011
  • June 2011
  • May 2011
  • February 2011
  • September 2010
  • July 2010
  • September 2009
  • August 2009
  • June 2009
  • May 2009
  • March 2009
  • January 2009
  • December 2008
  • October 2008
  • September 2008
  • July 2008
  • April 2008
  • March 2008
  • January 2008
  • December 2007
  • October 2007
  • April 2007

Recent Comments

  • tninja on Playing with PnP Partner Pack v2.0
  • Bernd on Make SharePoint fly, Part 1
  • Kenneth Sorensen on Make SharePoint fly, Part 1
  • Sven on Computed Field XML Definition
  • Pooja on Computed Field XML Definition
© 2021 All rights reserved
Proudly powered by WordPress | Theme: Simple Life by Nilambar.
Go to top