{"action":"opened","issue":{"url":"https://api.github.com/repos/LadyBird0/SQL/issues/3","repository_url":"https://api.github.com/repos/LadyBird0/SQL","labels_url":"https://api.github.com/repos/LadyBird0/SQL/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/LadyBird0/SQL/issues/3/comments","events_url":"https://api.github.com/repos/LadyBird0/SQL/issues/3/events","html_url":"https://github.com/LadyBird0/SQL/issues/3","id":353306897,"node_id":"MDU6SXNzdWUzNTMzMDY4OTc=","number":3,"title":"Restore using LiteSpeed from full backup","user":{"login":"LadyBird0","id":16502665,"node_id":"MDQ6VXNlcjE2NTAyNjY1","avatar_url":"https://avatars2.githubusercontent.com/u/16502665?v=4","gravatar_id":"","url":"https://api.github.com/users/LadyBird0","html_url":"https://github.com/LadyBird0","followers_url":"https://api.github.com/users/LadyBird0/followers","following_url":"https://api.github.com/users/LadyBird0/following{/other_user}","gists_url":"https://api.github.com/users/LadyBird0/gists{/gist_id}","starred_url":"https://api.github.com/users/LadyBird0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LadyBird0/subscriptions","organizations_url":"https://api.github.com/users/LadyBird0/orgs","repos_url":"https://api.github.com/users/LadyBird0/repos","events_url":"https://api.github.com/users/LadyBird0/events{/privacy}","received_events_url":"https://api.github.com/users/LadyBird0/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-23T09:49:57Z","updated_at":"2018-08-23T09:49:57Z","closed_at":null,"author_association":"OWNER","body":"---- Kill all current connections\r\nDECLARE @cmdKill VARCHAR(50)\r\nDECLARE killCursor CURSOR FOR\r\nSELECT 'KILL ' + Convert(VARCHAR(5), p.spid)\r\nFROM master.dbo.sysprocesses AS p\r\nWHERE p.dbid = db_id('DatabaseNameSTR')\r\nOPEN killCursor\r\nFETCH killCursor INTO @cmdKill\r\nWHILE 0 = @@fetch_status\r\nBEGIN\r\nEXECUTE (@cmdKill) \r\nFETCH killCursor INTO @cmdKill\r\nEND\r\nCLOSE killCursor\r\nDEALLOCATE killCursor \r\n-----------------------\r\n-- When using LiteSpeed™ for SQL Server® Version 8.0.3.40 (64bit)\r\n--  Server online\r\n-----------------------\r\nexec master.dbo.xp_restore_database @database = N'HRNetTest' ,\r\n@filename = N'\\\\where ever Path\\fullbackup.lsf',\r\n@filenumber = 1,\r\n@with = N'REPLACE',\r\n@with = N'STATS = 10',\r\n@with = N'MOVE N''HRNET'' TO N''E:\\local path\\Data\\HRNetTest.mdf''',\r\n@with = N'MOVE N''HRNET_LOG'' TO N''F:\\local path\\Logs\\DatabaseNameSTR_log.ldf''',\r\n@with = N'MOVE N''HRNet3_Log'' TO N''F:\\local path\\Logs\\DatabaseNameSTR3_log.ldf''',\r\n@affinity = 0,\r\n@logging = 0\r\nGO"}}
{"actor":{"display_login":"LadyBird0"}}