Welcome to MSDN Blogs Sign in | Join | Help
Deleting all the triples in the IMM database

A common question that comes up a lot on our IMMAsk@microsoft.com alias is how does one delete all of the RDF triples in the IMM database.  Just follow these simple steps.

  1. Open up SQL Server Management Studio and connect to your SQL Server.
  2. Open up the IMMMetadata Database
  3. Right click on the IMMMetadata and select New Query
  4. Enter this SQL script and execute it.
exec sw_sparql '
DELETE FROM <http://schemas.microsoft.com/IMM/data> {?s ?p ?o} 
FROM <http://schemas.microsoft.com/IMM/data>
WHERE { ?s ?p ?o }'
,0

That will delete all of the triples in the “data” graph for IMM. Note that there is a known bug in RTM of 2.0 where some triples of type “decimal” could be left behind. Just ignore those triples if there are just a few of them.

Posted: Wednesday, November 26, 2008 12:19 PM by johndeu

Comments

aweiker said:

One thing to pay attention here is that you will want to make sure you backup your database after this as your transaction log may be pretty full after removing all of those records.

# November 26, 2008 3:51 PM
Anonymous comments are disabled
Page view tracker