<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-13460790</id><updated>2011-12-10T13:59:00.329-08:00</updated><title type='text'>Sql Server, what are you getting at?</title><subtitle type='html'>A little bit of RDBMS' Microsoft stuff.
Gathering things scattered, old queries, wisdom advices and so on.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://evives.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13460790/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://evives.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Enric</name><uri>http://www.blogger.com/profile/14044946838242430804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/-AfxvE2niwhc/TuDpSf6MQ8I/AAAAAAAAAEA/BLgI6PdEjTg/s220/DSCN1403.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>15</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-13460790.post-1467788926730189625</id><published>2007-12-11T03:21:00.000-08:00</published><updated>2007-12-11T05:08:38.165-08:00</updated><title type='text'>Some of SSIS stuff: variables and its assignations</title><content type='html'>Some of SSIS stuff: VARIABLES and its ASSIGNATIONS.&lt;br /&gt;&lt;br /&gt;For a file connection log:&lt;br /&gt;&lt;br /&gt;(ConnectionString)&lt;br /&gt;&lt;strong&gt;@[User::RutaLog]+ @[System::PackageName] + ".log"&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;Where RutaLog stands for a string value which contains the path for you .LOG file&lt;br /&gt;&lt;br /&gt;For a OLEDB Connection:&lt;br /&gt;(InitialCatalog)&lt;br /&gt;&lt;strong&gt;@[User::BD] &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Where BD stands for string value which contains the name of your database&lt;br /&gt;&lt;br /&gt;For a properties such as MessageSource (Send Mail Task) or whatever similar:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;" El Modelo " + @[User::MODELO] + " del ejercicio " + (DT_WSTR,4)@[User::EJERCICIO] + " se ha cargado . \nSe han insertado " + (DT_WSTR, 8) @[User::REGISTROS] + " registros . \nSe puede comprobar desde la aplicación NS"&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;REMARK: I warn you the use for '\n' literals inside the main literal.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13460790-1467788926730189625?l=evives.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evives.blogspot.com/feeds/1467788926730189625/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13460790&amp;postID=1467788926730189625' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13460790/posts/default/1467788926730189625'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13460790/posts/default/1467788926730189625'/><link rel='alternate' type='text/html' href='http://evives.blogspot.com/2007/12/some-of-ssis-stuff-variables-and-its.html' title='Some of SSIS stuff: variables and its assignations'/><author><name>Enric</name><uri>http://www.blogger.com/profile/14044946838242430804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/-AfxvE2niwhc/TuDpSf6MQ8I/AAAAAAAAAEA/BLgI6PdEjTg/s220/DSCN1403.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13460790.post-2631189296018738564</id><published>2007-12-11T03:18:00.000-08:00</published><updated>2007-12-11T03:21:01.158-08:00</updated><title type='text'>Raising EM through Microsof Management Console</title><content type='html'>From DOS session:&lt;br /&gt;&lt;br /&gt;"C:\Program Files\Microsoft SQL Server\80\Tools\BINN\SQL Server Enterprise Manager.MSC"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13460790-2631189296018738564?l=evives.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evives.blogspot.com/feeds/2631189296018738564/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13460790&amp;postID=2631189296018738564' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13460790/posts/default/2631189296018738564'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13460790/posts/default/2631189296018738564'/><link rel='alternate' type='text/html' href='http://evives.blogspot.com/2007/12/raising-em-through-microsof-manageme.html' title='Raising EM through Microsof Management Console'/><author><name>Enric</name><uri>http://www.blogger.com/profile/14044946838242430804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/-AfxvE2niwhc/TuDpSf6MQ8I/AAAAAAAAAEA/BLgI6PdEjTg/s220/DSCN1403.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13460790.post-3073985708729000822</id><published>2007-12-11T01:26:00.000-08:00</published><updated>2007-12-11T01:32:53.294-08:00</updated><title type='text'>How many transactions has been commited in my database?</title><content type='html'>Just a beta code. Then, as you like you can schedule that stored procedure in a job&lt;br /&gt;It uses internal esctructures such as LOP_BEGIN_XACT and are not documented in public forums.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;CREATE TABLE [dbo].[TRA_TRANSACCIONESMENSUAL] &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;( [ID] [int] IDENTITY (1, 1) NOT NULL , &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;[OPERATION] [char] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;[TOTAL] [int] NULL,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;[BASE_DATOS] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;[FECHA] [datetime] NULL )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt; ON [PRIMARY]GO&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;CREATE PROCEDURE TRA_ListaTransaccionesMensuales&lt;br /&gt;DECLARE @BD AS CHAR(25)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;DECLARE @sql2 AS CHAR(500) &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;DECLARE cursorbd CURSOR FAST_FORWARD FOR&lt;br /&gt;SELECT NAME FROM master.dbo.SYSDATABASES&lt;br /&gt;&lt;br /&gt;OPEN cursorbd&lt;br /&gt;FETCH NEXT FROM cursorbd INTO @BD&lt;br /&gt;WHILE @@fetch_status = 0&lt;br /&gt;BEGIN&lt;br /&gt;&lt;br /&gt;SET @sql2= ('USE ' + @BD + ' INSERT INTO MASTER.DBO.TRA_TRANSACCIONESMENSUAL(OPERATION,TOTAL,FECHA) SELECT Operation, COUNT(*), GETDATE() FROM ::fn_dblog(null,null) WHERE Operation IN (''LOP_BEGIN_XACT'', ''LOP_COMMIT_XACT'') GROUP BY OPERATION UPDATE MASTER.DBO.TRA_TRANSACCIONESMENSUAL SET BASE_DATOS = ''' + UPPER(ltrim(Rtrim(@BD))) + ''' WHERE [id] = (SELECT SCOPE_IDENTITY()) OR [id] = (SELECT SCOPE_IDENTITY() -1 )')&lt;br /&gt;-- print @sql2&lt;br /&gt;&lt;br /&gt;EXEC (@sql2)&lt;br /&gt;FETCH NEXT FROM cursorbd INTO @BD&lt;br /&gt;&lt;br /&gt;END&lt;br /&gt;CLOSE cursorbd&lt;br /&gt;DEALLOCATE cursorbd&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13460790-3073985708729000822?l=evives.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evives.blogspot.com/feeds/3073985708729000822/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13460790&amp;postID=3073985708729000822' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13460790/posts/default/3073985708729000822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13460790/posts/default/3073985708729000822'/><link rel='alternate' type='text/html' href='http://evives.blogspot.com/2007/12/how-many-transactions-has-been-commited.html' title='How many transactions has been commited in my database?'/><author><name>Enric</name><uri>http://www.blogger.com/profile/14044946838242430804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/-AfxvE2niwhc/TuDpSf6MQ8I/AAAAAAAAAEA/BLgI6PdEjTg/s220/DSCN1403.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13460790.post-168366997174380749</id><published>2007-12-11T01:17:00.000-08:00</published><updated>2007-12-11T03:30:17.330-08:00</updated><title type='text'>Querying for random results</title><content type='html'>--You can catch up rows at random by means of NEWID() function (either Sql2k or Sql25k)&lt;br /&gt;&lt;br /&gt;SELECT TOP 1 *&lt;br /&gt;FROM &lt;my_table&gt;&lt;br /&gt;ORDER BY NEWID()&lt;br /&gt;&lt;br /&gt;--And this one is useful when you want to obtain a LONG random value (either Sql2k or Sql25k)&lt;br /&gt;&lt;br /&gt;SELECT right(cast(rand(checksum(newid())) as decimal(15, 15)), 15)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13460790-168366997174380749?l=evives.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evives.blogspot.com/feeds/168366997174380749/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13460790&amp;postID=168366997174380749' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13460790/posts/default/168366997174380749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13460790/posts/default/168366997174380749'/><link rel='alternate' type='text/html' href='http://evives.blogspot.com/2007/12/querying-for-random-results.html' title='Querying for random results'/><author><name>Enric</name><uri>http://www.blogger.com/profile/14044946838242430804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/-AfxvE2niwhc/TuDpSf6MQ8I/AAAAAAAAAEA/BLgI6PdEjTg/s220/DSCN1403.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13460790.post-4598642336345146166</id><published>2007-12-11T01:12:00.000-08:00</published><updated>2007-12-11T01:16:57.461-08:00</updated><title type='text'>How can I see data stored in MDF data pages ?</title><content type='html'>-- Just an example using a simple word ('pablo')&lt;br /&gt;&lt;br /&gt;USE tempdb&lt;br /&gt;&lt;br /&gt;CREATE TABLE p1(&lt;br /&gt;nom CHAR(20)&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;INSERT INTO p1(nom)  VALUES('pablo')&lt;br /&gt;SELECT * FROM p1&lt;br /&gt;&lt;br /&gt;SELECT *&lt;br /&gt;FROM sysindexes&lt;br /&gt;WHERE id = OBJECT_ID('p1')&lt;br /&gt;&lt;br /&gt;--It will do conversion for FIRST (0xnn) field to DECIMAL&lt;br /&gt;DBCC TRACEON(3604)&lt;br /&gt;&lt;br /&gt;DBCC PAGE (tempdb,1,34,1)&lt;br /&gt;&lt;br /&gt;--disabling trace indicators DBCC TRACESTATUS (3604)&lt;br /&gt;DBCC TRACEoff (3604)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13460790-4598642336345146166?l=evives.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evives.blogspot.com/feeds/4598642336345146166/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13460790&amp;postID=4598642336345146166' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13460790/posts/default/4598642336345146166'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13460790/posts/default/4598642336345146166'/><link rel='alternate' type='text/html' href='http://evives.blogspot.com/2007/12/how-can-i-see-data-stored-in-mdf-data.html' title='How can I see data stored in MDF data pages ?'/><author><name>Enric</name><uri>http://www.blogger.com/profile/14044946838242430804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/-AfxvE2niwhc/TuDpSf6MQ8I/AAAAAAAAAEA/BLgI6PdEjTg/s220/DSCN1403.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13460790.post-115280802341450139</id><published>2006-07-13T09:25:00.000-07:00</published><updated>2006-07-13T09:27:03.416-07:00</updated><title type='text'>Sql25k.SSIS: SMTP mail from the Script Task</title><content type='html'>A lot of people need obviously to send email. That's fine. But we might know that SMTP Mail task doesn't support sending email when you use http protocol.However, it's possible to use the script task in order to achieve this.&lt;br /&gt;&lt;br /&gt;Imports System&lt;br /&gt;Imports Microsoft.SqlServer.Dts.Runtime&lt;br /&gt;Imports System.Net.Mail&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Public Class ScriptMain&lt;br /&gt;&lt;br /&gt;  Public Sub Send_Email()&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    Dim Message As MailMessage&lt;br /&gt;    Dim Client-SMTP As SmtpClient&lt;br /&gt;&lt;br /&gt;    Message=New MailMessage(&lt;a href="mailto:evivesg@cam.es,"&gt;evivesg@cam.es,"evivesg@cam.es&lt;/a&gt;", "test1", "xxxxxxxxxxx")&lt;br /&gt;&lt;br /&gt;    --to allocate IP ADRESS    Client-SMTP = New SmtpClient("nnn.nnn.n.nn")&lt;br /&gt;&lt;br /&gt;    Client-SMTP.Credentials = CredentialCache.DefaultNetworkCredentials   &lt;br /&gt;    Client-SMTP.Send(Message)&lt;br /&gt;&lt;br /&gt;    Dts.TaskResult = Dts.Results.Success&lt;br /&gt;  End Sub&lt;br /&gt;&lt;br /&gt;End Class&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13460790-115280802341450139?l=evives.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evives.blogspot.com/feeds/115280802341450139/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13460790&amp;postID=115280802341450139' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13460790/posts/default/115280802341450139'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13460790/posts/default/115280802341450139'/><link rel='alternate' type='text/html' href='http://evives.blogspot.com/2006/07/sql25kssis-smtp-mail-from-script-task.html' title='Sql25k.SSIS: SMTP mail from the Script Task'/><author><name>Enric</name><uri>http://www.blogger.com/profile/14044946838242430804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/-AfxvE2niwhc/TuDpSf6MQ8I/AAAAAAAAAEA/BLgI6PdEjTg/s220/DSCN1403.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13460790.post-115280697768298515</id><published>2006-07-13T09:08:00.000-07:00</published><updated>2006-07-13T09:17:38.716-07:00</updated><title type='text'>Sql25k: Undocumented stored procedures</title><content type='html'>Some of them are fully available. Sp's such as sp_MSforeachdb or sp_Mshelpcolumns are available yet on Sql Management Studio whereas other such as sp_MSgettools_path not.&lt;br /&gt;&lt;br /&gt;Why happen this?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13460790-115280697768298515?l=evives.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evives.blogspot.com/feeds/115280697768298515/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13460790&amp;postID=115280697768298515' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13460790/posts/default/115280697768298515'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13460790/posts/default/115280697768298515'/><link rel='alternate' type='text/html' href='http://evives.blogspot.com/2006/07/sql25k-undocumented-stored-procedures.html' title='Sql25k: Undocumented stored procedures'/><author><name>Enric</name><uri>http://www.blogger.com/profile/14044946838242430804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/-AfxvE2niwhc/TuDpSf6MQ8I/AAAAAAAAAEA/BLgI6PdEjTg/s220/DSCN1403.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13460790.post-112290077019937672</id><published>2005-08-01T05:51:00.000-07:00</published><updated>2005-08-01T05:52:50.200-07:00</updated><title type='text'>Retrieving results from system stored procedures</title><content type='html'>For instance:&lt;br /&gt;&lt;br /&gt;INSERT INTO #sp_helpprotect_results&lt;br /&gt;EXEC sp_helprotect NULL&lt;br /&gt;&lt;br /&gt;Don't forget create a table structure with the same number of fields&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13460790-112290077019937672?l=evives.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evives.blogspot.com/feeds/112290077019937672/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13460790&amp;postID=112290077019937672' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13460790/posts/default/112290077019937672'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13460790/posts/default/112290077019937672'/><link rel='alternate' type='text/html' href='http://evives.blogspot.com/2005/08/retrieving-results-from-system-stored.html' title='Retrieving results from system stored procedures'/><author><name>Enric</name><uri>http://www.blogger.com/profile/14044946838242430804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/-AfxvE2niwhc/TuDpSf6MQ8I/AAAAAAAAAEA/BLgI6PdEjTg/s220/DSCN1403.JPG'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13460790.post-112290039554765463</id><published>2005-08-01T05:43:00.000-07:00</published><updated>2005-08-01T05:46:35.546-07:00</updated><title type='text'>Obtaining the size of the MDF file</title><content type='html'>SELECT size*8192 as FileSize&lt;br /&gt;          FROM master..sysaltfiles&lt;br /&gt;              WHERE fileid=1&lt;br /&gt;                      AND dbid=DB_ID('&lt;name&gt;')&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13460790-112290039554765463?l=evives.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evives.blogspot.com/feeds/112290039554765463/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13460790&amp;postID=112290039554765463' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13460790/posts/default/112290039554765463'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13460790/posts/default/112290039554765463'/><link rel='alternate' type='text/html' href='http://evives.blogspot.com/2005/08/obtaining-size-of-mdf-file.html' title='Obtaining the size of the MDF file'/><author><name>Enric</name><uri>http://www.blogger.com/profile/14044946838242430804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/-AfxvE2niwhc/TuDpSf6MQ8I/AAAAAAAAAEA/BLgI6PdEjTg/s220/DSCN1403.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13460790.post-112290008316344687</id><published>2005-08-01T05:38:00.000-07:00</published><updated>2005-08-01T05:41:23.166-07:00</updated><title type='text'>The faster way to know if an object exists or not</title><content type='html'>SELECT OBJECT_ID('Prueba1SQL..testenr')&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13460790-112290008316344687?l=evives.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evives.blogspot.com/feeds/112290008316344687/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13460790&amp;postID=112290008316344687' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13460790/posts/default/112290008316344687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13460790/posts/default/112290008316344687'/><link rel='alternate' type='text/html' href='http://evives.blogspot.com/2005/08/faster-way-to-know-if-object-exists-or.html' title='The faster way to know if an object exists or not'/><author><name>Enric</name><uri>http://www.blogger.com/profile/14044946838242430804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/-AfxvE2niwhc/TuDpSf6MQ8I/AAAAAAAAAEA/BLgI6PdEjTg/s220/DSCN1403.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13460790.post-111808307743474999</id><published>2005-06-06T11:32:00.000-07:00</published><updated>2005-06-06T11:37:57.436-07:00</updated><title type='text'>Avoiding locks in tables</title><content type='html'>Using the 'nolock' clause we are avoiding create collisions or jam&lt;br /&gt;if in that moment another task is updating the same table&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="color:#ff0000;"&gt;update tblTable&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="color:#ff0000;"&gt;set sinStepCodeId = 2&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="color:#ff0000;"&gt;from tblTable &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="color:#ff0000;"&gt;where sinStatusid in(2)&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="color:#ff0000;"&gt;go&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="color:#ff0000;"&gt;Select count(*) from tblTable &lt;strong&gt;nolock&lt;/strong&gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="color:#ff0000;"&gt;go&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="color:#ff0000;"&gt;...&lt;/span&gt;&lt;/em&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13460790-111808307743474999?l=evives.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evives.blogspot.com/feeds/111808307743474999/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13460790&amp;postID=111808307743474999' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13460790/posts/default/111808307743474999'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13460790/posts/default/111808307743474999'/><link rel='alternate' type='text/html' href='http://evives.blogspot.com/2005/06/avoiding-locks-in-tables.html' title='Avoiding locks in tables'/><author><name>Enric</name><uri>http://www.blogger.com/profile/14044946838242430804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/-AfxvE2niwhc/TuDpSf6MQ8I/AAAAAAAAAEA/BLgI6PdEjTg/s220/DSCN1403.JPG'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13460790.post-111807907344471224</id><published>2005-06-06T10:26:00.000-07:00</published><updated>2005-06-06T10:31:13.443-07:00</updated><title type='text'>How can we obtain all the current databases?</title><content type='html'>To list the databases available in your SQL Server and show the path of&lt;br /&gt;the .MDF data files:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="color:#ff0000;"&gt;SELECT [name] [Database], [filename] [File Path] &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="color:#ff0000;"&gt;FROM master..sysdatabases&lt;/span&gt;&lt;/em&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13460790-111807907344471224?l=evives.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evives.blogspot.com/feeds/111807907344471224/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13460790&amp;postID=111807907344471224' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13460790/posts/default/111807907344471224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13460790/posts/default/111807907344471224'/><link rel='alternate' type='text/html' href='http://evives.blogspot.com/2005/06/how-can-we-obtain-all-current.html' title='How can we obtain all the current databases?'/><author><name>Enric</name><uri>http://www.blogger.com/profile/14044946838242430804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/-AfxvE2niwhc/TuDpSf6MQ8I/AAAAAAAAAEA/BLgI6PdEjTg/s220/DSCN1403.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13460790.post-111807810628617893</id><published>2005-06-06T10:12:00.000-07:00</published><updated>2005-06-06T11:45:59.650-07:00</updated><title type='text'>Obtaining all the fields in a table</title><content type='html'>Many times we need to know the name of an field from Query Analyzer and we have open&lt;br /&gt;Enterprise Manager with another task with which sometimes is difficult open another MMC-&gt;Enterprise Manager.&lt;br /&gt;&lt;br /&gt;Forget to do this:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="color:#ff0000;"&gt;sp_help [table] &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#000000;"&gt;And try this query:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Select top 0 * from [table]&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So this way you obtain each of the fields, just the name.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13460790-111807810628617893?l=evives.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evives.blogspot.com/feeds/111807810628617893/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13460790&amp;postID=111807810628617893' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13460790/posts/default/111807810628617893'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13460790/posts/default/111807810628617893'/><link rel='alternate' type='text/html' href='http://evives.blogspot.com/2005/06/obtaining-all-fields-in-table.html' title='Obtaining all the fields in a table'/><author><name>Enric</name><uri>http://www.blogger.com/profile/14044946838242430804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/-AfxvE2niwhc/TuDpSf6MQ8I/AAAAAAAAAEA/BLgI6PdEjTg/s220/DSCN1403.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13460790.post-111807162199471806</id><published>2005-06-06T08:26:00.000-07:00</published><updated>2005-06-06T08:54:54.356-07:00</updated><title type='text'>Deleting duplicates</title><content type='html'>How can we delete duplicate rows in a table of way fast and safe?&lt;br /&gt;&lt;br /&gt;It's easy, if our table own defined a identity field then:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="font-family:lucida grande;color:#ff0000;"&gt;Delete from table&lt;br /&gt;Where identity_field not in ( SELECT MAX( identity_field) FROM table GROUP BY [field1],[field2]...)&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;/em&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13460790-111807162199471806?l=evives.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://evives.blogspot.com/feeds/111807162199471806/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13460790&amp;postID=111807162199471806' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13460790/posts/default/111807162199471806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13460790/posts/default/111807162199471806'/><link rel='alternate' type='text/html' href='http://evives.blogspot.com/2005/06/deleting-duplicates.html' title='Deleting duplicates'/><author><name>Enric</name><uri>http://www.blogger.com/profile/14044946838242430804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/-AfxvE2niwhc/TuDpSf6MQ8I/AAAAAAAAAEA/BLgI6PdEjTg/s220/DSCN1403.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13460790.post-111806991986468027</id><published>2005-06-06T07:51:00.000-07:00</published><updated>2007-12-11T01:25:41.388-08:00</updated><title type='text'>About me</title><content type='html'>I was born in Barcelona thirty five years ago and I am currently living in Alicante with my wife and my little son. Without a doubt, they are my inspiration and my happiness.&lt;br /&gt;&lt;br /&gt;Since I began to work in IT almost ten years ago I have worked in lots of positions such as Help Desk second level operator, programmer or project leader. I am very keen of data, its particularities as well as your inherent properties. I love SQL, overall SQL93 although I have worked with AS-400 or Informix.&lt;br /&gt;&lt;br /&gt;I am consider myself a home-loving person and when I am not working in my office or destroying any system I am fully focused with my little hero called Pablo and my dear wife.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13460790-111806991986468027?l=evives.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13460790/posts/default/111806991986468027'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13460790/posts/default/111806991986468027'/><link rel='alternate' type='text/html' href='http://evives.blogspot.com/2005/06/about-me.html' title='About me'/><author><name>Enric</name><uri>http://www.blogger.com/profile/14044946838242430804</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/-AfxvE2niwhc/TuDpSf6MQ8I/AAAAAAAAAEA/BLgI6PdEjTg/s220/DSCN1403.JPG'/></author></entry></feed>
