VirtualBox 3.1.0 released

Por Fabio em Sem categoria No Comments »

VirtualBox 3.1.0 released!Sun today released VirtualBox 3.1.0, a major update introducing teleportation, branched snapshots, 2D video acceleration for Windows guests, more flexible storage management and much more. See the ChangeLog for details.

via VirtualBox.

Relatório de tamanho de schema

Por Fabio em Oracle No Comments »

Para obtermos o tamanho de um determinado schema utilizamos a seguinte query:

 
 

SELECT tablespace_name,

Sum(bytes)/1024/1024 AS total_size_mb

FROM dba_segments

WHERE owner = Upper(&User_Name)

GROUP BY owner, rollup(tablespace_name)

 
 

Esta query irá retornar o spaço ocupado em cada tablespace.

 
 

 
 

Para obtermos o espaço total utilizado por cada schema utilizamos a seguinte query:

 
 

SELECT OWNER,

SUM(BYTES)/1024/1024 AS TOTAL_SIZE_MB

FROM DBA_SEGMENTS

GROUP BY OWNER

ORDER BY OWNER

 
 

Finding primary keys and missing primary keys in SQL Server

Por Fabio em SQL Server No Comments »

Query 1 – Tables with primary keys

 
 

SQL 2005

SELECT c.name, b.name, a.name

FROM sys.key_constraints a

INNER JOIN sys.tables b ON a.parent_object_id = b.OBJECT_ID

INNER JOIN sys.schemas c ON a.schema_id = c.schema_id

WHERE a.type = ‘PK’

 
 

SQL 2000

SELECT c.name, a.name, b.name

FROM sysobjects a

INNER JOIN sysindexes b ON a.id = b.id

INNER JOIN sysusers c ON a.uid = c.uid

WHERE (b.status & 2048)<>0

 
 

Query 2 – Tables without primary keys

 
 

SQL 2005

SELECT c.name, b.name

FROM sys.tables b

INNER JOIN sys.schemas c ON b.schema_id = c.schema_id

WHERE b.type = ‘U’

AND NOT EXISTS

(SELECT a.name

FROM sys.key_constraints a

WHERE a.parent_object_id = b.OBJECT_ID

AND a.schema_id = c.schema_id

AND a.type = ‘PK’ )

 
 

SQL 2000

SELECT c.name, a.name

FROM sysobjects a

INNER JOIN sysusers c ON a.uid = c.uid

WHERE xtype = ‘U’

AND NOT EXISTS

(SELECT b.name

FROM sysindexes b

WHERE a.id = b.id

AND (b.status & 2048)<>0)

 
 

Query 3 – Tables with primary keys non clustered

 
 

SQL 2005

SELECT c.name, b.name, a.name

FROM sys.key_constraints a

INNER JOIN sys.tables b ON a.parent_object_id = b.OBJECT_ID

INNER JOIN sys.schemas c ON a.schema_id = c.schema_id

WHERE a.type = ‘PK’

AND a.unique_index_id <> 1

 
 

SQL 2000

SELECT c.name, a.name

FROM sysobjects a

INNER JOIN sysusers c ON a.uid = c.uid

WHERE xtype = ‘U’

AND EXISTS

(SELECT b.name

FROM sysindexes b

WHERE a.id = b.id

AND b.indid <> 1

AND (b.status & 2048)<>0)

 
 

 
 

 
 

Atalhos de teclado para Windows 7

Por Fabio em Windows No Comments »

Comandos Gerais:

WinKey + Seta para cima

Maximiza a Janela

WinKey + Seta para baixo

Restaura janela / Minimiza janela

WinKey + Seta para esquerda

Fixa janela à esquerda

WinKey + Seta para direita

Fixa janela à direita

WinKey + Shift + Seta para esquerda

Move janela para monitor da esquerda (se houver mais de um)

WinKey + Shift + Seta para direita

Move janela para monitor da direita (se houver mais de um)

WinKey + Home

Minimiza / restaura todas as janelas, exceto a que estiver em destaque

 
 

WinKey + T

Foca na primeira entrada da Superbar. Pressionando novamente, alterna entre elas

WinKey + Barra de espaço

Mostra o desktop (Aero Peek)

WinKey + G

Traz os gadgets à frente, em ordem-z

WinKey + P

Mostra opções de monitores/projetores externos

WinKey + X

Central de mobilidade

WinKey + # (# = número, de 1 a 5)

Abre uma nova instância do programa correspondente ao número fixado na Superbar. Por exemplo: WinKey
+ 1 abre o primeiro programa; WinKey + 4, abre o quarto programa

WinKey + Mais ou WinKey + Menos

Zoom

WinKey + Tab

Aero Flip (alterna entre os programas abertos)

 
 

Comandos para SuperBar:

Shift + clique

Abre nova instância

Botão do meio do mouse

Abre nova instância

Ctrl + Shift + clique

Abre nova instância com privilégios administrativos

Shift + clique (botão direito)

Abre menu da janela (maximizar, minimizar, mover, etc.)

Shift + clique (botão direito) em grupo de janelas

Abre menu da janela (maximizar, minimizar, mover, etc.)

Control + clique em grupo de janelas

Abre menu da janela (maximizar, minimizar, mover, etc.)

 
 

Enabling Memory Support for Over 4 GB of Physical Memory

Por Fabio em SQL Server No Comments »

Enabling Memory Support for Over 4 GB of Physical Memory

 
 

To enable Address Windowing Extensions (AWE) for Microsoft SQL Server, you must run the SQL Server 2005 Database Engine under a Microsoft Windows account that has been assigned the Lock Pages in Memory option and use sp_configure to set the awe enabled option to 1. The Maximize data throughput for network application option of Network Connection in Control Panel must be selected.

 
 

To enable AWE for an instance of SQL Server 2005, use sp_configure to set the awe enabled option to 1, and then restart SQL Server. Because AWE is enabled during SQL Server startup and lasts until SQL Server shutdown, SQL Server will notify users when awe enabled is in use by sending an “Address Windowing Extensions enabled” message to the SQL Server error log. For more information about the awe enabled configuration option, see awe enabled Option.

 
 

Enable the Lock Pages in Memory Option

 
 

The Windows policy Lock Pages in Memory option is disabled by default. This privilege must be enabled to configure Address Windowing Extensions (AWE). This policy determines which accounts can use a process to keep data in physical memory, preventing the system from paging the data to virtual memory on disk. On 32-bit operating systems, setting this privilege when not using AWE can significantly impair system performance. Although not required, we recommend locking pages in memory when using 64-bit operating systems.

 
 

Use the Windows Group Policy tool (gpedit.msc) to enable this policy for the account used by SQL Server 2005 Database Engine. You must be a system administrator to change this policy.

 
 

For a table that lists the maximum server memory values, see Memory Architecture.

 
 

To enable the lock pages in memory option

 
 

1 – On the Start menu, click Run. In the Open box, type gpedit.msc.

The Group Policy dialog box opens.

 
 

2 – On the Group Policy console, expand Computer Configuration, and then expand Windows Settings.

 
 

3 – Expand Security Settings, and then expand Local Policies.

 
 

4 – Select the User Rights Assignment folder.

The policies will be displayed in the details pane.

 
 

5 – In the pane, double-click Lock pages in memory.

 
 

6 – In the Local Security Policy Setting dialog box, click Add.

 
 

7 – In the Select Users or Groups dialog box, add an account with privileges to run sqlservr.exe.

 
 

 
 

Microsoft SQL Server 2005 uses the Microsoft Windows Address Windowing Extensions (AWE) API to support very large amounts of physical memory. SQL Server 2005 can access up to 64 gigabytes (GB) of memory on Microsoft Windows 2000 Server and Microsoft Windows Server 2003.

 
 

Note:

Support for AWE is available only in the SQL Server 2005 Enterprise, Standard, and Developer editions and only applies to 32-bit operating systems. SQL Server 2005 Analysis Services (SSAS) cannot take advantage of AWE mapped memory. If the available physical memory is less than the user mode virtual address space, AWE cannot be enabled.

 
 

