... vụ
SQL Server 2005 mới nhất
Tải về và cài đặt Microsoft PowerShell
a. Tải về file cài đặt Microsoft PowerShell “WindowsXP-KB926139-x86-
ENU.exe” từ địa chỉ http:/ /download .microsoft. com
...
ConvertTo-Html
ConvertTo-
SecureString
Copy-Item
Copy-ItemProperty
Export-Alias
Export-Clixml
Export-Console
Export-Csv
ForEach-Object
Format-Custom
Format-List
Format-Table
Format-Wide ...
Set-PSDebug
Set-Service
Set-TraceSource
Microsoft Windows PowerShell và SQL Server 2005 SMO – Phần 1
Ngu
ồn : quantrimang.com
The MA
K
Như bạn có lẽ đã biết, Windows PowerShell là tiện ích dòng...
... thực hiện mã
PowerShell đã có thể được thi hành bởi cmdlet sau. [Hình 1.3]
MicrosoftWindows PowerShell và SQL Server 2005 SMO – Phần 3
Ngu
ồn : quantrimang.com
The MA
K
Phần I và Phần II của ... [Hình 1.8]
./connectsql
Enter SQL Server Name:: HOME\SQLEXPRESS
Enter Database Name:: AdventureWorks
Chú ý
: HOME là máy chủ và SQLEXPRESS là tên ví dụ của SQL Server. Hãy
thay thế tên này ... loại chính sách thực thi khác nhau của Windows PowerShell là Restricted,
AllSigned, RemoteSigned và Unrestricted. Chúng ta sẽ tìm chính sách thực thi
của Windows PowerShell trên vùng làm việc....
... True v2.0.50727
C: \WINDOWS\ assembly\GAC_MSIL \Microsoft. SqlServer.SMO\9.0.24
2.0__89845dcd8080cc91 \Microsoft. Sql
Điều này có thể tránh bằng cách chuyển hướng ... Path : D:
GAC Version Location
True v2.0.50727
C: \WINDOWS\ assembly\GAC_MSIL \Microsoft. SqlServer.SMO\9.0.24
2.0__89845dcd8080cc91 \Microsoft. Sql.
Output
Logical name of Data is MyDatabase2_Data ... cả file Data và file bản ghi Log đều được tạo trên ổ D (hình 1.3 và
1.4)
MicrosoftWindows PowerShell và SQL Server 2005 SMO – Phần 5
Ngu
ồn : quantrimang.com
The MA
K
Phần I và phần II của...
... 2.1)
./backup.ps1 HOME\SQLExpress Admin FULL C:\test
./backup.ps1 HOME\SQLExpress Admin DIFF C:\test
./backup.ps1 HOME\SQLExpress Admin TRAN C:\test
Lưu ý
: HOME\SQLExpress là một ví dụ được ... sở dữ liệu.
Thực thi kịch bản ở trên cho kết quả như hình 2.1 và 2.2.
MicrosoftWindows PowerShell và SQL Server 2005 SMO – Phần 6
Ngu
ồn : quantrimang.com
The MAK
Trong phần 6 này, chúng ... " ;Microsoft. SqlServer.Management.Smo.Server"
"HOME"
$bck=new-object " ;Microsoft. SqlServer.Management.Smo.Backup"
$bck.Incremental = 1
$fil=new-object
" ;Microsoft. SqlServer.Management.Smo.BackupDeviceItem"...
...
fn_replgetcolidfrombitmap
fn_replgetparsedddlcmd
fn_replreplacesinglequote
MicrosoftWindows PowerShell và SQL Server 2005 SMO – Phần 7
Ngu
ồn : quantrimang.com
The MAK
Phần 1 và phần 2 của ... “HOME\SQLEXPRESS”. Thực thi lệnh dưới
đây, tham khảo hình 1.1.
[reflection.assembly]::
LoadWithPartialName(" ;Microsoft. SqlServer.Smo") | out-null
$srv=New-Object " ;Microsoft. SqlServer.Management.Smo.Server" ... “HOME\SQLEXPRESS”. Thực thi lệnh dưới
đây, tham khảo hình 1.3.
[reflection.assembly]::LoadWithPartialName(" ;Microsoft. SqlSe
rver.Smo") | out-null
$srv=New-Object " ;Microsoft. SqlServer.Management.Smo.Server"...
... [reflection.assembly]::LoadWithPartialName(" ;Microsoft. SqlSe
rver.Smo") | out-null
$MyScripter=new-object
(" ;Microsoft. SqlServer.Management.Smo.Scripter")
$srv=New-Object " ;Microsoft. SqlServer.Management.Smo.Server" ...
Phần 9 của loạt bài này giới thiệu cho các bạn cách sử dụng PowerShell và
MicrosoftWindows PowerShell và SQL Server 2005 SMO – Phần 9
Ngu
ồn : quantrimang.com
The MA
K
Sử dụng PowerShell ... “HOME\SQLEXPRESS”. Thực thi cmdlets
dưới đây (xem hình 1.1)
[reflection.assembly]::LoadWithPartialName
(" ;Microsoft. SqlServer.Smo") | out-null
$MyScripter=new-object
(" ;Microsoft. SqlServer.Management.Smo.Scripter")...
...
./ScriptSQL "HOME\SQLEXPRESS" "VixiaTrack" "Tables" >
C:\MyScript1.sql
Hình 1.5
MicrosoftWindows PowerShell và SQL Server 2005 SMO – Phần 10
Ngu
ồn : quantrimang.com
...
[reflection.assembly]::LoadWithPartialName(" ;Microsoft. SqlSe
rver.Smo") | out-null
$MyScripter=new-
object (" ;Microsoft. SqlServer.Management.Smo.Scripter")
$srv=New-Object " ;Microsoft. SqlServer.Management.Smo.Server" ... ScriptSQL.ps1 trong th mc c:\ps
ã
HOME l hostname
ã
SQLEXPRESS l tờn mỏy ch SQL instance trờn host HOME
ã
Admin l tờn c s d liu c trỳ trong SQLEXPRESS
ã
Database l tham s khi được thông qua sẽ...
... vụ SQL Server 2005 mới nhất
Tải về và cài đặt Microsoft PowerShell
a. Tải về file cài đặt Microsoft PowerShell “WindowsXP-KB926139-x86-ENU.exe” từ địa chỉ
http:/ /download .microsoft. com
...
Hình 7
Lệnh PowerShell xuất hiện. [Hình 1.7]
MicrosoftWindows PowerShell và SQL Server 2005 SMO – Phần I
Như bạn có lẽ đã biết, Windows PowerShell là tiện ích
dòng lệnh mới và là ...
ConvertTo-Html
ConvertTo-
SecureString
Copy-Item
Copy-ItemProperty
Export-Alias
Export-Clixml
Export-Console
Export-Csv
ForEach-Object
Format-Custom
Format-List
Format-Table
Format-Wide...
... VixiaTrack
7 XMLTest
8 admin
9 AdventureWorks
MicrosoftWindows PowerShell và SQL Server 2005 SMO – Phần 11
Ngu
ồ
n:quantrimang.com
The MA
K
Export đầu ra thành XML
Phần 10 của bài này ... "xml")
{
$DataSet.Tables[0] |Export-Clixml $filename
}
Hình 1.1
Kịch bản này có thể được thực thi như thể hiện bên dưới (hình 1.2)
./output "HOME\SQLEXPRESS" "VixiaTrack" ... output.ps1 trong th mc c:\ps
ã HOME l hostname
ã SQLEXPRESS l tờn SQL Server instance trong host HOME
ã VixiaTrack l tờn c s d liu c trỳ trong SQLEXPRESS instance
ã TEXT l nh dạng output được yêu...
... 1.6]
$a=read-host "Please Enter Second Number" $a
Hình 1.6
MicrosoftWindows PowerShell và SQL Server 2005 SMO - Phần III
Phần I và Phần II của loạt bài này đã chỉ dẫn các thiết ... loại chính sách thực thi khác nhau của Windows PowerShell là Restricted, AllSigned,
RemoteSigned và Unrestricted. Chúng ta sẽ tìm chính sách thực thi của Windows PowerShell
trên vùng làm việc. ... [Hình 1.8]
./connectsql
Enter SQL Server Name:: HOME\SQLEXPRESS
Enter Database Name:: AdventureWorks
Chú ý
: HOME là máy chủ và SQLEXPRESS là tên ví dụ của SQL Server. Hãy thay thế tên này...
... System.Data.DataSet
$SqlAdapter.Fill($DataSet)
$SqlConnection.Close()
MicrosoftWindows PowerShell và SQL Server 2005 SMO – Phần II
Phần I của loạt này chỉ dẫn cách thiết lập và sử dụng ... New-Object System.Data.SqlClient.SqlConnection
$SqlConnection.ConnectionString =
"Server=HOME\SQLEXPRESS;Database=master;Integrated Security=True"
$SqlCmd = New-Object System.Data.SqlClient.SqlCommand ... New-Object System.Data.SqlClient.SqlConnection
$SqlConnection.ConnectionString =
"Server=HOME\SQLEXPRESS;Database=master;Integrated Security=True"
$SqlCmd = New-Object System.Data.SqlClient.SqlCommand...
... is used to load WindowsXP Professional with the hardware and
registry settings that were automatically saved by WindowsXP Professional on the last successful boot of
Windows XP Professional. ... Repair Disk found in Microsoft
Windows 2000 and MicrosoftWindows NT 4.0.
ASR in Backup is a last-resort feature to use before reformatting your disk and re-installing WindowsXP
Professional. ... Active Directory domain that
includes 15 MicrosoftWindows NT Workstation 4.0 computers and 20 new WindowsXP Professional
computers
Domain users of Windows NT Workstation 4.0 computers can...