2013-01-15

Kullanılmayan Stored Procedure Bulma

SQL Server servisinin başlatıldığı tarihten bu yana kullanılmayan stored procedure'leri aşağıdaki sorgu ile bulabilirsiniz:

2013-01-12

Server Role Sahip Kullanıcıları Bulma

SQL Server'da herhangi bir server role(sysadmin, setupadmin, serveradmin, dbcreator, diskadmin, processadmin, securityadmin) sahip tüm kullanıcıları aşağıdaki sorgu ile bulabilirsiniz:


use master
go
select p.name,sp.name  
from sys.server_principals  p
inner join  sys.server_role_members  pr  on  p.principal_id= pr.member_principal_id
inner join sys.server_principals sp on pr.role_principal_id=sp.principal_id
where sp.type='R'


--SQL Server 2008 de test edildi.

2013-01-01

SQL Server Portlarını Komut Satırından Nasıl Açabilirim?

Windows 2008 Server'da:
@echo =========  SQL Server Ports  ===================
@echo Enabling SQLServer default instance port 1433
netsh firewall set portopening TCP 1433 "SQLServer"
@echo Enabling Dedicated Admin Connection port 1434
netsh firewall set portopening TCP 1434 "SQL Admin Connection"
@echo Enabling conventional SQL Server Service Broker port 4022 
netsh firewall set portopening TCP 4022 "SQL Service Broker"
@echo Enabling Transact-SQL Debugger/RPC port 135
netsh firewall set portopening TCP 135 "SQL Debugger/RPC"
@echo =========  Analysis Services Ports  ==============
@echo Enabling SSAS Default Instance port 2383
netsh firewall set portopening TCP 2383 "Analysis Services"
@echo Enabling SQL Server Browser Service port 2382
netsh firewall set portopening TCP 2382 "SQL Browser"
@echo =========  Misc Applications  ==============
@echo Enabling port for SQL Server Browser Service's 'Browse' Button
netsh firewall set portopening UDP 1434 "SQL Browser"
@echo Allowing multicast broadcast response on UDP (Browser Service Enumerations OK)
netsh firewall set multicastbroadcastresponse ENABLE

Windows Server 2008 R2 ve Windows Server 2012 versiyonu:

@echo =========  SQL Server Ports  =================== 
@echo Enabling SQLServer default instance port 1433
 netsh advfirewall firewall add rule name="SQL Server" dir=in action=allow protocol=TCP localport=1433 @echo Enabling Dedicated Admin Connection port 1434
 netsh advfirewall firewall add rule name="SQL Admin Connection" dir=in action=allow protocol=TCP localport=1434
@echo Enabling Conventional SQL Server Service Broker port 4022
netsh advfirewall firewall add rule name="SQL Service Broker" dir=in action=allow protocol=TCP localport=4022
@echo Enabling Transact SQL/RPC port 135
netsh advfirewall firewall add rule name="SQL Debugger/RPC" dir=in action=allow protocol=TCP localport=135
@echo =========  Analysis Services Ports  ==============
@echo Enabling SSAS Default Instance port 2383
netsh advfirewall firewall add rule name="Analysis Services" dir=in action=allow protocol=TCP localport=2383
@echo Enabling SQL Server Browser Service port 2382
netsh advfirewall firewall add rule name="SQL Browser" dir=in action=allow protocol=TCP localport=2382 @echo Enabling port for SQL Server Browser Service's 'Browse' Button
netsh advfirewall firewall add rule name="SQL Browser" dir=in action=allow protocol=UDP localport=1434

Kaynak: Microsoft.com

.::YASAL UYARI::.

©2004-2024 Mehmet GÜZEL, www.mehmetguzel.net

Site içeriği kaynak gösterilmek koşuluyla yayınlanabilir. Yazılan yazı ve yorumlar sadece yazı ve yorum sahiplerini bağlar.