Standard 32-bit addresses can map a maximum of 4 GB of memory. The standard address spaces of 32-bit processes are therefore limited to 4 GB. By default, on 32-bit Microsoft Windows operating systems, 2 GB are reserved for the operating system, and 2 GB are made available to the application. If you specify a /3gb parameter in the Boot.ini file of Windows 2000 Advanced Server, the operating system reserves only 1 GB of the address space, and the application can access up to 3 GB. For more information about the /3gb parameter, see Process Address Space.

 
 

AWE is a set of extensions to the memory management functions of Windows that allow applications to address more memory than the 2-3 GB that is available through standard 32-bit addressing. AWE lets applications acquire physical memory, and then dynamically map views of the nonpaged memory to the 32-bit address space. Although the 32-bit address space is limited to 4 GB, the nonpaged memory can be much larger. This enables memory-intensive applications, such as large database systems, to address more memory than can be supported in a 32-bit address space.

 
 

Before you configure the operating system for AWE, consider the following:

 
 

AWE allows allocating physical memory over 4 GB on 32-bit architecture. AWE should be used only when available physical memory is greater than user-mode virtual address space.

 
 

 
 

To support more than 4 GB of physical memory on 32-bit operating systems, you must add the /pae parameter to the Boot.ini file and reboot the computer. For more information, see your Windows documentation.

 
 

Note:

In Windows Server 2003, PAE is automatically enabled only if the server is using hot-add memory devices. In this case, you do not have to use the /pae parameter on a system that is configured to use hot-add memory devices. In all other cases, you must use the /pae parameter in the Boot.ini file to take advantage of memory over 4 GB.

 
 

 
 

If there is more than 16 GB of physical memory available on a computer, the operating system requires 2 GB of virtual address space for system purposes and therefore can support only a 2 GB user mode virtual address space. For the operating system to use the memory range above 16 GB, be sure that the /3gb parameter is not in the Boot.ini file. If it is, the operating system cannot use any physical memory above 16 GB.

 
 

 
 

Note:

The SQL Server buffer pool can fully utilize AWE mapped memory; however, only database pages can be dynamically mapped to and unmapped from SQL Server’s virtual address space and take full advantage of memory allocated through AWE. AWE does not directly help supporting additional users, threads, databases, queries, and other objects that permanently reside in the virtual address space.

 

 
 

Verificar fragmentação de tabelas e índices

Por Fabio em SQL Server No Comments »

DBCC SHOWCONTIG
[ (
    { table_name | table_id | view_name | view_id }
    [ , index_name | index_id ]
) ]
    [ WITH
        {
         [ , [ ALL_INDEXES ] ]
         [ , [ TABLERESULTS ] ]
         [ , [ FAST ] ]
         [ , [ ALL_LEVELS ] ]
         [ NO_INFOMSGS ]
         }
    ]

  
 

 
 

Deve-se olhar para o campo Scan Density que deve estar próximo a 100% caso contrario devemos eliminar a fragmentação com um reindex ou recriar o objeto

 
 

Ex.

 
 

DBCC SHOWCONTIG (‘tablename’) — mosta informações sobre uma tabela

 
 

DBCC SHOWCONTIG WITH TABLERESULTS –mostra informações sobre todas as tabelas de forma tabular

Você é realmente Geek?

Por Fabio em Sem categoria No Comments »

Responda o questionario abaixo e post nos comentarios seu indice de nerdice
http://www.innergeek.us/geek-test.html

Hitler banido do Counter Strike

Por Fabio em Videos No Comments »

Somente agora entendemos o verdadeiro objetivo de Hitler.

Mortal Kombat versão russa

Por Fabio em Videos No Comments »

Video muito bom parodiando o Mortal Kombat

(( litefeeds )) mobile RSS

Por Fabio em Sem categoria No Comments »

It works! Read feeds and post to your blog while mobile.

www.litefeeds.com

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in