Brad Chen's Developer Blog Azure Database Data science Machine Learning Cloud
2009年9月24日 星期四
ASP connect to SQL Server using Windows Authentication(ASP使用Windows認證連線到SQL Server)
1.Using Computer Management,Create a new Local Windows Account name myAppUser
2.Internet Service Manager, open the Properties Sheet of the virtual directory for the Web application,
select the Directory Security tab,
click on the Edit button for Anonymous Access and Authentication Control to display the Authentication Methods.
Click the Edit button for Allow Anonymous Access to edit the NT account used for anonymous access (MyAppUser)
3.select the Basic authentication (password is sent in clear text) option(基本驗證).
[Reference]
PRB: "Client Unable to Establish Connection" Error Message When Connecting from ASP to SQL Server
http://support.microsoft.com/?scid=kb%3Ben-us%3B253500&x=6&y=10
Authentication methods for connections to SQL Server in Active Server Pages
http://support.microsoft.com/?scid=kb%3Ben-us%3B247931&x=7&y=11
How to use Kerberos authentication in SQL Server
http://support.microsoft.com/kb/319723/en-us
ASP connect to SQL Server using Windows Authentication(ASP使用Windows認證連線到SQL Server)
1.Using Computer Management,Create a new Local Windows Account name myAppUser
2.Internet Service Manager, open the Properties Sheet of the virtual directory for the Web application,
select the Directory Security tab,
click on the Edit button for Anonymous Access and Authentication Control to display the Authentication Methods.
Click the Edit button for Allow Anonymous Access to edit the NT account used for anonymous access (MyAppUser)
3.select the Basic authentication (password is sent in clear text) option(基本驗證).
[Reference]
PRB: "Client Unable to Establish Connection" Error Message When Connecting from ASP to SQL Server
http://support.microsoft.com/?scid=kb%3Ben-us%3B253500&x=6&y=10
Authentication methods for connections to SQL Server in Active Server Pages
http://support.microsoft.com/?scid=kb%3Ben-us%3B247931&x=7&y=11
How to use Kerberos authentication in SQL Server
http://support.microsoft.com/kb/319723/en-us
T-SQL WHILE Loop and CAST
DECLARE @ip1 varchar(15), @ip1start int
SET @ip1 = '10.3.21.'
SET @ip1start = 131
WHILE (@ip1start<255)
BEGIN
--PRINT 'test'
PRINT @ip1 + CAST(@ip1start as varchar(3))
SET @ip1start = @ip1start + 1
END
GO
2009年9月22日 星期二
利用Windows 2003的DNS 應用程式目錄磁碟分割,只複寫指定的DC
找了幾天的solution,雖然用不到了,但是記錄一下也好,
參考reference的最後一份微軟doc文件
1.建立目錄磁碟分割
2.編列目錄磁碟分割
3.DNS mmc管理工具,指定分割區
[Reference]
建立 DNS 應用程式目錄磁碟分割
http://technet.microsoft.com/zh-tw/library/cc736585%28WS.10%29.aspx
編列 DNS 應用程式目錄磁碟分割中的一部 DNS 伺服器
http://technet.microsoft.com/zh-tw/library/cc756813%28WS.10%29.aspx
使用DNS應用程式目錄磁碟分割
http://download.microsoft.com/download/a/e/6/ae63ca55-7fc4-4190-8400-a17d2096c277/dns_adp.doc
2009年9月20日 星期日
How to connect Windows Server 2008 and Windows Vista to an iSCSI Server
[iSCSI Server]
1.可下載使用OpenFiler這個軟體建置iSCSI Server
下載為ISO檔,燒錄光碟後為可開機進行系統安裝
http://www.openfiler.com/community/download/
圖形介面安裝說明,安裝過程就像Linux的安裝
http://www.openfiler.com/learn/how-to/graphical-installation
PS.安裝在第一顆硬碟,保留第二顆不使用,之後可做為shared disk Volumn用
2.可使用Web管理介面設定IP與通訊埠
https://安裝時設定的iSCSI Server IP:446/
* The default username is openfiler, password password
* Go to services & enable the iSCSI Target service.
* Go to Volumes, then Physical Storage Management,
and click on the name of the disk where you want to create a new volume (I do this by having a second disk in the server besides the boot disk). In my case, I clicked on /dev/sdb
* Create a partition on that disk.
* Now go to Volume Group Management,
give the new VG a name, click the Select checkbox,
and click Add volume group.
* Now click on Create new Volume.
Create an iSCSI file system volume in the VG,
of whatever size you want.
* Now, go to the General tab and add your local network to the networks tab.
This should be the same network that the Win 2008 Server or Vista hosts are located on.
* Go back to the Volume properties, edit the volume,
and change that local network to Allow instead of the default of block.
Click Update.
* Now disable and enable the iSCSI service.
PS.版本不同設定位置會不一樣,
例如: Local network設定需在System->Network Access Configuration
先新增完成,然後設定Volumne完成時,點右邊的iSCSI Targets,
進行Target IQN新增與mapping,再設定Network ACL時指定Local Network
[iSCSI Client]
1.Windows Server 2008, Windows Vista內建Initiator
2.Windows Server 2003, Windows XP需額外下載安裝
Microsoft iSCSI Software Initiator Version 2.08
http://www.microsoft.com/downloads/details.aspx?familyid=12cb3c1a-15d6-4585-b385-befd1319f825&displaylang=en#filelist
3.設定連線到iSCSI Server
(1)控制台->iSCSI Initiator(iSCSI啟動器)
(2)電腦管理->存放->磁碟管理->會偵測到新磁碟->進行設定
依照下面的reference設定即可完成
[reference]
How to connect Windows Server 2008 and Windows Vista to an iSCSI Server
http://www.windowsnetworking.com/articles_tutorials/Connect-Windows-Server-2008-Windows-Vista-iSCSI-Server.html
2009年9月11日 星期五
SQL Server Linked Server To Oracle
1.Install Oracle 10g Release 2 Client
and Oracle 10g Release 2 ODAC 10.2.0.2.21
on the server that is running Microsoft SQL Server
2.Create an alias name on the server
that is running SQL Server that points to an Oracle database instance.
(tnsname.ora)
3.Enable Allow inprocess on Oracle Provider for OLE DB
SQL Server Instance
->Server Objects -> Linked Servers
->Providers->OraOLEDB.Oracle->Properties
checked Allow inprocess
4.Execute sp_addlinkedserver to create the linked server,
specifying OraOLEDB.Oracle as provider_name,
and the alias for the Oracle database as data_source.
The following example assumes that the alias has been defined as DQORA8:
exec sp_addlinkedserver @server='OrclDB',
@srvproduct='Oracle',
@provider='OraOLEDB.Oracle',
@datasrc='DQORA8'
5.Use sp_addlinkedsrvlogin to create login mappings
from SQL Server logins to Oracle logins.
EXEC sp_addlinkedsrvlogin @rmtsrvname = 'OrclDB',
@useself = 'false',
@locallogin = 'Joe',
@rmtuser = 'OrclUsr',
@rmtpassword = 'OrclPwd'
6.若要寫入資料則要而外設定RPC,RPC OUT
USE master;
EXEC sp_serveroption 'OrclDB', 'rpc out', 'True';
7.限制
Table Name 使用大寫或小寫
每個欄位值都必須提供無論是否可NULL或有預設值
日期型別需使用變數來寫入
例如:
DECLARE @v1 datetime SET @v1 = CONVERT(datetime,'14-sep-94')
EXEC('INSERT INTO
DYNORCL.SALES(ID, ORD_NO, ORD_DATE, QTY)
VALUES (?, ?, ?, ?)', '6380', '6871', @v1, 5) AT OrclDB
一些舊版的Oracle Provider可能不支援AVG()函數(Oracle 10g已直接支援AVG),
若發生錯誤可使用OPENQUERY來達成同樣效果
例如:
SELECT AVG(QTY) FROM ORA..RPUBS.SALES;
發生錯誤則改用
SELECT * FROM OPENQUERY
(
ORA
,'SELECT CAST (AVG(QTY) AS numeric) FROM ORA..RPUBS.SALES'
);
[Reference]
SQL Server 2008 Books Online (August 2009)
Oracle Provider for OLE DB
http://msdn.microsoft.com/en-us/library/ms190618.aspx
2009年9月8日 星期二
How to Speedup Download and Browsing in Vista
Follow the steps to speedup the Vista browsing speed:
First go to Advance tab in Internet Explorer and turn off the TLS (Transport Layer Security) encryption option. Here to fix problem with some secure pages turn on the SSL 2.0 (Secure Sockets Layer) feature and click Ok button to close it.
Speedup Vista download:
In windows Vista, the TCP autotuning feature is enabled by default. Some web servers do not respond properly to this feature, so it appears that some sites open with very slow speed.
To use this feature, you will need to be logged into your computer with administrative rights.
First click on Start button and type CMD in Run option then press Enter.
At Command Prompt, type the following command and press Enter :
netsh interface tcp set global autotuninglevel= disabled
This command will disable the TCP autotuning feature. Now close the command Prompt and restart your computer after any changes to go into effect.
You can easily restore these setting by typing the following command at Command Prompt :
netsh interface tcp set global autotuninglevel= normal
Now close the Command Prompt and again restart your computer after any changes to go into effect.
引用
http://www.windowsreference.com/windows-vista/how-to-speedup-download-and-browsing-in-vista/
How to Disable/Enable Aero Glass UI in Vista 如何關閉Aero Glass
To disable Windows Aero Glass UI follow these steps
Right-click on any blank spot on desktop area and On the pop up right click contextual menu, and select “Personalize”.
Select “Windows Color and Appearance” option.
Disable Transparency, simply uncheck the “Enable Transparency” option.
To disable the Windows Aero theme click on the “Open classic apperance properties for more color options” link located at the bottom of Window Color and Apperance window.
In the Appearance Setting dialog box, select Windows Classic listed in the “Color Scheme” except Windows Aero and click ok
If you want to enable aero glass UI reverse these changes and select windows aero option in the last step.
Using Registry Key
Go to Start—>Run type regedit click ok
Expand and navigate to the following registry key
HKEY_CURRENT_USER\Software\Microsoft\Windows\DWN
On the right pane, locate ColorizationColor with type as DWORD. Right click on ColorizationColor, and select Delete on the right click menu. Click on OK to confirm the deletion.
Then right click on registry value titled Composition (type DWORD) and select Modify. Change the value to 0 (by default is 1).
Restart the computer.
引用
http://www.windowsreference.com/windows-vista/how-to-disableenable-aero-glass-ui-in-vista/
2009年9月7日 星期一
Audit Active Directory Objects in Windows Server 2003 (設定稽核Windows 2003 Active Directory物件)
可設定稽核來找到未授權存取的LDAP屬性
To configure an audit policy setting for a domain controller:
- Click Start, point to Programs, point to Administrative Tools, and then click Active Directory Users and Computers.
- On the View menu, click Advanced Features.
- Right-click Domain Controllers, and then click Properties.
- Click the Group Policy tab, click Default Domain Controller Policy, and then click Edit.
- Click Computer Configuration, double-click Windows Settings, double-click Security Settings, double-click Local Policies, and then double-click Audit Policy.
- In the right pane, right-click Audit Directory Services Access, and then click Properties.
- Click Define These Policy Settings, and then click to select one or both of the following check boxes:
- Success: Click to select this check box to audit successful attempts for the event category.
- Failure: Click to select this check box to audit failed attempts for the event category.
- Right-click any other event category that you want to audit, and then click Properties.
- Click OK.
- Because the changes that you make to your computer's audit policy setting take effect only when the policy setting is propagated or applied to your computer, complete either of the following steps to initiate policy propagation:
- Type gpupdate /Target:computer at the command prompt, and then press ENTER.
- Wait for automatic policy propagation that occurs at regular intervals that you can configure. By default, policy propagation occurs every five minutes.
- Open the Security log to view logged events.
Note If you are either a domain or an enterprise administrator, you can enable security auditing for workstations, member servers, and domain controllers remotely.
Configure Auditing for Specific Active Directory Objects
After you configure an audit policy setting, you can configure auditing for specific objects, such as users, computers, organizational units, or groups, by specifying both the types of access and the users whose access that you want to audit. To configure auditing for specific Active Directory objects:- Click Start, point to Programs, point to Administrative Tools, and then click Active Directory Users and Computers.
- Make sure that Advanced Features is selected on the View menu by making sure that the command has a check mark next to it.
- Right-click the Active Directory object that you want to audit, and then click Properties.
- Click the Security tab, and then click Advanced.
- Click the Auditing tab, and then click Add.
- Complete one of the following:
- Type the name of either the user or the group whose access you want to audit in the Enter the object name to select box, and then click OK.
- In the list of names, double-click either the user or the group whose access you want to audit.
- Click to select either the Successful check box or the Failed check box for the actions that you want to audit, and then click OK.
- Click OK, and then click OK.
How to troubleshoot access denied in a split permission model or minimum permissions mode
HOW TO: Audit Active Directory Objects in Windows Server 2003
SQL Server Analysis Service
SQL Server Analysis Service
-
1.安裝了Oracle Client,就可以用Oracle Net Manager工具來設定TNS連線設定(Tnsnames.ora) Oracle Client 18.3 Installation 安裝Oracle Client 18.3 2.啟動Oracle Ne...
-
SQL Server Integration Service可以透過內建的OLE DB Source連線到Oracle匯出資料,但無法寫入資料到Oracle,Attunity公司針對這個功能提供了SSIS的連結Source,並且聽說資料傳送效率非常好,本人沒有測試過效能,有興趣的...
-
1.下載 Oracle Database 18c (18.3) https://www.oracle.com/technetwork/database/enterprise-edition/downloads/oracle18c-windows-180000-5066774.ht...