連結sql資料庫以及Oracle 資料庫和啟動快取以及停止快取
阿新 • • 發佈:2019-02-10
連線資料庫SQL Sever
<connectionStrings>
<add name="sqlservercon" connectionString="Data Source=PC-YZC\SQLEXPRESS;Initial Catalog=News;Persist Security Info=True;User ID=sa;Password=19920514"/>
</connectionStrings>
Data Source=PC-YZC\SQLEXPRESS 伺服器名稱
Initial Catalog=News 資料庫名稱
身份驗證 SQL Sever身份驗證
User ID=sa 使用者名稱
Password=19920514 密碼
啟動快取
cd C:\Windows\Microsoft.NET\Framework\v4.0.30319
aspnet_regsql -C "Data Source=PC-YZC\SQLEXPRESS;Initial Catalog=News;Persist Security Info=True;User ID=sa;Password=19920514" -ed -et -t "T_News1"
停止快取
cd C:\Windows\Microsoft.NET\Framework\v4.0.30319
aspnet_regsql -C "Data Source=PC-YZC\SQLEXPRESS;Initial Catalog=News;Persist Security Info=True;User ID=sa;Password=19920514" -dd
=================================================================================================
連線資料庫 Oracle
<connectionStrings>
<add name="oraclecon" connectionString="Data Source=orcl;Persist Security Info=True;User ID=yaozc;Password=yaozc;Unicode=True"
providerName="System.Data.OracleClient"/>
</connectionStrings>
Data Source=orcl 資料庫名
User ID=yaozc 使用者名稱
Password=yaozc 密碼
<connectionStrings>
<add name="sqlservercon" connectionString="Data Source=PC-YZC\SQLEXPRESS;Initial Catalog=News;Persist Security Info=True;User ID=sa;Password=19920514"/>
</connectionStrings>
Data Source=PC-YZC\SQLEXPRESS 伺服器名稱
Initial Catalog=News 資料庫名稱
身份驗證 SQL Sever身份驗證
User ID=sa 使用者名稱
Password=19920514 密碼
啟動快取
cd C:\Windows\Microsoft.NET\Framework\v4.0.30319
aspnet_regsql -C "Data Source=PC-YZC\SQLEXPRESS;Initial Catalog=News;Persist Security Info=True;User ID=sa;Password=19920514" -ed -et -t "T_News1"
停止快取
cd C:\Windows\Microsoft.NET\Framework\v4.0.30319
aspnet_regsql -C "Data Source=PC-YZC\SQLEXPRESS;Initial Catalog=News;Persist Security Info=True;User ID=sa;Password=19920514" -dd
=================================================================================================
連線資料庫 Oracle
<connectionStrings>
<add name="oraclecon" connectionString="Data Source=orcl;Persist Security Info=True;User ID=yaozc;Password=yaozc;Unicode=True"
providerName="System.Data.OracleClient"/>
</connectionStrings>
Data Source=orcl 資料庫名
User ID=yaozc 使用者名稱
Password=yaozc 密碼