SQL Notlarım

SQL Query Notlarım.

( Basit Sorgular )

( Uyarı : Bu Query’leri Live Veritabanlarınızda denemeyiniz ! )
***********************************************************************
SQL 2005 Dil Değiştirme
***********************************************************************
EXECUTE sp_configure ‘default language’, 22
RECONFIGURE WITH override
ALTER LOGIN sa WITH DEFAULT_LANGUAGE = Turkish
GO
——————————————————————————————————-
SQL NETWORK PERFORMANCE
*************************
DBCC SQLPERF(NETSTATS)

SQL 2005 Dil Değiştirme

******************************************************

EXECUTE sp_configure ‘default language’, 22RECONFIGURE WITH overrideALTER LOGIN sa WITH DEFAULT_LANGUAGE = Turkish

GO

——————————————————————

SQL NETWORK PERFORMANCE

*************************

DBCC SQLPERF(NETSTATS)

BEllek YApılandırması

***********************************************

sp_configure ‘show advanced options’, 1

RECONFIGURE

GO

sp_configure ‘awe enabled’, 1

RECONFIGURE

GO

sp_configure ‘max server memory’, 6144

RECONFIGURE

GO

Tablo Tranfer

*********************************************************

SELECT * INTO TARGETTABLE from SOURCETABLE

—————————————————————–

SQL Dil Değiştirme

*********************************************************

EXECUTE sp_configure ‘default language’, 22

RECONFIGURE WITH override

ALTER LOGIN sa WITH DEFAULT_LANGUAGE = Turkish

GO

EXEC SP_HELPLANGUAGE

SELECT @@LANGUAGE

*******************************************************************************************

Connect OSQL Database
———————————————————————

c:> osql -U sa -P Şifre -S SUNUCUADI

> USE master

> SELECT name,dbid FROM sysdatabases

Sunucu üzerindeki Tüm DB’leri listeler.

———————————————————————
Cursor Triger
*********************************************************

set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER TRIGGER [dbo].[updatetable] ON [dbo].[TAHSILATMAIN]
FOR UPDATE
AS
DECLARE @IDno INT
DECLARE Denetim CURSOR
FOR
SELECT IDno FROM Inserted
OPEN Denetim
FETCH NEXT FROM Denetim Into @IDno
WHILE (@@FETCH_STATUS <> -1)
BEGIN
INSERT INTO TEST VALUES(@IDno)
FETCH NEXT FROM Denetim INTO @IDno
END
CLOSE Denetim

SQL Notlarım” için bir yorum

  • 03 Mart 2011 de 09:16
    Permalink

    Connect OSQL Database
    ———————————————————————
    c:> osql -U sa -P Şifre -S SUNUCUADI
    > USE master
    > SELECT name,dbid FROM sysdatabases

    Sunucu üzerindeki Tüm DB’leri listeler.
    ———————————————————————

Bir Cevap Yazın

Connect with: