UWInfo Blog
發表新文章
[Join] | [忘記密碼] | [Login]
搜尋

搜尋意見
文章分類-Reiko
[所有文章分類]
  • ASP.NET (7)
  • ASP.NET2.0 (1)
  • ASP.NET4.0 (6)
  • JavaScript (5)
  • jQuery (3)
  • FireFox (1)
  • UW系統設定 (1)
  • SQL (11)
  • SQL 2008 (12)
  • mirror (4)
  • SVN (0)
  • IE (2)
  • IIS (5)
  • IIS6 (1)
  • 閒聊 (0)
  • W3C (0)
  • 作業系統 (1)
  • C# (3)
  • CSS (0)
  • FileServer (0)
  • HTML 5 (0)
  • CKEditor (1)
  • UW.dll (0)
  • Visual Studio (3)
  • Browser (1)
  • SEO (0)
  • Google Apps (1)
  • 網站輔助系統 (0)
  • DNS (5)
  • SMTP (0)
  • 網管 (0)
  • 社群API (0)
  • SSL (3)
  • App_Inventor (0)
  • URLRewrite (1)
  • 開發工具 (1)
  • JSON (1)
  • Excel2007 (0)
  • 試題 (0)
  • LINQ (1)
  • bootstrap (0)
  • Vue (0)
  • IIS7 (0)
  • foodpanda (0)
  • 編碼 (0)
  • 資安 (0)
  • Sourcetree (0)
  • MAUI (0)
  • CMD (0)
  • my sql (0)
所有文章分類
[Reiko的分類]
  • ASP.NET (48)
  • ASP.NET2.0 (15)
  • ASP.NET4.0 (34)
  • JavaScript (49)
  • jQuery (26)
  • FireFox (4)
  • UW系統設定 (3)
  • SQL (39)
  • SQL 2008 (25)
  • mirror (4)
  • SVN (4)
  • IE (9)
  • IIS (20)
  • IIS6 (1)
  • 閒聊 (7)
  • W3C (6)
  • 作業系統 (9)
  • C# (24)
  • CSS (12)
  • FileServer (1)
  • HTML 5 (11)
  • CKEditor (3)
  • UW.dll (13)
  • Visual Studio (16)
  • Browser (8)
  • SEO (1)
  • Google Apps (3)
  • 網站輔助系統 (4)
  • DNS (5)
  • SMTP (4)
  • 網管 (11)
  • 社群API (3)
  • SSL (4)
  • App_Inventor (1)
  • URLRewrite (2)
  • 開發工具 (6)
  • JSON (1)
  • Excel2007 (1)
  • 試題 (3)
  • LINQ (1)
  • bootstrap (0)
  • Vue (3)
  • IIS7 (3)
  • foodpanda (2)
  • 編碼 (2)
  • 資安 (3)
  • Sourcetree (1)
  • MAUI (1)
  • CMD (1)
  • my sql (1)
