Stuff For Sale

by Administrator 28. February 2010 06:40

Tags:

White Wall Tile

by Administrator 13. February 2010 21:08

Approx 25cm by 20 cm

Floor Tile

by Administrator 13. February 2010 21:08

Terracota approx 25cm square

Wooden Pallet

by Administrator 13. February 2010 21:05

Calvin Klein Ladies Watch

by Administrator 8. February 2010 02:32

Please note: Not sure if this works

SQL Server - Cursor Syntax

by Administrator 1. February 2010 21:54

 -- Variables to hold the data


 DECLARE @Var1 int
 DECLARE @Var2 datetime

 -- CURSOR


 DECLARE db_cursor CURSOR FOR 
 SELECT  Col1,
Col2
 FROM Table1

 OPEN db_cursor  
 FETCH NEXT FROM db_cursor INTO @Var1 , @Var2

 WHILE @@FETCH_STATUS = 0  
 BEGIN   
  -- DO STUFF HERE

  
  FETCH NEXT FROM db_cursor INTO @Var1 , @Var2 
 END  

 CLOSE db_cursor  
 DEALLOCATE db_cursor

 

 

 

 

 

SQL Server - Move TempDb Log File

by Administrator 21. January 2010 23:53

ALTER DATABASE TempDB MODIFY FILE
(NAME = templog, FILENAME = 't:\templog.ldf')

Just change the logical name of your log file - and the new physical file location

Note that you need to restart SQL Server for this to take effect

 

SQL Server - Add multiple email addresses for an operator

by Administrator 10. November 2009 00:00

SQLServer Agent Jobs can only have one operator defined under the notifications section so what do you do if you want to send notification emails to more than one person? You could set up a distribution list within your email system but a simpler approach is simply to semi-colon separate the list of email addresses. 

Its as simple as that ! Just make sure you have enabled your alerting for the SQL Server Agent and configured database correctly and away you go

 

 

Attach Database Error Unable to open the physical file Operating system error

by Administrator 2. November 2009 23:56

This one caused a bit of a panic I can tell you! We had major trouble reattaching a very large database file. We kept getting the error below (Running SQL 2008 on Windows 7):

Unable to open the physical file Operating system error 5: "5(failed to retrieve text for this error. Reason: 15105)". (Microsoft SQL Server, Error: 5

This occured both when using the Management Console and if running the stored procedures 'sp_attach_db' and 'sp_attach_single_file_db'

Solution

Not sure if there is a 'better' way of doing this but we found that connecting using 'sa' and attaching the database as normal solved the problem

 

An explicit value for the identity column in table '' can only be specified when a column list is used and IDENTITY_INSERT is ON

by Administrator 23. October 2009 20:06

Easy one this, if you're trying to insert rows with specific values to go into an identity column (e.g. when transferring data from one database to another) you need to use the following kind of statement

SET IDENTITY_INSERT tablename ON

 

INSERT INTO tablename (column1, column2)

SELECT column1, column2 FROM table2

 

SET IDENTITY_INSERT tablename OFF