最新回應
  • dotnet ef dbcontext scaffold
    ...more
  • 線上客服 - MSN
    本人信箱被盜用以致資料外洩,是否可以請貴平台予以協助刪除該信箱之使用謝謝囉...more
  • 插入文字到游標或選取處
    aaaaa...more
  • dotnet ef dbcontext scaffold
    更新到最新版的 dotnet-ef tooldotnet tool update --global ...more
  • dotnet ef dbcontext scaffold
    還需要這個:Microsoft.EntityFrameworkCore.Design...more
  • dotnet ef dbcontext scaffold
    指定版本:dotnet add package Microsoft.EntityFrameworkC...more
  • SQL 2008 Mirror Setting
    有設定見證伺服器但在Principal掛掉卻不會自動轉到Mirror資料庫在DBC加上: Failo...more
  • SQL 2008 Mirror Setting
    最近更換機房後201重啟很久,造成有設定Mirror的資料庫一直處於復原中狀態,網站無法正常運作(可...more
  • Send Mail By gmail SMTP
    出現錯誤訊息:System.Net.Mail.SmtpException: SMTP 伺服器需要安全...more
  • [SQL]將多筆資料合併為一筆顯示(FOR XML PATH)
    實測發現長度只能到 2034 個字元所以太長的話會被截斷...more
標籤
  • autopostba
  • 354
  • server
  • 140
  • ?
  • HTML
  • sonarCube
  • 找到的組件資訊清單定
  • 658
  • c
  • .
  • 圖片
  • server err
  • 0
  • -6532
  • 12
  • sftp
  • my sql
  • ad
  • 5275
  • SQL
  • 958
  • 514
  • 892
  • @@26E64
  • 406
  • GN
  • sing
  • 116
  • SMTP,
  • 422
  • 634
  • N2
  • 528
  • 308
  • -7099
  • 正在還原
  • sa
  • this
  • Cache
  • 監控
  • Xml
  • let
  • ie
  • 44
  • SQL Script
  • ashx
  • query
  • 字串
  • PDQ
頁數 3 / 8 上一頁 下一頁
SQL DB User 刪不掉 Error: 15138
SELECT s.name
FROM sys.schemas s
WHERE s.principal_id = USER_ID('YourUserID');

ALTER AUTHORIZATION ON SCHEMA::YourSchemaName TO dbo;


參考:http://blog.sqlauthority.com/2011/12/26/sql-server-fix-error-15138-the-database-principal-owns-a-schema-in-the-database-and-cannot-be-dropped/
More...
Reiko, 2014/9/23 下午 04:34:33
日租王
這是一篇加密文章,需輸入密碼才可閱讀
More...
Reiko, 2014/6/19 下午 04:37:52
[轉]強迫網站轉向到 HTTPS 加密安全連線 ( IIS URL Rewrite )
參考網址:http://blog.miniasp.com/post/2014/06/04/Redirect-to-HTTPS-from-HTTP-using-IIS-URL-Rewrite.aspx
More...
Reiko, 2014/6/4 下午 11:06:28
SQL Server log 檔案過大
參考來源:http://seasuwang.blogspot.tw/2009/09/sql-server-log.html

SQL Server 2008 Transcation log 檔案太大,導致SQL Server無法運作
將SQL Server的執行程序停止,手動刪除log實體檔案,再次啟動SQL Server的程序,資料庫沒辦法work

參考 Seasu Wang 說明把資料庫給救回來,步驟如下:
假設資料庫名稱為OhMyGod
1. 停止SQL Server, 將原mdf檔移走
2. 開啟SQL Server, 建立新的OhMyGod資料庫.
3. 停止SQL Server
4. 將損壞的mdf覆蓋回新建的mdf檔,並刪除新建的log檔
5. 開啟SQL Server
3. 設定OhMyGod資料庫狀態為EMERGENCY:
ALTER DATABASE OhMyGod SET EMERGENCY
4. 設定OhMyGod資料庫模式為"單一使用者":
sp_dboption 'OhMyGod', 'single user', 'true'
5. 檢查指定資料庫中所有物件的配置、結構和邏輯完整性:
DBCC CHECKDB (OhMyGod, REPAIR_ALLOW_DATA_LOSS)
6. 還原OhMyGod資料庫模式:
sp_dboption 'OhMyGod', 'single user', 'false'
7. 設定OhMyGod資料庫狀態為
ONLINE:ALTER DATABASE OhMyGod SET ONLINE
 
More...
Reiko, 2014/3/21 上午 11:52:10
SSL設定
 
IE若沒反應,改用Chrome即可。

 
貼上IIS產生的CSR文字內容。PS.若Email無法通過,改選擇File Based Authentication即可。

 
確認URL是否正確。

 
送出後,等待Email通知憑證通過。

收到憑證檔案,再到IIS中,匯入CRT檔案。
 

 

 
確認CRT匯入成功。

 
設定完成。
More...
Reiko, 2014/3/3 下午 08:17:13
cheapssl 購買
https://cheapsslsecurity.com/






 
More...
Reiko, 2014/3/3 下午 07:46:07
IIS7 Certificate Signing Request (CSR)





D:\thelifeCSR.txt此檔案即為 CSR [憑證要求檔案]
 
More...
Reiko, 2014/3/3 下午 07:28:22
Send Mail by godaddy
Sub SendMail_godaddy(ByVal Subject As String, ByVal Body As String, ByVal FromMail As String, ByVal ToMail As String)
        Dim objMail As New System.Web.Mail.MailMessage()

        objMail.From = FromMail
        objMail.To = ToMail
        objMail.Subject = Subject
        objMail.BodyFormat = Mail.MailFormat.Html
        objMail.Priority = Mail.MailPriority.High
        objMail.Body = Body

        System.Web.Mail.SmtpMail.SmtpServer = UW.Mail.SMTP_SERVER_NAME
        System.Web.Mail.SmtpMail.Send(objMail)
    End Sub
More...
Reiko, 2014/1/17 下午 02:50:53
Send Mail By gmail SMTP
Sub SendMail_gmail(ByVal Subject As String, ByVal Body As String, ByVal FromMail As String, ByVal ToMail As String)
        Dim msg As New System.Net.Mail.MailMessage

        Dim client As New System.Net.Mail.SmtpClient
        Try

            msg.Subject = Subject
            msg.Body = Body
            msg.From = New System.Net.Mail.MailAddress(FromMail)
            msg.To.Add(ToMail)
            msg.IsBodyHtml = True

            client.Host = "smtp.gmail.com"
            Dim basicauthenticationinfo As System.Net.NetworkCredential = New System.Net.NetworkCredential("username@gmail.com", "password")
            client.Port = Int32.Parse("587")
            client.EnableSsl = True
            client.UseDefaultCredentials = False
            client.Credentials = basicauthenticationinfo
            client.DeliveryMethod = Net.Mail.SmtpDeliveryMethod.Network
            client.Send(msg)

        Catch ex As Exception
            UW.WU.DebugWriteLine(ex.ToString, True, True)
        End Try

    End Sub
More...
Reiko, 2014/1/17 下午 02:48:37
SQL 2008 內建備份功指定到網路磁碟機
不同主機,windows登入帳號不同時,需先指定帳密才可備份。

-- To allow advanced options to be changed.開啟進階選項
EXEC sp_configure 'show advanced options', 1
GO
-- To update the currently configured value for advanced options.執行動作
RECONFIGURE
GO
-- To enable the feature.開啟xp_cmdshell功能
EXEC sp_configure 'xp_cmdshell', 1
GO
-- To update the currently configured value for this feature.執行動作
RECONFIGURE
GO


DECLARE @DBPath nvarchar(120)
--指定磁碟機Z的路徑為\\192.168.8.201\SQLBackupLeon
exec master..xp_cmdshell 'net use z: \\192.168.8.201\SQLBackupLeon 密碼 /user:帳號'
--指定備份路徑檔名
SET @DBPath = 'Z:\' + 'ReikoTEST' + '_' + Convert(varchar(10),Getdate(),112) + Replace(Convert(varchar(8),Getdate(),108),':','') + '.bak'
--DATENAME(Weekday,GETDATE())=>會顯示為"星期N"
--SET @DBPath = 'Z:\' + 'Leon' + '_' + DATENAME(Weekday,GETDATE()) + '.bak'
--備份資料庫ReikoTEST到路徑檔名
BACKUP DATABASE ReikoTEST TO DISK = @DBPath
--刪除磁碟機Z
exec master..xp_cmdshell 'net use Z: /delete'
GO


-- To enable the feature.關閉xp_cmdshell功能
EXEC sp_configure 'xp_cmdshell', 0
GO
-- To update the currently configured value for this feature.執行動作
RECONFIGURE
GO
-- To allow advanced options to be changed.關閉進階選項
EXEC sp_configure 'show advanced options', 0
GO
-- To update the currently configured value for advanced options.執行動作
RECONFIGURE
GO


※ xp_cmdshell不要常開著,有風險,用完要關掉。
※ 網路磁碟機路徑要開啟安全性設定,設定為:\\[IP]\[資料夾],不可用\\[IP]\D$\[資料夾]
※ net use 指定資料夾後方,不可加 \
參考資料:http://ithelp.ithome.com.tw/question/10086406
More...
Reiko, 2013/12/12 上午 10:36:00
|< 12345678 >|
頁數 3 / 8 上一頁 下一頁
~ Uwinfo ~