zh-hans/Microsoft.SqlServer.Management.PSSnapins.dll-Help.xml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 |
<?xml version="1.0" encoding="utf-8"?>
<helpItems xmlns="http://msh" schema="maml"> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Add-SqlAvailabilityDatabase</command:name><maml:description><maml:para>在 InputObject 或 Path 参数指定的可用性组中添加一个或多个主数据库或加入一个或多个辅助数据库。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Add</command:verb><command:noun>SqlAvailabilityDatabase</command:noun><dev:version /></command:details><maml:description><maml:para>Add-SqlAvailabilityDatabase cmdlet 在 InputObject 或 Path 参数指定的可用性组中添加一个或多个主数据库或加入一个或多个辅助数据库。 </maml:para><maml:para>若要将一个或多个数据库添加到可用性组,请在承载主副本的服务器实例上执行此 cmdlet,并指定一个或多个本地用户数据库。 </maml:para><maml:para>若要将辅助数据库加入可用性组,请在承载辅助副本的服务器实例上准备辅助数据库,然后在承载辅助副本的服务器实例上执行此 cmdlet。 </maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Add-SqlAvailabilityDatabase</maml:name><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>指向可用性组的路径。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>指定要添加或加入到由 Path 或 InputObject 参数指定的可用性组中的一组(一个或多个)用户数据库。这些数据库必须位于本地 SQL Server 实例上。注意,给定的数据库只能属于一个可用性组。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Add-SqlAvailabilityDatabase</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>您要向其中添加或加入数据库的可用性组的 AvailabilityGroup 对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>指定要添加或加入到由 Path 或 InputObject 参数指定的可用性组中的一组(一个或多个)用户数据库。这些数据库必须位于本地 SQL Server 实例上。注意,给定的数据库只能属于一个可用性组。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>指定要添加或加入到由 Path 或 InputObject 参数指定的可用性组中的一组(一个或多个)用户数据库。这些数据库必须位于本地 SQL Server 实例上。注意,给定的数据库只能属于一个可用性组。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>您要向其中添加或加入数据库的可用性组的 AvailabilityGroup 对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue><dev:type><maml:name>Target</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>指向可用性组的路径。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Add-SqlAvailabilityDatabase -Path SQLSERVER:\SQL\PrimaryServer\InstanceName\AvailabilityGroups\MyAG -Database "MyDatabase" </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>该命令将数据库“MyDatabase”添加到可用性组“MyAG”。此命令必须针对可用性组的主服务器实例执行,它不准备辅助数据库以进行数据同步。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Add-SqlAvailabilityDatabase -Path SQLSERVER:\SQL\SecondaryServer\InstanceName\AvailabilityGroups\MyAG -Database "MyDatabase" </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令将辅助数据库“MyDatabase”加入到承载辅助副本的其中一个服务器实例上的可用性组“MyAG”。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>$DatabaseBackupFile = "\\share\backups\MyDatabase.bak" $LogBackupFile = "\\share\backups\MyDatabase.trn" $MyAgPrimaryPath = "SQLSERVER:\SQL\PrimaryServer\InstanceName\AvailabilityGroups\MyAg" $MyAgSecondaryPath = "SQLSERVER:\SQL\SecondaryServer\InstanceName\AvailabilityGroups\MyAg" Backup-SqlDatabase -Database "MyDatabase" -BackupFile $DatabaseBackupFile -ServerInstance "PrimaryServer\InstanceName" Backup-SqlDatabase -Database "MyDatabase" -BackupFile $LogBackupFile -ServerInstance "PrimaryServer\InstanceName" -BackupAction 'Log' Restore-SqlDatabase -Database "MyDatabase" -BackupFile $DatabaseBackupFile -ServerInstance "SecondaryServer\InstanceName" -NoRecovery Restore-SqlDatabase -Database "MyDatabase" -BackupFile $LogBackupFile -ServerInstance "SecondaryServer\InstanceName" -RestoreAction 'Log' -NoRecovery Add-SqlAvailabilityDatabase -Path $MyAgPrimaryPath -Database "MyDatabase" Add-SqlAvailabilityDatabase -Path $MyAgSecondaryPath -Database "MyDatabase" </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此示例说明了一个完整过程:从承载可用性组主副本的服务器实例上的一个数据库中准备一个辅助数据库,将此数据库添加到可用性组(作为主数据库),然后将此辅助数据库加入可用性组。首先,该示例备份数据库及其事务日志。然后,此示例将数据库和日志备份还原到承载辅助副本的服务器实例。此示例调用两次 Add-SqlAvailabilityDatabase:第一次是针对主副本调用,以便将数据库添加到可用性组;然后对辅助副本调用,以便将该副本上的辅助数据库加入到可用性组。如果您有多个辅助副本,则对其中每个副本还原和加入辅助数据库。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Add-SqlAvailabilityDatabase -Path SQLSERVER:\SQL\PrimaryServer\InstanceName\AvailabilityGroups\MyAG -Database "MyDatabase" -Script </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令输出一个 Transact-SQL 脚本,该脚本将数据库“MyDatabase”添加到可用性组“MyAg”中。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>SQL Server Books Online: Adding a Database to an Availability Group (SQL Server)</maml:linkText><maml:uri /></maml:navigationLink><maml:navigationLink><maml:linkText>SQL Server Books Online: Joining a Secondary Replica to an Availability Group (SQL Server)</maml:linkText><maml:uri /></maml:navigationLink><maml:navigationLink><maml:linkText>SQL Server Books Online: Specifying the Endpoint URL for an Availability Replica (SQL Server)</maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Add-SqlAvailabilityGroupListenerStaticIp</command:name><maml:description><maml:para>将一个静态 IP 地址添加到现有的可用性组侦听器配置。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Add</command:verb><command:noun>SqlAvailabilityGroupListenerStaticIp</command:noun><dev:version /></command:details><maml:description><maml:para>Add-SqlAvailabilityGroupListenerStaticIp cmdlet 将一个静态 IP 地址添加到现有的可用性组侦听器配置。将 AvailabilityGroupListener、路径以及静态 IP 地址作为参数。此 IP 地址可以是带子网的 IPv4 地址或者 IPv6 地址。此 cmdlet 只能在承载主副本的服务器实例上执行。 </maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Add-SqlAvailabilityGroupListenerStaticIp</maml:name><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>可用性组侦听器的路径。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StaticIp</maml:name><maml:description><maml:para>要添加到可用性组侦听器的静态 IP 地址。此参数应该是字符串的列表。每个字符串都可以是采用斜杠形式的 IPv4 地址和子网掩码(例如 192.168.1.1/255.255.255.0),或者是 IPv6 地址。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Add-SqlAvailabilityGroupListenerStaticIp</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>您要向其中添加 IP 地址的侦听器的 AvailabilityGroupListener 对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StaticIp</maml:name><maml:description><maml:para>要添加到可用性组侦听器的静态 IP 地址。此参数应该是字符串的列表。每个字符串都可以是采用斜杠形式的 IPv4 地址和子网掩码(例如 192.168.1.1/255.255.255.0),或者是 IPv6 地址。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>您要向其中添加 IP 地址的侦听器的 AvailabilityGroupListener 对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue><dev:type><maml:name>Target</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>可用性组侦听器的路径。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StaticIp</maml:name><maml:description><maml:para>要添加到可用性组侦听器的静态 IP 地址。此参数应该是字符串的列表。每个字符串都可以是采用斜杠形式的 IPv4 地址和子网掩码(例如 192.168.1.1/255.255.255.0),或者是 IPv6 地址。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroupListener</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>$path = "SQLSERVER:\SQL\PrimaryServer\InstanceName\AvailabilityGroups\MyAg\AvailabilityGroupListeners\MyListener" Add-SqlAvailabilityGroupListenerStaticIp -Path $path -StaticIp "2001:0db8:85a3:0000:0000:8a2e:0370:7334" </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此示例将静态 IPv4 地址添加到可用性组“MyAg”上的可用性组侦听器“MyListener”。此 IPv4 地址用作子网 255.255.252.0 上侦听器的虚拟 IP 地址。如果可用性组跨多个子网,则应将针对每个子网的静态 IP 地址添加到侦听器。必须对承载主副本的服务器实例执行 Add-SqlAvailabilityGroupListenerStaticIp 命令。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>$path = "SQLSERVER:\SQL\PrimaryServer\InstanceName\AvailabilityGroups\MyAg\AvailabilityGroupListeners\MyListener" Add-SqlAvailabilityGroupListenerStaticIp -Path $path -StaticIp "2001:0db8:85a3:0000:0000:8a2e:0370:7334" </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令将静态 IPv6 地址添加到可用性组“MyAg”上的侦听器“MyListener”。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>$path = "SQLSERVER:\SQL\PrimaryServer\InstanceName\AvailabilityGroups\MyAg\AvailabilityGroupListeners\MyListener" Add-SqlAvailabilityGroupListenerStaticIp -Path $path -StaticIp "192.168.0.1/255.255.255.0" -Script </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令输出一个 Transact-SQL 脚本,该脚本将静态 IPv4 地址添加到可用性组“MyAg”上的侦听器“MyListener”。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Add-SqlFirewallRule</command:name><maml:description><maml:para>添加一个 Windows 防火墙规则以允许连接到 SQL Server 的特定实例。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Add</command:verb><command:noun>SqlFirewallRule</command:noun><dev:version /></command:details><maml:description><maml:para>添加一个 Windows 防火墙规则以允许 SQL Server 的特定实例的连接。</maml:para><maml:para>SQL Server 云适配器必须在承载 SQL Server 实例的计算机上运行并且可访问它。</maml:para><maml:para>此 cmdlet 支持以下操作模式:</maml:para><maml:para>1.通过指定实例 PowerShell 路径。</maml:para><maml:para>2.通过指定服务器对象。</maml:para><maml:para>3.通过指定 SQL Server 目标实例的 ServerInstance。</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Add-SqlFirewallRule</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>指定一个在目标计算机上具有 Windows 管理员凭据的用户帐户。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>强制 cmdlet 在不提示用户的情况下自动接受目标计算机的 SQL Server 云适配器自签名的证书。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目标计算机的公共管理端口。当目标计算机的端口不能直接访问但是可通过端点公开(这意味着我们需要连接到不同的端口)时,应使用此参数。</maml:para><maml:para>SQL Server 云适配器必须可通过此端口访问。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您要在其中执行操作的 SQL Server 实例的路径。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目标服务器上重试命令的时间段。超时后,将不再重试。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Add-SqlFirewallRule</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>指定一个在目标计算机上具有 Windows 管理员凭据的用户帐户。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>强制 cmdlet 在不提示用户的情况下自动接受目标计算机的 SQL Server 云适配器自签名的证书。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目标计算机的公共管理端口。当目标计算机的端口不能直接访问但是可通过端点公开(这意味着我们需要连接到不同的端口)时,应使用此参数。</maml:para><maml:para>SQL Server 云适配器必须可通过此端口访问。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目标服务器上重试命令的时间段。超时后,将不再重试。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>SQL Server 目标实例的服务器对象。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Add-SqlFirewallRule</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>指定一个在目标计算机上具有 Windows 管理员凭据的用户帐户。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>强制 cmdlet 在不提示用户的情况下自动接受目标计算机的 SQL Server 云适配器自签名的证书。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目标计算机的公共管理端口。当目标计算机的端口不能直接访问但是可通过端点公开(这意味着我们需要连接到不同的端口)时,应使用此参数。</maml:para><maml:para>SQL Server 云适配器必须可通过此端口访问。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目标服务器上重试命令的时间段。超时后,将不再重试。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>此参数指定成为操作目标的 SQL Server 实例的名称。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>强制 cmdlet 在不提示用户的情况下自动接受目标计算机的 SQL Server 云适配器自签名的证书。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>指定一个在目标计算机上具有 Windows 管理员凭据的用户帐户。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>SQL Server 目标实例的服务器对象。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue><dev:type><maml:name>Server[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目标计算机的公共管理端口。当目标计算机的端口不能直接访问但是可通过端点公开(这意味着我们需要连接到不同的端口)时,应使用此参数。</maml:para><maml:para>SQL Server 云适配器必须可通过此端口访问。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您要在其中执行操作的 SQL Server 实例的路径。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目标服务器上重试命令的时间段。超时后,将不再重试。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>此参数指定成为操作目标的 SQL Server 实例的名称。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\>CD SQLSERVER:\SQL\Computer\Instance; Add-SqlFirewallRule -Credential $credential -AcceptSelfSignedCertificate; </dev:code><dev:remarks><maml:para>此命令在计算机“Computer”上添加一个 Windows 防火墙规则以允许连接到此计算机上的 SQL Server 实例“Instance”。当前工作目录用于确定应发生该操作的服务器实例。将在不提示用户的情况下自动接受目标计算机的自签名证书。</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>This command retrieves all instances of SQL Server on the machine ‘MachineName’ and adds Windows Firewall rules to allow connections for each one of them. The self-signed certificate of the target machine will be automatically accepted without prompting the user. PS C:\>Get-SqlInstance -Credential $credential -MachineName "MachineName" | Add-SqlFirewallRule -Credential $credential -AcceptSelfSignedCertificate; </dev:code><dev:remarks><maml:para></maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>Online Version:</maml:linkText><maml:uri></maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Backup-SqlDatabase</command:name><maml:description><maml:para>Backup-SqlDatabase cmdlet 在 SQL Server 数据库上执行备份操作。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Backup</command:verb><command:noun>SqlDatabase</command:noun><dev:version /></command:details><maml:description><maml:para>Backup-SqlDatabase cmdlet 在 SQL Server 数据库上执行备份操作。这包括完整数据库备份、事务日志备份和数据库文件备份。此 cmdlet 根据 Microsoft.SqlServer.Management.Smo.Backup 类进行仿造。此类的参数一般对应于 Smo 对象的属性。 </maml:para><maml:para>此 cmdlet 支持四个操作模式以在服务器实例上备份具有指定名称的数据库。 </maml:para><maml:para>1.将服务器实例的路径传送到 -Path 参数并将数据库名称传送到 -Database 参数。 </maml:para><maml:para>2.将 Smo.Server 对象传送到 -InputObject 参数(以直接方式或通过管道),并将数据库名称传送到 -Database 参数。 </maml:para><maml:para>3.将服务器实例的名称传送到 -ServerInstance 参数并将数据库名称传送到 -Database 参数。 </maml:para><maml:para>4.以直接方式或通过管道将 Smo.Database 对象传送到 -DatabaseObject 参数。 </maml:para><maml:para>默认情况下,cmdlet 执行完整数据库备份。通过指定 -BackupAction 参数可以设置备份的类型。 </maml:para><maml:para>默认情况下,备份文件以名称“databasename.bak”(对于完整备份和/或文件备份)和“databasename.trn”(对于日志备份)存储在默认服务器备份位置。 </maml:para><maml:para>通过指定 -BackupFile 参数可以设置备份文件的位置和文件名。使用 BackupFile 参数指定一个完全限定的备份文件名,它同时包含该文件的位置和名称。 </maml:para><maml:para>BackupContainer 参数用于设置备份文件的位置。在此示例中,自动生成备份文件本身的名称。BackupContainer:使用 BackupContainer 参数以仅指定备份文件的位置。有关详细信息,请参阅 BackupContainer 参数说明。 </maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Backup-SqlDatabase</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>要备份的数据库的名称。-Database 不能与 -DatabaseObject 参数结合使用。指定 </maml:para><maml:para>-Database 参数时,还必须指定 -Path、-InputObject 或 -ServerInstance 参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>BackupFile</maml:name><maml:description><maml:para>备份的位置和文件名。这是一个可选参数。如果未指定此参数,备份以名称“databasename.bak”(对于完整备份和文件备份)或“databasename.trn”(对于日志备份)存储在默认服务器备份位置。此参数不能与 BackupDevice 或 BackupContainer 参数结合使用。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupAction</maml:name><maml:description><maml:para>要执行的备份操作的类型。有效选项为 Database、Files 或 Log,如下所示: </maml:para><maml:para>Database:备份数据库中的所有数据文件。 </maml:para><maml:para>Files:备份指定的数据文件。这要求设置 DatabaseFile 或 DatabaseFileGroup 参数。 </maml:para><maml:para>Log:备份事务日志。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupActionType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupContainer</maml:name><maml:description><maml:para>存储备份的文件夹或位置。这可能是磁盘上的文件夹或 Windows Azure Blob 容器的 URL。在给定实例中备份多个数据库时,此参数很有用。此参数不能与 BackupDevice 参数结合使用。BackupContainer 参数不能与 BackupFile 参数结合使用。 </maml:para><maml:para>注意:用于指定位置的路径应以正斜杠 (/) 结尾。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupDevice</maml:name><maml:description><maml:para>存储备份的设备。此参数不能与 BackupFile 参数结合使用。如果您要备份到磁带,则使用此参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceItem[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupSetDescription</maml:name><maml:description><maml:para>备份集的可选说明。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupSetName</maml:name><maml:description><maml:para>备份集的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BlockSize</maml:name><maml:description><maml:para>备份的物理块大小(字节)。支持的大小是 512、1024、2048、4096、8192、16384、32768 和 65536 (64 KB) 字节。对于磁带设备默认为 65536,其他情况为 512。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BufferCount</maml:name><maml:description><maml:para>用于备份操作的 I/O 缓冲区总数。可以指定任意正整数。如果使用很多缓冲区,则可能由于 Sqlservr.exe 进程中的虚拟地址空间不足而导致发生“内存不足”错误。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Checksum</maml:name><maml:description><maml:para>在备份操作过程中计算校验和值。如果未设置,则不计算校验和。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>CompressionOption</maml:name><maml:description><maml:para>备份操作的压缩选项。选项为 Default、On 和 Off。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupCompressionOptions</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ContinueAfterError</maml:name><maml:description><maml:para>出现校验和错误时继续操作。如果未设置,则在出现校验和错误后操作将失败。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>CopyOnly</maml:name><maml:description><maml:para>备份为仅复制备份。仅复制备份不影响定期计划的常规备份的正常顺序。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFile</maml:name><maml:description><maml:para>要备份的一个或多个数据库文件。仅在 BackupAction 属性设置为 Files 时使用。BackupAction 参数设置为 Files 时,必须指定 DatabaseFileGroups 属性或 DatabaseFiles 属性。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFileGroup</maml:name><maml:description><maml:para>备份操作所针对的数据库文件组。仅在 BackupAction 属性设置为 Files 时使用。BackupAction 参数设置为 Files 时,必须指定 DatabaseFileGroups 属性或 DatabaseFiles 属性。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionOption</maml:name><maml:description><maml:para>备份操作的加密选项。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptionOptions</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ExpirationDate</maml:name><maml:description><maml:para>备份集过期且备份数据不再被视为有效时的日期和时间。只能用于在磁盘或磁带设备上存储的备份数据。存在时间超过过期日期的备份集可以被以后的备份覆盖。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">DateTime</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FormatMedia</maml:name><maml:description><maml:para>将磁带格式化作为备份操作的第一步。不适用于磁盘备份。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Incremental</maml:name><maml:description><maml:para>执行差异备份。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Initialize</maml:name><maml:description><maml:para>初始化与备份操作关联的设备。覆盖介质上的任何现有备份集,使此备份成为介质上的第一个备份集。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>LogTruncationType</maml:name><maml:description><maml:para>日志备份的截断行为。选项为 TruncateOnly、NoTruncate 或 Truncate。默认情况下,此选项设置为 Truncate。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupTruncateLogType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>要在备份介质和 SQL Server 实例之间传输的最大字节数。可能的值是 65536 字节 (64 KB) 的倍数,最多可到 4194304 字节 (4 MB)。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaDescription</maml:name><maml:description><maml:para>包含备份集的介质的可选说明。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaName</maml:name><maml:description><maml:para>用于标识介质集的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MirrorDevices</maml:name><maml:description><maml:para>指定镜像的备份使用的 BackupDeviceList 对象的数组。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceList[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRecovery</maml:name><maml:description><maml:para>不备份日志的结尾。还原时,数据库处于“正在还原”状态。未设置时,备份日志的结尾。仅当 -BackupAction 参数设置为 Log 时才适用。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRewind</maml:name><maml:description><maml:para>让磁带机在备份完成后在结束位置保留打开状态。未设置时,操作完成后将倒带。不适用于磁盘或 URL 备份。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>PassThru</maml:name><maml:description><maml:para>设置时,输出执行了备份的 Smo 备份对象。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>指向您要在其中执行备份操作的 SQL Server 实例的路径。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Restart</maml:name><maml:description><maml:para>继续处理部分完成的备份操作。如果未设置(默认值),则 cmdlet 将在备份集开始时重新启动中断的备份操作。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetainDays</maml:name><maml:description><maml:para>覆盖备份集前必须经历的天数。只能用于在磁盘或磁带设备上存储的备份数据。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SkipTapeHeader</maml:name><maml:description><maml:para>跳过读取磁带头。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>SQL Server 凭据对象存储身份验证信息。备份到 Windows Azure Blob 存储服务 (URL) 时,此参数是必需的。存储的身份验证信息包括 Windows Azure 存储帐户名称和相关的访问密钥值。此参数不用于磁盘或磁带。您可以提供 SQL Server 凭据的名称或通过管道传递对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UndoFileName</maml:name><maml:description><maml:para>用来存储在恢复过程中回滚的未提交事务的撤消文件的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UnloadTapeAfter</maml:name><maml:description><maml:para>操作完成后,磁带机将倒带并卸载。如果未设置,则不尝试倒带和卸载磁带介质。不适用于磁盘或 URL 备份。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Backup-SqlDatabase</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>DatabaseObject</maml:name><maml:description><maml:para>一个数据库对象。将在此数据库上执行备份操作。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Database</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>BackupFile</maml:name><maml:description><maml:para>备份的位置和文件名。这是一个可选参数。如果未指定此参数,备份以名称“databasename.bak”(对于完整备份和文件备份)或“databasename.trn”(对于日志备份)存储在默认服务器备份位置。此参数不能与 BackupDevice 或 BackupContainer 参数结合使用。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupAction</maml:name><maml:description><maml:para>要执行的备份操作的类型。有效选项为 Database、Files 或 Log,如下所示: </maml:para><maml:para>Database:备份数据库中的所有数据文件。 </maml:para><maml:para>Files:备份指定的数据文件。这要求设置 DatabaseFile 或 DatabaseFileGroup 参数。 </maml:para><maml:para>Log:备份事务日志。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupActionType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupContainer</maml:name><maml:description><maml:para>存储备份的文件夹或位置。这可能是磁盘上的文件夹或 Windows Azure Blob 容器的 URL。在给定实例中备份多个数据库时,此参数很有用。此参数不能与 BackupDevice 参数结合使用。BackupContainer 参数不能与 BackupFile 参数结合使用。 </maml:para><maml:para>注意:用于指定位置的路径应以正斜杠 (/) 结尾。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupDevice</maml:name><maml:description><maml:para>存储备份的设备。此参数不能与 BackupFile 参数结合使用。如果您要备份到磁带,则使用此参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceItem[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupSetDescription</maml:name><maml:description><maml:para>备份集的可选说明。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupSetName</maml:name><maml:description><maml:para>备份集的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BlockSize</maml:name><maml:description><maml:para>备份的物理块大小(字节)。支持的大小是 512、1024、2048、4096、8192、16384、32768 和 65536 (64 KB) 字节。对于磁带设备默认为 65536,其他情况为 512。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BufferCount</maml:name><maml:description><maml:para>用于备份操作的 I/O 缓冲区总数。可以指定任意正整数。如果使用很多缓冲区,则可能由于 Sqlservr.exe 进程中的虚拟地址空间不足而导致发生“内存不足”错误。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Checksum</maml:name><maml:description><maml:para>在备份操作过程中计算校验和值。如果未设置,则不计算校验和。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>CompressionOption</maml:name><maml:description><maml:para>备份操作的压缩选项。选项为 Default、On 和 Off。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupCompressionOptions</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ContinueAfterError</maml:name><maml:description><maml:para>出现校验和错误时继续操作。如果未设置,则在出现校验和错误后操作将失败。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>CopyOnly</maml:name><maml:description><maml:para>备份为仅复制备份。仅复制备份不影响定期计划的常规备份的正常顺序。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFile</maml:name><maml:description><maml:para>要备份的一个或多个数据库文件。仅在 BackupAction 属性设置为 Files 时使用。BackupAction 参数设置为 Files 时,必须指定 DatabaseFileGroups 属性或 DatabaseFiles 属性。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFileGroup</maml:name><maml:description><maml:para>备份操作所针对的数据库文件组。仅在 BackupAction 属性设置为 Files 时使用。BackupAction 参数设置为 Files 时,必须指定 DatabaseFileGroups 属性或 DatabaseFiles 属性。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionOption</maml:name><maml:description><maml:para>备份操作的加密选项。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptionOptions</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ExpirationDate</maml:name><maml:description><maml:para>备份集过期且备份数据不再被视为有效时的日期和时间。只能用于在磁盘或磁带设备上存储的备份数据。存在时间超过过期日期的备份集可以被以后的备份覆盖。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">DateTime</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FormatMedia</maml:name><maml:description><maml:para>将磁带格式化作为备份操作的第一步。不适用于磁盘备份。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Incremental</maml:name><maml:description><maml:para>执行差异备份。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Initialize</maml:name><maml:description><maml:para>初始化与备份操作关联的设备。覆盖介质上的任何现有备份集,使此备份成为介质上的第一个备份集。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>LogTruncationType</maml:name><maml:description><maml:para>日志备份的截断行为。选项为 TruncateOnly、NoTruncate 或 Truncate。默认情况下,此选项设置为 Truncate。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupTruncateLogType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>要在备份介质和 SQL Server 实例之间传输的最大字节数。可能的值是 65536 字节 (64 KB) 的倍数,最多可到 4194304 字节 (4 MB)。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaDescription</maml:name><maml:description><maml:para>包含备份集的介质的可选说明。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaName</maml:name><maml:description><maml:para>用于标识介质集的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MirrorDevices</maml:name><maml:description><maml:para>指定镜像的备份使用的 BackupDeviceList 对象的数组。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceList[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRecovery</maml:name><maml:description><maml:para>不备份日志的结尾。还原时,数据库处于“正在还原”状态。未设置时,备份日志的结尾。仅当 -BackupAction 参数设置为 Log 时才适用。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRewind</maml:name><maml:description><maml:para>让磁带机在备份完成后在结束位置保留打开状态。未设置时,操作完成后将倒带。不适用于磁盘或 URL 备份。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>PassThru</maml:name><maml:description><maml:para>设置时,输出执行了备份的 Smo 备份对象。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Restart</maml:name><maml:description><maml:para>继续处理部分完成的备份操作。如果未设置(默认值),则 cmdlet 将在备份集开始时重新启动中断的备份操作。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetainDays</maml:name><maml:description><maml:para>覆盖备份集前必须经历的天数。只能用于在磁盘或磁带设备上存储的备份数据。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SkipTapeHeader</maml:name><maml:description><maml:para>跳过读取磁带头。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>SQL Server 凭据对象存储身份验证信息。备份到 Windows Azure Blob 存储服务 (URL) 时,此参数是必需的。存储的身份验证信息包括 Windows Azure 存储帐户名称和相关的访问密钥值。此参数不用于磁盘或磁带。您可以提供 SQL Server 凭据的名称或通过管道传递对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UndoFileName</maml:name><maml:description><maml:para>用来存储在恢复过程中回滚的未提交事务的撤消文件的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UnloadTapeAfter</maml:name><maml:description><maml:para>操作完成后,磁带机将倒带并卸载。如果未设置,则不尝试倒带和卸载磁带介质。不适用于磁盘或 URL 备份。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Backup-SqlDatabase</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>要备份的数据库的名称。-Database 不能与 -DatabaseObject 参数结合使用。指定 </maml:para><maml:para>-Database 参数时,还必须指定 -Path、-InputObject 或 -ServerInstance 参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>BackupFile</maml:name><maml:description><maml:para>备份的位置和文件名。这是一个可选参数。如果未指定此参数,备份以名称“databasename.bak”(对于完整备份和文件备份)或“databasename.trn”(对于日志备份)存储在默认服务器备份位置。此参数不能与 BackupDevice 或 BackupContainer 参数结合使用。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupAction</maml:name><maml:description><maml:para>要执行的备份操作的类型。有效选项为 Database、Files 或 Log,如下所示: </maml:para><maml:para>Database:备份数据库中的所有数据文件。 </maml:para><maml:para>Files:备份指定的数据文件。这要求设置 DatabaseFile 或 DatabaseFileGroup 参数。 </maml:para><maml:para>Log:备份事务日志。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupActionType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupContainer</maml:name><maml:description><maml:para>存储备份的文件夹或位置。这可能是磁盘上的文件夹或 Windows Azure Blob 容器的 URL。在给定实例中备份多个数据库时,此参数很有用。此参数不能与 BackupDevice 参数结合使用。BackupContainer 参数不能与 BackupFile 参数结合使用。 </maml:para><maml:para>注意:用于指定位置的路径应以正斜杠 (/) 结尾。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupDevice</maml:name><maml:description><maml:para>存储备份的设备。此参数不能与 BackupFile 参数结合使用。如果您要备份到磁带,则使用此参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceItem[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupSetDescription</maml:name><maml:description><maml:para>备份集的可选说明。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupSetName</maml:name><maml:description><maml:para>备份集的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BlockSize</maml:name><maml:description><maml:para>备份的物理块大小(字节)。支持的大小是 512、1024、2048、4096、8192、16384、32768 和 65536 (64 KB) 字节。对于磁带设备默认为 65536,其他情况为 512。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BufferCount</maml:name><maml:description><maml:para>用于备份操作的 I/O 缓冲区总数。可以指定任意正整数。如果使用很多缓冲区,则可能由于 Sqlservr.exe 进程中的虚拟地址空间不足而导致发生“内存不足”错误。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Checksum</maml:name><maml:description><maml:para>在备份操作过程中计算校验和值。如果未设置,则不计算校验和。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>CompressionOption</maml:name><maml:description><maml:para>备份操作的压缩选项。选项为 Default、On 和 Off。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupCompressionOptions</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionTimeout</maml:name><maml:description><maml:para>在超时失败之前等待服务器连接的秒数。超时值必须是 0 和 65534 之间的整数。如果指定 0,则连接尝试将没有超时限制。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ContinueAfterError</maml:name><maml:description><maml:para>出现校验和错误时继续操作。如果未设置,则在出现校验和错误后操作将失败。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>CopyOnly</maml:name><maml:description><maml:para>备份为仅复制备份。仅复制备份不影响定期计划的常规备份的正常顺序。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>一个 PSCredential 对象,用于为有权执行此操作的 SQL Server 登录名指定凭据。 它不是用于存储身份验证信息的 SQL 凭据对象,当访问 SQL Server 外部资源时由 SQL Server 在内部使用该对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFile</maml:name><maml:description><maml:para>要备份的一个或多个数据库文件。仅在 BackupAction 属性设置为 Files 时使用。BackupAction 参数设置为 Files 时,必须指定 DatabaseFileGroups 属性或 DatabaseFiles 属性。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFileGroup</maml:name><maml:description><maml:para>备份操作所针对的数据库文件组。仅在 BackupAction 属性设置为 Files 时使用。BackupAction 参数设置为 Files 时,必须指定 DatabaseFileGroups 属性或 DatabaseFiles 属性。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionOption</maml:name><maml:description><maml:para>备份操作的加密选项。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptionOptions</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ExpirationDate</maml:name><maml:description><maml:para>备份集过期且备份数据不再被视为有效时的日期和时间。只能用于在磁盘或磁带设备上存储的备份数据。存在时间超过过期日期的备份集可以被以后的备份覆盖。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">DateTime</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FormatMedia</maml:name><maml:description><maml:para>将磁带格式化作为备份操作的第一步。不适用于磁盘备份。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Incremental</maml:name><maml:description><maml:para>执行差异备份。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Initialize</maml:name><maml:description><maml:para>初始化与备份操作关联的设备。覆盖介质上的任何现有备份集,使此备份成为介质上的第一个备份集。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>LogTruncationType</maml:name><maml:description><maml:para>日志备份的截断行为。选项为 TruncateOnly、NoTruncate 或 Truncate。默认情况下,此选项设置为 Truncate。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupTruncateLogType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>要在备份介质和 SQL Server 实例之间传输的最大字节数。可能的值是 65536 字节 (64 KB) 的倍数,最多可到 4194304 字节 (4 MB)。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaDescription</maml:name><maml:description><maml:para>包含备份集的介质的可选说明。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaName</maml:name><maml:description><maml:para>用于标识介质集的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MirrorDevices</maml:name><maml:description><maml:para>指定镜像的备份使用的 BackupDeviceList 对象的数组。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceList[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRecovery</maml:name><maml:description><maml:para>不备份日志的结尾。还原时,数据库处于“正在还原”状态。未设置时,备份日志的结尾。仅当 -BackupAction 参数设置为 Log 时才适用。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRewind</maml:name><maml:description><maml:para>让磁带机在备份完成后在结束位置保留打开状态。未设置时,操作完成后将倒带。不适用于磁盘或 URL 备份。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>PassThru</maml:name><maml:description><maml:para>设置时,输出执行了备份的 Smo 备份对象。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Restart</maml:name><maml:description><maml:para>继续处理部分完成的备份操作。如果未设置(默认值),则 cmdlet 将在备份集开始时重新启动中断的备份操作。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetainDays</maml:name><maml:description><maml:para>覆盖备份集前必须经历的天数。只能用于在磁盘或磁带设备上存储的备份数据。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SkipTapeHeader</maml:name><maml:description><maml:para>跳过读取磁带头。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>SQL Server 凭据对象存储身份验证信息。备份到 Windows Azure Blob 存储服务 (URL) 时,此参数是必需的。存储的身份验证信息包括 Windows Azure 存储帐户名称和相关的访问密钥值。此参数不用于磁盘或磁带。您可以提供 SQL Server 凭据的名称或通过管道传递对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UndoFileName</maml:name><maml:description><maml:para>用来存储在恢复过程中回滚的未提交事务的撤消文件的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UnloadTapeAfter</maml:name><maml:description><maml:para>操作完成后,磁带机将倒带并卸载。如果未设置,则不尝试倒带和卸载磁带介质。不适用于磁盘或 URL 备份。 </maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>SQL Server 实例的名称。此服务器实例成为备份操作的目标。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Backup-SqlDatabase</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>要备份的数据库的名称。-Database 不能与 -DatabaseObject 参数结合使用。指定 </maml:para><maml:para>-Database 参数时,还必须指定 -Path、-InputObject 或 -ServerInstance 参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>BackupFile</maml:name><maml:description><maml:para>备份的位置和文件名。这是一个可选参数。如果未指定此参数,备份以名称“databasename.bak”(对于完整备份和文件备份)或“databasename.trn”(对于日志备份)存储在默认服务器备份位置。此参数不能与 BackupDevice 或 BackupContainer 参数结合使用。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupAction</maml:name><maml:description><maml:para>要执行的备份操作的类型。有效选项为 Database、Files 或 Log,如下所示: </maml:para><maml:para>Database:备份数据库中的所有数据文件。 </maml:para><maml:para>Files:备份指定的数据文件。这要求设置 DatabaseFile 或 DatabaseFileGroup 参数。 </maml:para><maml:para>Log:备份事务日志。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupActionType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupContainer</maml:name><maml:description><maml:para>存储备份的文件夹或位置。这可能是磁盘上的文件夹或 Windows Azure Blob 容器的 URL。在给定实例中备份多个数据库时,此参数很有用。此参数不能与 BackupDevice 参数结合使用。BackupContainer 参数不能与 BackupFile 参数结合使用。 </maml:para><maml:para>注意:用于指定位置的路径应以正斜杠 (/) 结尾。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupDevice</maml:name><maml:description><maml:para>存储备份的设备。此参数不能与 BackupFile 参数结合使用。如果您要备份到磁带,则使用此参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceItem[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupSetDescription</maml:name><maml:description><maml:para>备份集的可选说明。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupSetName</maml:name><maml:description><maml:para>备份集的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BlockSize</maml:name><maml:description><maml:para>备份的物理块大小(字节)。支持的大小是 512、1024、2048、4096、8192、16384、32768 和 65536 (64 KB) 字节。对于磁带设备默认为 65536,其他情况为 512。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BufferCount</maml:name><maml:description><maml:para>用于备份操作的 I/O 缓冲区总数。可以指定任意正整数。如果使用很多缓冲区,则可能由于 Sqlservr.exe 进程中的虚拟地址空间不足而导致发生“内存不足”错误。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Checksum</maml:name><maml:description><maml:para>在备份操作过程中计算校验和值。如果未设置,则不计算校验和。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>CompressionOption</maml:name><maml:description><maml:para>备份操作的压缩选项。选项为 Default、On 和 Off。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupCompressionOptions</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ContinueAfterError</maml:name><maml:description><maml:para>出现校验和错误时继续操作。如果未设置,则在出现校验和错误后操作将失败。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>CopyOnly</maml:name><maml:description><maml:para>备份为仅复制备份。仅复制备份不影响定期计划的常规备份的正常顺序。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFile</maml:name><maml:description><maml:para>要备份的一个或多个数据库文件。仅在 BackupAction 属性设置为 Files 时使用。BackupAction 参数设置为 Files 时,必须指定 DatabaseFileGroups 属性或 DatabaseFiles 属性。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFileGroup</maml:name><maml:description><maml:para>备份操作所针对的数据库文件组。仅在 BackupAction 属性设置为 Files 时使用。BackupAction 参数设置为 Files 时,必须指定 DatabaseFileGroups 属性或 DatabaseFiles 属性。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionOption</maml:name><maml:description><maml:para>备份操作的加密选项。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptionOptions</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ExpirationDate</maml:name><maml:description><maml:para>备份集过期且备份数据不再被视为有效时的日期和时间。只能用于在磁盘或磁带设备上存储的备份数据。存在时间超过过期日期的备份集可以被以后的备份覆盖。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">DateTime</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FormatMedia</maml:name><maml:description><maml:para>将磁带格式化作为备份操作的第一步。不适用于磁盘备份。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Incremental</maml:name><maml:description><maml:para>执行差异备份。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Initialize</maml:name><maml:description><maml:para>初始化与备份操作关联的设备。覆盖介质上的任何现有备份集,使此备份成为介质上的第一个备份集。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>LogTruncationType</maml:name><maml:description><maml:para>日志备份的截断行为。选项为 TruncateOnly、NoTruncate 或 Truncate。默认情况下,此选项设置为 Truncate。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupTruncateLogType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>要在备份介质和 SQL Server 实例之间传输的最大字节数。可能的值是 65536 字节 (64 KB) 的倍数,最多可到 4194304 字节 (4 MB)。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaDescription</maml:name><maml:description><maml:para>包含备份集的介质的可选说明。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaName</maml:name><maml:description><maml:para>用于标识介质集的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MirrorDevices</maml:name><maml:description><maml:para>指定镜像的备份使用的 BackupDeviceList 对象的数组。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceList[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRecovery</maml:name><maml:description><maml:para>不备份日志的结尾。还原时,数据库处于“正在还原”状态。未设置时,备份日志的结尾。仅当 -BackupAction 参数设置为 Log 时才适用。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRewind</maml:name><maml:description><maml:para>让磁带机在备份完成后在结束位置保留打开状态。未设置时,操作完成后将倒带。不适用于磁盘或 URL 备份。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>PassThru</maml:name><maml:description><maml:para>设置时,输出执行了备份的 Smo 备份对象。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Restart</maml:name><maml:description><maml:para>继续处理部分完成的备份操作。如果未设置(默认值),则 cmdlet 将在备份集开始时重新启动中断的备份操作。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetainDays</maml:name><maml:description><maml:para>覆盖备份集前必须经历的天数。只能用于在磁盘或磁带设备上存储的备份数据。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SkipTapeHeader</maml:name><maml:description><maml:para>跳过读取磁带头。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>SQL Server 凭据对象存储身份验证信息。备份到 Windows Azure Blob 存储服务 (URL) 时,此参数是必需的。存储的身份验证信息包括 Windows Azure 存储帐户名称和相关的访问密钥值。此参数不用于磁盘或磁带。您可以提供 SQL Server 凭据的名称或通过管道传递对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UndoFileName</maml:name><maml:description><maml:para>用来存储在恢复过程中回滚的未提交事务的撤消文件的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UnloadTapeAfter</maml:name><maml:description><maml:para>操作完成后,磁带机将倒带并卸载。如果未设置,则不尝试倒带和卸载磁带介质。不适用于磁盘或 URL 备份。 </maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>应发生备份的位置的服务器对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Backup-SqlDatabase</maml:name><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>BackupFile</maml:name><maml:description><maml:para>备份的位置和文件名。这是一个可选参数。如果未指定此参数,备份以名称“databasename.bak”(对于完整备份和文件备份)或“databasename.trn”(对于日志备份)存储在默认服务器备份位置。此参数不能与 BackupDevice 或 BackupContainer 参数结合使用。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupAction</maml:name><maml:description><maml:para>要执行的备份操作的类型。有效选项为 Database、Files 或 Log,如下所示: </maml:para><maml:para>Database:备份数据库中的所有数据文件。 </maml:para><maml:para>Files:备份指定的数据文件。这要求设置 DatabaseFile 或 DatabaseFileGroup 参数。 </maml:para><maml:para>Log:备份事务日志。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupActionType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupContainer</maml:name><maml:description><maml:para>存储备份的文件夹或位置。这可能是磁盘上的文件夹或 Windows Azure Blob 容器的 URL。在给定实例中备份多个数据库时,此参数很有用。此参数不能与 BackupDevice 参数结合使用。BackupContainer 参数不能与 BackupFile 参数结合使用。 </maml:para><maml:para>注意:用于指定位置的路径应以正斜杠 (/) 结尾。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupDevice</maml:name><maml:description><maml:para>存储备份的设备。此参数不能与 BackupFile 参数结合使用。如果您要备份到磁带,则使用此参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceItem[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupSetDescription</maml:name><maml:description><maml:para>备份集的可选说明。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupSetName</maml:name><maml:description><maml:para>备份集的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BlockSize</maml:name><maml:description><maml:para>备份的物理块大小(字节)。支持的大小是 512、1024、2048、4096、8192、16384、32768 和 65536 (64 KB) 字节。对于磁带设备默认为 65536,其他情况为 512。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BufferCount</maml:name><maml:description><maml:para>用于备份操作的 I/O 缓冲区总数。可以指定任意正整数。如果使用很多缓冲区,则可能由于 Sqlservr.exe 进程中的虚拟地址空间不足而导致发生“内存不足”错误。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Checksum</maml:name><maml:description><maml:para>在备份操作过程中计算校验和值。如果未设置,则不计算校验和。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>CompressionOption</maml:name><maml:description><maml:para>备份操作的压缩选项。选项为 Default、On 和 Off。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupCompressionOptions</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ContinueAfterError</maml:name><maml:description><maml:para>出现校验和错误时继续操作。如果未设置,则在出现校验和错误后操作将失败。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>CopyOnly</maml:name><maml:description><maml:para>备份为仅复制备份。仅复制备份不影响定期计划的常规备份的正常顺序。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFile</maml:name><maml:description><maml:para>要备份的一个或多个数据库文件。仅在 BackupAction 属性设置为 Files 时使用。BackupAction 参数设置为 Files 时,必须指定 DatabaseFileGroups 属性或 DatabaseFiles 属性。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFileGroup</maml:name><maml:description><maml:para>备份操作所针对的数据库文件组。仅在 BackupAction 属性设置为 Files 时使用。BackupAction 参数设置为 Files 时,必须指定 DatabaseFileGroups 属性或 DatabaseFiles 属性。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionOption</maml:name><maml:description><maml:para>备份操作的加密选项。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptionOptions</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ExpirationDate</maml:name><maml:description><maml:para>备份集过期且备份数据不再被视为有效时的日期和时间。只能用于在磁盘或磁带设备上存储的备份数据。存在时间超过过期日期的备份集可以被以后的备份覆盖。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">DateTime</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FormatMedia</maml:name><maml:description><maml:para>将磁带格式化作为备份操作的第一步。不适用于磁盘备份。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Incremental</maml:name><maml:description><maml:para>执行差异备份。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Initialize</maml:name><maml:description><maml:para>初始化与备份操作关联的设备。覆盖介质上的任何现有备份集,使此备份成为介质上的第一个备份集。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>LogTruncationType</maml:name><maml:description><maml:para>日志备份的截断行为。选项为 TruncateOnly、NoTruncate 或 Truncate。默认情况下,此选项设置为 Truncate。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupTruncateLogType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>要在备份介质和 SQL Server 实例之间传输的最大字节数。可能的值是 65536 字节 (64 KB) 的倍数,最多可到 4194304 字节 (4 MB)。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaDescription</maml:name><maml:description><maml:para>包含备份集的介质的可选说明。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaName</maml:name><maml:description><maml:para>用于标识介质集的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MirrorDevices</maml:name><maml:description><maml:para>指定镜像的备份使用的 BackupDeviceList 对象的数组。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceList[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRecovery</maml:name><maml:description><maml:para>不备份日志的结尾。还原时,数据库处于“正在还原”状态。未设置时,备份日志的结尾。仅当 -BackupAction 参数设置为 Log 时才适用。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRewind</maml:name><maml:description><maml:para>让磁带机在备份完成后在结束位置保留打开状态。未设置时,操作完成后将倒带。不适用于磁盘或 URL 备份。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>PassThru</maml:name><maml:description><maml:para>设置时,输出执行了备份的 Smo 备份对象。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Restart</maml:name><maml:description><maml:para>继续处理部分完成的备份操作。如果未设置(默认值),则 cmdlet 将在备份集开始时重新启动中断的备份操作。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetainDays</maml:name><maml:description><maml:para>覆盖备份集前必须经历的天数。只能用于在磁盘或磁带设备上存储的备份数据。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SkipTapeHeader</maml:name><maml:description><maml:para>跳过读取磁带头。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>SQL Server 凭据对象存储身份验证信息。备份到 Windows Azure Blob 存储服务 (URL) 时,此参数是必需的。存储的身份验证信息包括 Windows Azure 存储帐户名称和相关的访问密钥值。此参数不用于磁盘或磁带。您可以提供 SQL Server 凭据的名称或通过管道传递对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UndoFileName</maml:name><maml:description><maml:para>用来存储在恢复过程中回滚的未提交事务的撤消文件的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UnloadTapeAfter</maml:name><maml:description><maml:para>操作完成后,磁带机将倒带并卸载。如果未设置,则不尝试倒带和卸载磁带介质。不适用于磁盘或 URL 备份。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupAction</maml:name><maml:description><maml:para>要执行的备份操作的类型。有效选项为 Database、Files 或 Log,如下所示: </maml:para><maml:para>Database:备份数据库中的所有数据文件。 </maml:para><maml:para>Files:备份指定的数据文件。这要求设置 DatabaseFile 或 DatabaseFileGroup 参数。 </maml:para><maml:para>Log:备份事务日志。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupActionType</command:parameterValue><dev:type><maml:name>BackupActionType</maml:name><maml:uri /></dev:type><dev:defaultValue>Microsoft.SqlServer.Management.Smo.BackupActionType.Database</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupContainer</maml:name><maml:description><maml:para>存储备份的文件夹或位置。这可能是磁盘上的文件夹或 Windows Azure Blob 容器的 URL。在给定实例中备份多个数据库时,此参数很有用。此参数不能与 BackupDevice 参数结合使用。BackupContainer 参数不能与 BackupFile 参数结合使用。 </maml:para><maml:para>注意:用于指定位置的路径应以正斜杠 (/) 结尾。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupDevice</maml:name><maml:description><maml:para>存储备份的设备。此参数不能与 BackupFile 参数结合使用。如果您要备份到磁带,则使用此参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceItem[]</command:parameterValue><dev:type><maml:name>BackupDeviceItem[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>BackupFile</maml:name><maml:description><maml:para>备份的位置和文件名。这是一个可选参数。如果未指定此参数,备份以名称“databasename.bak”(对于完整备份和文件备份)或“databasename.trn”(对于日志备份)存储在默认服务器备份位置。此参数不能与 BackupDevice 或 BackupContainer 参数结合使用。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupSetDescription</maml:name><maml:description><maml:para>备份集的可选说明。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupSetName</maml:name><maml:description><maml:para>备份集的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BlockSize</maml:name><maml:description><maml:para>备份的物理块大小(字节)。支持的大小是 512、1024、2048、4096、8192、16384、32768 和 65536 (64 KB) 字节。对于磁带设备默认为 65536,其他情况为 512。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BufferCount</maml:name><maml:description><maml:para>用于备份操作的 I/O 缓冲区总数。可以指定任意正整数。如果使用很多缓冲区,则可能由于 Sqlservr.exe 进程中的虚拟地址空间不足而导致发生“内存不足”错误。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Checksum</maml:name><maml:description><maml:para>在备份操作过程中计算校验和值。如果未设置,则不计算校验和。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>CompressionOption</maml:name><maml:description><maml:para>备份操作的压缩选项。选项为 Default、On 和 Off。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupCompressionOptions</command:parameterValue><dev:type><maml:name>BackupCompressionOptions</maml:name><maml:uri /></dev:type><dev:defaultValue>Microsoft.SqlServer.Management.Smo.BackupCompressionOptions.Default</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionTimeout</maml:name><maml:description><maml:para>在超时失败之前等待服务器连接的秒数。超时值必须是 0 和 65534 之间的整数。如果指定 0,则连接尝试将没有超时限制。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ContinueAfterError</maml:name><maml:description><maml:para>出现校验和错误时继续操作。如果未设置,则在出现校验和错误后操作将失败。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>CopyOnly</maml:name><maml:description><maml:para>备份为仅复制备份。仅复制备份不影响定期计划的常规备份的正常顺序。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>一个 PSCredential 对象,用于为有权执行此操作的 SQL Server 登录名指定凭据。 它不是用于存储身份验证信息的 SQL 凭据对象,当访问 SQL Server 外部资源时由 SQL Server 在内部使用该对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>要备份的数据库的名称。-Database 不能与 -DatabaseObject 参数结合使用。指定 </maml:para><maml:para>-Database 参数时,还必须指定 -Path、-InputObject 或 -ServerInstance 参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFile</maml:name><maml:description><maml:para>要备份的一个或多个数据库文件。仅在 BackupAction 属性设置为 Files 时使用。BackupAction 参数设置为 Files 时,必须指定 DatabaseFileGroups 属性或 DatabaseFiles 属性。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFileGroup</maml:name><maml:description><maml:para>备份操作所针对的数据库文件组。仅在 BackupAction 属性设置为 Files 时使用。BackupAction 参数设置为 Files 时,必须指定 DatabaseFileGroups 属性或 DatabaseFiles 属性。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>DatabaseObject</maml:name><maml:description><maml:para>一个数据库对象。将在此数据库上执行备份操作。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Database</command:parameterValue><dev:type><maml:name>Database</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionOption</maml:name><maml:description><maml:para>备份操作的加密选项。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptionOptions</command:parameterValue><dev:type><maml:name>BackupEncryptionOptions</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ExpirationDate</maml:name><maml:description><maml:para>备份集过期且备份数据不再被视为有效时的日期和时间。只能用于在磁盘或磁带设备上存储的备份数据。存在时间超过过期日期的备份集可以被以后的备份覆盖。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">DateTime</command:parameterValue><dev:type><maml:name>DateTime</maml:name><maml:uri /></dev:type><dev:defaultValue>System.DateTime.MinValue</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FormatMedia</maml:name><maml:description><maml:para>将磁带格式化作为备份操作的第一步。不适用于磁盘备份。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Incremental</maml:name><maml:description><maml:para>执行差异备份。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Initialize</maml:name><maml:description><maml:para>初始化与备份操作关联的设备。覆盖介质上的任何现有备份集,使此备份成为介质上的第一个备份集。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>应发生备份的位置的服务器对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue><dev:type><maml:name>Server[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>LogTruncationType</maml:name><maml:description><maml:para>日志备份的截断行为。选项为 TruncateOnly、NoTruncate 或 Truncate。默认情况下,此选项设置为 Truncate。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupTruncateLogType</command:parameterValue><dev:type><maml:name>BackupTruncateLogType</maml:name><maml:uri /></dev:type><dev:defaultValue>Microsoft.SqlServer.Management.Smo.BackupTruncateLogType.Truncate</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>要在备份介质和 SQL Server 实例之间传输的最大字节数。可能的值是 65536 字节 (64 KB) 的倍数,最多可到 4194304 字节 (4 MB)。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaDescription</maml:name><maml:description><maml:para>包含备份集的介质的可选说明。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaName</maml:name><maml:description><maml:para>用于标识介质集的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MirrorDevices</maml:name><maml:description><maml:para>指定镜像的备份使用的 BackupDeviceList 对象的数组。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceList[]</command:parameterValue><dev:type><maml:name>BackupDeviceList[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRecovery</maml:name><maml:description><maml:para>不备份日志的结尾。还原时,数据库处于“正在还原”状态。未设置时,备份日志的结尾。仅当 -BackupAction 参数设置为 Log 时才适用。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRewind</maml:name><maml:description><maml:para>让磁带机在备份完成后在结束位置保留打开状态。未设置时,操作完成后将倒带。不适用于磁盘或 URL 备份。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>PassThru</maml:name><maml:description><maml:para>设置时,输出执行了备份的 Smo 备份对象。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>指向您要在其中执行备份操作的 SQL Server 实例的路径。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Restart</maml:name><maml:description><maml:para>继续处理部分完成的备份操作。如果未设置(默认值),则 cmdlet 将在备份集开始时重新启动中断的备份操作。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetainDays</maml:name><maml:description><maml:para>覆盖备份集前必须经历的天数。只能用于在磁盘或磁带设备上存储的备份数据。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue>-1</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>SQL Server 实例的名称。此服务器实例成为备份操作的目标。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SkipTapeHeader</maml:name><maml:description><maml:para>跳过读取磁带头。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>SQL Server 凭据对象存储身份验证信息。备份到 Windows Azure Blob 存储服务 (URL) 时,此参数是必需的。存储的身份验证信息包括 Windows Azure 存储帐户名称和相关的访问密钥值。此参数不用于磁盘或磁带。您可以提供 SQL Server 凭据的名称或通过管道传递对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue><dev:type><maml:name>PSObject</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UndoFileName</maml:name><maml:description><maml:para>用来存储在恢复过程中回滚的未提交事务的撤消文件的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UnloadTapeAfter</maml:name><maml:description><maml:para>操作完成后,磁带机将倒带并卸载。如果未设置,则不尝试倒带和卸载磁带介质。不适用于磁盘或 URL 备份。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>SMO.Server</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para> 一个 SMO.Server 对象,指示应发生备份操作的 SQL Server 实例。 </maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Backup-SqlDatabase -ServerInstance Computer\Instance -Database MyDB </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令创建数据库“MyDB”的完整数据库备份到服务器实例“Computer\Instance”的默认备份位置。备份文件名为“MyDB.bak”。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>cd SQLSERVER:\SQL\Computer\Instance Backup-SqlDatabase -Database MyDB </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令创建数据库“MyDB”的完整数据库备份到服务器实例“Computer\Instance”的默认备份位置。当前工作目录用于确定应发生备份的服务器实例。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Backup-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupAction Log </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令创建数据库“MyDB”的事务日志备份到服务器实例“Computer\Instance”的默认备份位置。备份文件名为“MyDB.trn”。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Backup-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -Credential (Get-Credential sa) </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令使用 sa SQL Server 登录名创建数据库“MyDB”的完整数据库备份。此命令将提示您输入密码以完成 SQL Server 身份验证。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Backup-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupFile \\share\folder\MyDB.bak </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令创建数据库“MyDB”的完整数据库备份到文件“\\share\folder\MyDB.bak”。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Get-ChildItem SQLSERVER:\SQL\Computer\Instance\Databases | Backup-SqlDatabase </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令将服务器实例“Computer\Instance”上的所有数据库备份到默认备份位置。备份文件名为“<数据库名称>.bak”。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>cd SQLSERVER:\SQL\Computer\Instance\Databases foreach($database in (Get-ChildItem)) { $dbName = $database.Name Backup-SqlDatabase -Database $dbName -BackupFile "\\share\folder\$dbName.bak" } </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此脚本创建服务器实例“Computer\Instance”上每个数据库的完整备份到共享名“\\share\folder”。备份文件名为“<数据库名称>.bak”。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Backup-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupAction Files -DatabaseFileGroup "FileGroup1","FileGroup2" </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令创建辅助文件组“FileGroup1”和“FileGroup2”中的每个文件的完整文件备份。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 9 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Backup-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -Incremental </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令创建数据库“MyDB”的差异备份到服务器实例“Computer\Instance”的默认备份位置。备份文件名为“MyDB.bak”。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 10 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>$tapeDevice = New-Object Microsoft.Sqlserver.Management.Smo.BackupDeviceItem("\\.\tape0", "Tape") Backup-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupDevice $tapeDevice </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令创建数据库“MyDB”的完整备份到磁带设备“\\.\tape0”。为表示此设备,此命令构造一个 Microsoft.Sqlserver.Management.Smo.BackupDeviceItem 实例。此构造函数采用两个参数:备份设备的名称 ('\\.\tape0') 和备份设备的类型 ('Tape')。然后,此 BackupDeviceItem 对象传递到 Backup-SqlDatabase cmdlet 的 -BackupDevice 参数。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 11 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\>Backup-SqlDatabase –ServerInstance Computer\Instance –Database –MyDB -BackupContainer "https://storageaccountname.blob.core.windows.net/containername" -SqlCredential "SQLCredentialName" </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令创建数据库“MyDB”的完整备份到 Windows Azure Blob 存储服务。它使用 BackupContainer 指定 Windows Azure Blob 容器的位置 (URL) 并自动生成备份文件的名称。SqlCredential 参数用于指定存储身份验证信息的 SQL Server 凭据的名称。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 12 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\>Backup-SqlDatabase –ServerInstance Computer\Instance –Database –MyDB -BackupFile "https://storageaccountname.blob.core.windows.net/containername/MyDB.bak" -SqlCredential "SQLCredentialName" </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令创建数据库“MyDB”的完整备份到 Windows Azure Blob 存储服务。它使用 BackupFile 参数指定位置 (URL) 和备份文件名。SqlCredential 参数用于指定 SQL Server 凭据的名称。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 13 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Get-ChildItem SQLSERVER:\SQL\Computer\Instance\Databases | Backup-SqlDatabase –BackupContainer "https://storageaccountname.blob.core.windows.net/containername" -SqlCredential "SQLCredentialName" </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令通过使用 BackupContainer 参数将服务器实例“Computer\Instance”上的所有数据库备份到 Windows Azure Blob 存储服务位置。自动生成备份文件名。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 14 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>$encryptionOption = New-SqlBackupEncryptionOption -Algorithm Aes256 -EncryptorType ServerCertificate -EncryptorName "BackupCert" </dev:code><dev:code>C:\PS>Backup-SqlDatabase -ServerInstance . -Database "db1" -BackupFile "db1.bak" -CompressionOption On -EncryptionOption $encryptionOption </dev:code><dev:remarks><maml:para>此示例创建加密选项并在 Backup-SqlDatabase 中将它作为参数值以创建加密的备份。</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Disable-SqlAlwaysOn</command:name><maml:description><maml:para>针对由 Path、InputObject 或 ServerInstance 参数指定的 SQL Server 实例禁用 AlwaysOn 可用性组功能。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Disable</command:verb><command:noun>SqlAlwaysOn</command:noun><dev:version /></command:details><maml:description><maml:para>Disable-SqlAlwaysOn cmdlet 对 SQL Server 实例禁用 AlwaysOn 可用性组功能。如果当 SQL Server 服务正在运行时禁用 AlwaysOn 可用性组,则必须重新启动数据库引擎服务才能完成更改。除非您指定 -Force 参数,否则,cmdlet 将询问您是否要重新启动服务;如果取消,将不会发生任何操作。 </maml:para><maml:para>如果已禁用“AlwaysOn 可用性组”,则此 cmdlet 将不执行任何操作。 </maml:para><maml:para>此 cmdlet 可对远程设备运行。您必须拥有管理员权限才能执行此 cmdlet。 </maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Disable-SqlAlwaysOn</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>SQL Server 实例的路径。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>有权修改指定 SQL Server 实例上的 AlwaysOn 设置的 Windows 凭据。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Force</maml:name><maml:description><maml:para>指定 -Force 可以强制 cmdlet 继续而无需来自用户的任何确认。提供此参数是为了允许构建脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>不提示用户重新启动 SQL Server 服务。您必须手动重新启动 SQL Server 服务,以便使更改生效。设置此参数后,将忽略 -Force。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Disable-SqlAlwaysOn</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>应禁用 AlwaysOn 可用性组设置的 SQL Server 实例的服务器对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Server</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>有权修改指定 SQL Server 实例上的 AlwaysOn 设置的 Windows 凭据。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Force</maml:name><maml:description><maml:para>指定 -Force 可以强制 cmdlet 继续而无需来自用户的任何确认。提供此参数是为了允许构建脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>不提示用户重新启动 SQL Server 服务。您必须手动重新启动 SQL Server 服务,以便使更改生效。设置此参数后,将忽略 -Force。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Disable-SqlAlwaysOn</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>有权修改指定 SQL Server 实例上的 AlwaysOn 设置的 Windows 凭据。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Force</maml:name><maml:description><maml:para>指定 -Force 可以强制 cmdlet 继续而无需来自用户的任何确认。提供此参数是为了允许构建脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>不提示用户重新启动 SQL Server 服务。您必须手动重新启动 SQL Server 服务,以便使更改生效。设置此参数后,将忽略 -Force。 </maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>要禁用 AlwaysOn 的 SQL Server 实例的名称。格式应该为 MACHINENAME\INSTANCE。可与 -Credential 参数一起使用以便更改远程服务器上的 AlwaysOn 设置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>有权修改指定 SQL Server 实例上的 AlwaysOn 设置的 Windows 凭据。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Force</maml:name><maml:description><maml:para>指定 -Force 可以强制 cmdlet 继续而无需来自用户的任何确认。提供此参数是为了允许构建脚本。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>应禁用 AlwaysOn 可用性组设置的 SQL Server 实例的服务器对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Server</command:parameterValue><dev:type><maml:name>Server</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>不提示用户重新启动 SQL Server 服务。您必须手动重新启动 SQL Server 服务,以便使更改生效。设置此参数后,将忽略 -Force。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>False</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>SQL Server 实例的路径。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>要禁用 AlwaysOn 的 SQL Server 实例的名称。格式应该为 MACHINENAME\INSTANCE。可与 -Credential 参数一起使用以便更改远程服务器上的 AlwaysOn 设置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>SMO.Server</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para> 一个 SMO.Server 对象,指示应禁用 AlwaysOn 的 SQL Server 实例。 </maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name>False</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Disable-SqlAlwaysOn -Path SQLSERVER:\Sql\Computer\Instance </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令禁用位于指定路径中的 SQL Server 实例上的 AlwaysOn 可用性组。此命令要求重新启动服务器实例,并且还将提示您确认此重新启动。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Disable-SqlAlwaysOn -Path SQLSERVER:\Sql\Computer\Instance -Force </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令禁用位于指定路径中的 SQL Server 实例上的 AlwaysOn 可用性组。-Force 选项将导致服务器实例重新启动并且不会提示您进行确认。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Disable-SqlAlwaysOn -ServerInstance Computer\Instance </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令禁用名为“Computer\Instance”的 SQL Server 实例上的 AlwaysOn 可用性组。此命令需要重新启动实例,并将提示您确认此重新启动。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Disable-SqlAlwaysOn -ServerInstance Computer\Instance -Credential (Get-Credential DOMAIN\Username) </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令使用 Windows 身份验证禁用名为“Computer\Instance”的 SQL Server 实例上的 AlwaysOn 可用性组。系统将提示您输入指定帐户“DOMAIN\Username”的密码。此更改需要重新启动实例,并且还将提示您确认此重新启动。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Disable-SqlAlwaysOn -Path SQLSERVER:\Sql\Computer\Instance -NoServiceRestart </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令禁用位于指定路径中的 SQL Server 实例上的 AlwaysOn 可用性组,但此命令不重新启动该实例。更改将在您手动重新启动此服务器实例后生效。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Enable-SqlAlwaysOn</command:name><maml:description><maml:para>针对由 Path、InputObject 或 ServerInstance 参数指定的 SQL Server 实例启用 AlwaysOn 可用性组功能。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Enable</command:verb><command:noun>SqlAlwaysOn</command:noun><dev:version /></command:details><maml:description><maml:para>Enable-SqlAlwaysOn cmdlet 在 SQL Server 实例上启用 AlwaysOn。如果当 SQL Server 服务正在运行时启用 AlwaysOn 可用性组,则必须重新启动数据库引擎服务才能完成更改。除非您指定 -Force 参数,否则,cmdlet 将询问您是否要重新启动服务;如果取消,将不会发生任何操作。 </maml:para><maml:para>如果已启用“AlwaysOn 可用性组”,则此 cmdlet 将不执行任何操作。 </maml:para><maml:para>此 cmdlet 可对远程设备运行。您必须拥有管理员权限才能执行此 cmdlet。 </maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Enable-SqlAlwaysOn</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>SQL Server 实例的路径。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>您要启用 AlwaysOn 的 SQL Server 实例的名称。格式应该为 MACHINENAME\INSTANCE。可与 -Credential 参数一起使用以便更改远程服务器上的 AlwaysOn 设置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Force</maml:name><maml:description><maml:para>指定 -Force 可以强制 cmdlet 继续而无需来自用户的任何确认。提供此参数是为了允许构建脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>不提示用户重新启动 SQL Server 服务。您必须手动重新启动 SQL Server 服务,以便使更改生效。设置此参数后,将忽略 -Force。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Enable-SqlAlwaysOn</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>应启用 AlwaysOn 可用性组设置的 SQL Server 实例的服务器对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Server</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>您要启用 AlwaysOn 的 SQL Server 实例的名称。格式应该为 MACHINENAME\INSTANCE。可与 -Credential 参数一起使用以便更改远程服务器上的 AlwaysOn 设置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Force</maml:name><maml:description><maml:para>指定 -Force 可以强制 cmdlet 继续而无需来自用户的任何确认。提供此参数是为了允许构建脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>不提示用户重新启动 SQL Server 服务。您必须手动重新启动 SQL Server 服务,以便使更改生效。设置此参数后,将忽略 -Force。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Enable-SqlAlwaysOn</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>您要启用 AlwaysOn 的 SQL Server 实例的名称。格式应该为 MACHINENAME\INSTANCE。可与 -Credential 参数一起使用以便更改远程服务器上的 AlwaysOn 设置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Force</maml:name><maml:description><maml:para>指定 -Force 可以强制 cmdlet 继续而无需来自用户的任何确认。提供此参数是为了允许构建脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>不提示用户重新启动 SQL Server 服务。您必须手动重新启动 SQL Server 服务,以便使更改生效。设置此参数后,将忽略 -Force。 </maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>要启用 AlwaysOn 的 SQL Server 实例的名称。格式应该为 MACHINENAME\INSTANCE。可与 -Credential 参数一起使用以便更改远程服务器上的 AlwaysOn 设置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>您要启用 AlwaysOn 的 SQL Server 实例的名称。格式应该为 MACHINENAME\INSTANCE。可与 -Credential 参数一起使用以便更改远程服务器上的 AlwaysOn 设置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Force</maml:name><maml:description><maml:para>指定 -Force 可以强制 cmdlet 继续而无需来自用户的任何确认。提供此参数是为了允许构建脚本。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>应启用 AlwaysOn 可用性组设置的 SQL Server 实例的服务器对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Server</command:parameterValue><dev:type><maml:name>Server</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>不提示用户重新启动 SQL Server 服务。您必须手动重新启动 SQL Server 服务,以便使更改生效。设置此参数后,将忽略 -Force。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>False</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>SQL Server 实例的路径。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>要启用 AlwaysOn 的 SQL Server 实例的名称。格式应该为 MACHINENAME\INSTANCE。可与 -Credential 参数一起使用以便更改远程服务器上的 AlwaysOn 设置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para> 一个 SMO.Server 对象,指示应启用 AlwaysOn 的 SQL Server 实例。 </maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Enable-SqlAlwaysOn -Path SQLSERVER:\Sql\Computer\Instance </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令启用位于指定路径上的 SQL Server 实例上的 AlwaysOn 可用性组。此更改需要重新启动实例,并将提示您确认此重新启动。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Enable-SqlAlwaysOn -Path SQLSERVER:\Sql\Computer\Instance -Force </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令启用位于指定路径上的 SQL Server 实例上的 AlwaysOn 可用性组。-Force 选项将导致服务器实例重新启动并且不会提示您进行确认。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Enable-SqlAlwaysOn -ServerInstance Computer\Instance </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令启用名为“Computer\Instance”的 SQL Server 实例上的 AlwaysOn 可用性组。此更改需要重新启动实例,并将提示您确认此重新启动。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Enable-SqlAlwaysOn -ServerInstance Computer\Instance -Credential (Get-Credential DOMAIN\Username) </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令使用 Windows 身份验证启用名为“Computer\Instance”的 SQL Server 实例上的 AlwaysOn 可用性组。系统将提示您输入指定帐户的密码。此更改需要重新启动实例,并且还将提示您确认此重新启动。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Enable-SqlAlwaysOn -Path SQLSERVER:\Sql\Computer\Instance -NoServiceRestart </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令启用位于指定路径上的 SQL Server 实例上的 AlwaysOn 可用性组,但此命令不重新启动该实例。更改将在您手动重新启动此服务器实例后生效。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Get-SqlCredential</command:name><maml:description><maml:para>返回 SQL 凭据对象。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Get</command:verb><command:noun>SqlCredential</command:noun><dev:version /></command:details><maml:description><maml:para>Get-SqlCredential 返回 SQL 凭据对象。 </maml:para><maml:para>此 cmdlet 支持以下操作模式以返回 SQL 凭据的名称: 1.通过指定 SQL 凭据的名称和实例的路径 2.通过指定 SQL 凭据和服务器对象的名称。 </maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-SqlCredential</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>凭据的名称 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您要在其中执行操作的 SQL Server 实例的路径。这是一个可选参数。如果未指定,此参数的值使用当前的工作位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Get-SqlCredential</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>凭据的名称 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>凭据所在的服务器对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>凭据所在的服务器对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue><dev:type><maml:name>Context</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>凭据的名称 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您要在其中执行操作的 SQL Server 实例的路径。这是一个可选参数。如果未指定,此参数的值使用当前的工作位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Get-SqlCredential –Name "mycredential" </dev:code><dev:remarks><maml:para>此命令返回凭据对象。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\> </dev:code><dev:remarks></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Get-SqlDatabase</command:name><maml:description><maml:para>为 SQL Server 目标实例中的每个数据库返回一个 SQL Database 对象。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Get</command:verb><command:noun>SqlDatabase</command:noun><dev:version /></command:details><maml:description><maml:para>为 SQL Server 目标实例中的每个数据库返回一个 SQL Database 对象。如果提供数据库的名称,cmdlet 将仅返回此特定数据库对象。</maml:para><maml:para>此 cmdlet 支持以下操作模式来返回 SQL Database 对象:</maml:para><maml:para>1.通过指定实例 PowerShell 路径。</maml:para><maml:para>2.通过指定服务器对象。</maml:para><maml:para>3.通过指定 SQL Server 目标实例的 ServerInstance。</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-SqlDatabase</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>要检索的数据库的名称。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您要在其中执行操作的 SQL Server 实例的路径。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>生成用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Get-SqlDatabase</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>要检索的数据库的名称。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="3" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>此参数指定成为操作目标的 SQL Server 实例的名称。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionTimeout</maml:name><maml:description><maml:para>在超时失败之前等待 SQL Server 连接的秒数。超时值必须是 0 和 65534 之间的整数。如果指定 0,则连接尝试将没有超时限制。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>指定一个在目标计算机上具有 Windows 管理员凭据的用户帐户。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>生成用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Get-SqlDatabase</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>要检索的数据库的名称。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>目标实例的服务器对象。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>生成用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionTimeout</maml:name><maml:description><maml:para>在超时失败之前等待 SQL Server 连接的秒数。超时值必须是 0 和 65534 之间的整数。如果指定 0,则连接尝试将没有超时限制。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>指定一个在目标计算机上具有 Windows 管理员凭据的用户帐户。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>目标实例的服务器对象。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue><dev:type><maml:name>Context</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>要检索的数据库的名称。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您要在其中执行操作的 SQL Server 实例的路径。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>生成用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="3" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>此参数指定成为操作目标的 SQL Server 实例的名称。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\>CD SQLSERVER:\SQL\Computer\Instance; Get-SqlDatabase -Name "DbName" -Credential $sqlCredential; </dev:code><dev:remarks><maml:para>此命令返回服务器实例“Computer\Instance”的数据库“DbName”的数据库对象。当前工作目录用于确定应发生该操作的服务器实例。</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>This command retrieves all instances of SQL Server on the machine ‘MachineName’ and returns all the databases that are present in the instances. PS C:\>Get-SqlInstance -Credential $credential -MachineName " MachineName" | Get-SqlDatabase -Credential $sqlCredential; </dev:code><dev:remarks><maml:para></maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>Online Version:</maml:linkText><maml:uri></maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Get-SqlInstance</command:name><maml:description><maml:para>为目标计算机中的每个 SQL Server 实例返回一个 SQL 实例对象。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Get</command:verb><command:noun>SqlInstance</command:noun><dev:version /></command:details><maml:description><maml:para>为目标计算机中的每个 SQL Server 实例返回一个 SQL 实例对象。如果提供 SQL Server 实例的名称,cmdlet 将仅返回此 SQL Server 特定实例。</maml:para><maml:para>SQL Server 云适配器必须在承载 SQL Server 实例的计算机上运行并且可访问它。</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-SqlInstance</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>指定一个在目标计算机上具有 Windows 管理员凭据的用户帐户。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>MachineName</maml:name><maml:description><maml:para>目标计算机的名称。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>SQL Server 的实例名称,当您要检索目标计算机上的 SQL Server 特定实例时使用它。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>强制 cmdlet 在不提示用户的情况下自动接受目标计算机的 SQL Server 云适配器自签名的证书。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目标计算机的公共管理端口。当目标计算机的端口不能直接访问但是可通过端点公开(这意味着我们需要连接到不同的端口)时,应使用此参数。</maml:para><maml:para>SQL Server 云适配器必须可通过此端口访问。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目标服务器上重试命令的时间段。超时后,将不再重试。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>强制 cmdlet 在不提示用户的情况下自动接受目标计算机的 SQL Server 云适配器自签名的证书。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>指定一个在目标计算机上具有 Windows 管理员凭据的用户帐户。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>MachineName</maml:name><maml:description><maml:para>目标计算机的名称。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目标计算机的公共管理端口。当目标计算机的端口不能直接访问但是可通过端点公开(这意味着我们需要连接到不同的端口)时,应使用此参数。</maml:para><maml:para>SQL Server 云适配器必须可通过此端口访问。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>SQL Server 的实例名称,当您要检索目标计算机上的 SQL Server 特定实例时使用它。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目标服务器上重试命令的时间段。超时后,将不再重试。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\>Get-SqlInstance -Credential $credential -MachineName " MachineName" -Name "InstanceName" -AcceptSelfSignedCertificate; </dev:code><dev:remarks><maml:para>此命令检索计算机“MachineName”上的 SQL Server 实例“InstanceName”。将在不提示用户的情况下自动接受目标计算机的自签名证书。</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>This command retrieves all instances of SQL Server on the machine ‘MachineName’. The self-signed certificate of the target machine will be automatically accepted without prompting the user. PS C:\>Get-SqlInstance -Credential $credential -MachineName "MachineName" -AcceptSelfSignedCertificate; </dev:code><dev:remarks><maml:para></maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>Online Version:</maml:linkText><maml:uri></maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Get-SqlSmartAdmin</command:name><maml:description><maml:para>获取或检索 SQL 智能管理对象和它的属性。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Get</command:verb><command:noun>SqlSmartAdmin</command:noun><dev:version /></command:details><maml:description><maml:para>Get-SqlSmartAdmin cmdlet 获取 SQL 智能管理对象。智能管理对象包括“SQL Server 托管备份到 Windows Azure”配置设置。此 cmdlet 支持以下操作模式来返回此对象: 1. 使用 –name 参数传递服务器实例的名称。对于默认实例,仅指定计算机名称。对于命名实例,请使用“computername\instancename” 2.将 SQL Server 实例的路径传递给 -Path 参数。</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-SqlSmartAdmin</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>SQL Server 实例的路径。这是一个可选参数。如果未指定,此参数的值设置为当前的工作位置。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>采用以下格式的 SQL Server 实例名称:“Computer\Instance”</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>SQL Server 实例的名称。对于默认实例,仅指定计算机名称:“MyComputer”。对于命名实例,请使用格式:“ComputerName\InstanceName”。–name 参数和 –ServerInstance 都允许指定实例的名称,但是 –ServerInstance 还接受服务器实例名称的管道输入或 SqInstanceInfo 对象。可以使用 Get-SqlInstances cmdlet 检索 SqlInstanceInfo 对象。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Get-SqlSmartAdmin</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>服务器对象的实例</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>采用以下格式的 SQL Server 实例名称:“Computer\Instance”</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>SQL Server 实例的名称。对于默认实例,仅指定计算机名称:“MyComputer”。对于命名实例,请使用格式:“ComputerName\InstanceName”。–name 参数和 –ServerInstance 都允许指定实例的名称,但是 –ServerInstance 还接受服务器实例名称的管道输入或 SqInstanceInfo 对象。可以使用 Get-SqlInstances cmdlet 检索 SqlInstanceInfo 对象。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Get-SqlSmartAdmin</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>采用以下格式的 SQL Server 实例名称:“Computer\Instance”</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>SQL Server 实例的名称。对于默认实例,仅指定计算机名称:“MyComputer”。对于命名实例,请使用格式:“ComputerName\InstanceName”。–name 参数和 –ServerInstance 都允许指定实例的名称,但是 –ServerInstance 还接受服务器实例名称的管道输入或 SqInstanceInfo 对象。可以使用 Get-SqlInstances cmdlet 检索 SqlInstanceInfo 对象。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>服务器对象的实例</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue><dev:type><maml:name>Context</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>采用以下格式的 SQL Server 实例名称:“Computer\Instance”</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>SQL Server 实例的路径。这是一个可选参数。如果未指定,此参数的值设置为当前的工作位置。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>SQL Server 实例的名称。对于默认实例,仅指定计算机名称:“MyComputer”。对于命名实例,请使用格式:“ComputerName\InstanceName”。–name 参数和 –ServerInstance 都允许指定实例的名称,但是 –ServerInstance 还接受服务器实例名称的管道输入或 SqInstanceInfo 对象。可以使用 Get-SqlInstances cmdlet 检索 SqlInstanceInfo 对象。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue><dev:type><maml:name>PSObject</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\ PS> cd SQLSERVER:\SQL\Computer\MyInstance Get-SqlSmartAdmin Following is a list of the properties returned by the above command : BackupEnabled : Shows whether backup is enabled at the instance level. BackupRetentionPeriodInDays: Displays the number of days for retaining backup files. CredentialName: Name of the SQL Credential used to authenticate to the Windows Azure storage account. MasterSwitch: Shows whether the master switch is turned on or off. Parent: Name of the instance of SQL Server. Urn: The path of the Smart Admin object. Properties: list of all the properties including the above. </dev:code><dev:remarks><maml:para>此命令检索 SQL Server 命令实例“MyInstance”的智能管理对象属性</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\>Get-SqlSmartAdmin -name “computer\MyInstance” </dev:code><dev:remarks><maml:para>此命令使用 -serverName 参数检索智能管理对象属性。</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>Online Version:</maml:linkText><maml:uri></maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Invoke-PolicyEvaluation</command:name><maml:description><maml:para>针对目标集评估一个或多个基于 SQL Server 策略的管理策略,报告该集的遵从级别或使该集遵从。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Invoke</command:verb><command:noun>PolicyEvaluation</command:noun><dev:version /></command:details><maml:description><maml:para>针对一组名为目标集的 SQL Server 对象评估一个或多个基于策略的管理策略。这些策略指定与 SQL Server 对象关联的各种属性的允许值,如建立数据库名称或排序规则的站点标准。在检查模式下运行 Invoke-PolicyEvaluation 时,它报告目标集中的对象的当前属性是否遵从策略定义中的规则。如果其属性不遵从策略,不重新配置目标集中的对象。在配置模式下,Invoke-PolicyEvaluation 重新配置目标集中不遵从策略定义的所有对象。 </maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Invoke-PolicyEvaluation</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="1" aliases=""><maml:name>Policy</maml:name><maml:description><maml:para>指定要评估的一个或多个策略。策略可以在 SQL Server 数据库引擎实例中存储或作为导出的 XML 文件存储。对于在数据库引擎实例中存储的策略,使用基于 SQLSERVER:\SQLPolicy 文件夹的路径来指定策略的位置。对于存储为 XML 文件的策略,使用文件系统路径来指定策略的位置。 </maml:para><maml:para>-Policy 可以采用指定要评估的一个或多个策略的名称的字符串。如果在字符串中仅指定了文件或策略名称,则 Invoke-PolicyEvaluation 使用当前路径的设置。对于在数据库引擎实例中存储的策略,使用策略名称,如“Database Status”或“SQLSERVER:\SQLPolicy\MyComputer\DEFAULT\Policies\Database Status”。对于导出为 XML 文件的策略,使用该文件的名称,如“Database Status.xml”或“C:\MyPolicyFolder\Database Status.xml”。 </maml:para><maml:para>-Policy 可以采用一组 FileInfo 对象,如 Get-ChildItem cmdlet(针对包含导出的 XML 策略的文件夹运行该 cmdlet)的管道输出。-Policy 还可以采用一组 Policy 对象,如针对 SQLSERVER:\SQLPolicy 路径运行的 Get-ChildItem 的管道输出。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AdHocPolicyEvaluationMode</maml:name><maml:description><maml:para>指定 Invoke-PolicyEvaluation 是仅报告目标集的遵从状态 (Check),还是也重新配置目标集以遵从策略 (Configure)。 </maml:para><maml:para>Check - 使用登录帐户的凭据报告目标集的遵从状态,不重新配置任何对象。 </maml:para><maml:para>CheckSqlScriptAsProxy - 使用 ##MS_PolicyTSQLExecutionLogin## 代理帐户凭据运行检查报告。 </maml:para><maml:para>Configure - 重新配置不遵从策略的目标集对象并报告最终状态。Invoke-PolicyEvaluation 仅重新配置可设置、可确定的属性。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AdHocPolicyEvaluationMode</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>OutputXml</maml:name><maml:description><maml:para>指定 Invoke-PolicyEvaluation cmdlet 使用服务建模语言交换格式 (SML-IF) 架构生成 XML 格式的报告。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>TargetExpression</maml:name><maml:description><maml:para>指定一个查询,该查询返回定义目标集的对象列表。查询指定为包含用“/”字符分隔的节点的字符串。每个节点采用格式 ObjectType[Filter]。ObjectType 是 SQL Server 管理对象 (SMO) 对象模型中的对象之一,Filter 则是筛选该节点上特定对象的表达式。这些节点必须遵循 SMO 对象的层次结构。例如,以下查询表达式返回 AdventureWorks 示例数据库:“Server[@Name='MyComputer']/Database[@Name='AdventureWorks']” </maml:para><maml:para>如果指定 -TargetExpression,则不指定 -TargetObject。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>TargetServerName</maml:name><maml:description><maml:para>指定包含目标集的数据库引擎实例。可以指定包含 Microsoft.SqlServer.Management.Sfc.Sdk.SQLStoreConnection 对象的变量。还可以指定一个字符串,该字符串采用在 System.Data.SqlClient.SQLConnection 类的 ConnectionString 属性中使用的格式。其中包括使用 System.Data.SqlClient.SqlConnectionStringBuilder 类创建的那些字符串。默认情况下,Invoke-PolicyEvaluation 使用 Windows 身份验证进行连接。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Invoke-PolicyEvaluation</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="1" aliases=""><maml:name>Policy</maml:name><maml:description><maml:para>指定要评估的一个或多个策略。策略可以在 SQL Server 数据库引擎实例中存储或作为导出的 XML 文件存储。对于在数据库引擎实例中存储的策略,使用基于 SQLSERVER:\SQLPolicy 文件夹的路径来指定策略的位置。对于存储为 XML 文件的策略,使用文件系统路径来指定策略的位置。 </maml:para><maml:para>-Policy 可以采用指定要评估的一个或多个策略的名称的字符串。如果在字符串中仅指定了文件或策略名称,则 Invoke-PolicyEvaluation 使用当前路径的设置。对于在数据库引擎实例中存储的策略,使用策略名称,如“Database Status”或“SQLSERVER:\SQLPolicy\MyComputer\DEFAULT\Policies\Database Status”。对于导出为 XML 文件的策略,使用该文件的名称,如“Database Status.xml”或“C:\MyPolicyFolder\Database Status.xml”。 </maml:para><maml:para>-Policy 可以采用一组 FileInfo 对象,如 Get-ChildItem cmdlet(针对包含导出的 XML 策略的文件夹运行该 cmdlet)的管道输出。-Policy 还可以采用一组 Policy 对象,如针对 SQLSERVER:\SQLPolicy 路径运行的 Get-ChildItem 的管道输出。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AdHocPolicyEvaluationMode</maml:name><maml:description><maml:para>指定 Invoke-PolicyEvaluation 是仅报告目标集的遵从状态 (Check),还是也重新配置目标集以遵从策略 (Configure)。 </maml:para><maml:para>Check - 使用登录帐户的凭据报告目标集的遵从状态,不重新配置任何对象。 </maml:para><maml:para>CheckSqlScriptAsProxy - 使用 ##MS_PolicyTSQLExecutionLogin## 代理帐户凭据运行检查报告。 </maml:para><maml:para>Configure - 重新配置不遵从策略的目标集对象并报告最终状态。Invoke-PolicyEvaluation 仅重新配置可设置、可确定的属性。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AdHocPolicyEvaluationMode</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>OutputXml</maml:name><maml:description><maml:para>指定 Invoke-PolicyEvaluation cmdlet 使用服务建模语言交换格式 (SML-IF) 架构生成 XML 格式的报告。 </maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>TargetObjects</maml:name><maml:description><maml:para>指定一个 PSObject 或 PSObjects 的一个数组,这些对象针对评估的策略定义 SQL Server 对象的集合。若要连接到 SQL Server Analysis Services 实例,请为 -TargetObject 指定 Microsoft.AnalysisServices.Server 对象。 </maml:para><maml:para>如果指定 -TargetObject,则不指定 -TargetExpression。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">PSObject[]</command:parameterValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AdHocPolicyEvaluationMode</maml:name><maml:description><maml:para>指定 Invoke-PolicyEvaluation 是仅报告目标集的遵从状态 (Check),还是也重新配置目标集以遵从策略 (Configure)。 </maml:para><maml:para>Check - 使用登录帐户的凭据报告目标集的遵从状态,不重新配置任何对象。 </maml:para><maml:para>CheckSqlScriptAsProxy - 使用 ##MS_PolicyTSQLExecutionLogin## 代理帐户凭据运行检查报告。 </maml:para><maml:para>Configure - 重新配置不遵从策略的目标集对象并报告最终状态。Invoke-PolicyEvaluation 仅重新配置可设置、可确定的属性。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AdHocPolicyEvaluationMode</command:parameterValue><dev:type><maml:name>AdHocPolicyEvaluationMode</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>OutputXml</maml:name><maml:description><maml:para>指定 Invoke-PolicyEvaluation cmdlet 使用服务建模语言交换格式 (SML-IF) 架构生成 XML 格式的报告。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="1" aliases=""><maml:name>Policy</maml:name><maml:description><maml:para>指定要评估的一个或多个策略。策略可以在 SQL Server 数据库引擎实例中存储或作为导出的 XML 文件存储。对于在数据库引擎实例中存储的策略,使用基于 SQLSERVER:\SQLPolicy 文件夹的路径来指定策略的位置。对于存储为 XML 文件的策略,使用文件系统路径来指定策略的位置。 </maml:para><maml:para>-Policy 可以采用指定要评估的一个或多个策略的名称的字符串。如果在字符串中仅指定了文件或策略名称,则 Invoke-PolicyEvaluation 使用当前路径的设置。对于在数据库引擎实例中存储的策略,使用策略名称,如“Database Status”或“SQLSERVER:\SQLPolicy\MyComputer\DEFAULT\Policies\Database Status”。对于导出为 XML 文件的策略,使用该文件的名称,如“Database Status.xml”或“C:\MyPolicyFolder\Database Status.xml”。 </maml:para><maml:para>-Policy 可以采用一组 FileInfo 对象,如 Get-ChildItem cmdlet(针对包含导出的 XML 策略的文件夹运行该 cmdlet)的管道输出。-Policy 还可以采用一组 Policy 对象,如针对 SQLSERVER:\SQLPolicy 路径运行的 Get-ChildItem 的管道输出。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue><dev:type><maml:name>PSObject</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>TargetExpression</maml:name><maml:description><maml:para>指定一个查询,该查询返回定义目标集的对象列表。查询指定为包含用“/”字符分隔的节点的字符串。每个节点采用格式 ObjectType[Filter]。ObjectType 是 SQL Server 管理对象 (SMO) 对象模型中的对象之一,Filter 则是筛选该节点上特定对象的表达式。这些节点必须遵循 SMO 对象的层次结构。例如,以下查询表达式返回 AdventureWorks 示例数据库:“Server[@Name='MyComputer']/Database[@Name='AdventureWorks']” </maml:para><maml:para>如果指定 -TargetExpression,则不指定 -TargetObject。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>TargetObjects</maml:name><maml:description><maml:para>指定一个 PSObject 或 PSObjects 的一个数组,这些对象针对评估的策略定义 SQL Server 对象的集合。若要连接到 SQL Server Analysis Services 实例,请为 -TargetObject 指定 Microsoft.AnalysisServices.Server 对象。 </maml:para><maml:para>如果指定 -TargetObject,则不指定 -TargetExpression。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">PSObject[]</command:parameterValue><dev:type><maml:name>PSObject[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>TargetServerName</maml:name><maml:description><maml:para>指定包含目标集的数据库引擎实例。可以指定包含 Microsoft.SqlServer.Management.Sfc.Sdk.SQLStoreConnection 对象的变量。还可以指定一个字符串,该字符串采用在 System.Data.SqlClient.SQLConnection 类的 ConnectionString 属性中使用的格式。其中包括使用 System.Data.SqlClient.SqlConnectionStringBuilder 类创建的那些字符串。默认情况下,Invoke-PolicyEvaluation 使用 Windows 身份验证进行连接。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue><dev:type><maml:name>PSObject</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>sl "C:\Program Files (x86)\Microsoft SQL Server" sl "%PRODUCTVERSION%\Tools\Policies\DatabaseEngine\1033" Invoke-PolicyEvaluation -Policy "Trustworthy Database.xml" -TargetServer "MYCOMPUTER" </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>评估指定计算机上默认实例的策略。从 XML 文件读取策略并使用 Windows 身份验证进行连接。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>sl "C:\Program Files (x86)\Microsoft SQL Server" sl "%PRODUCTVERSION%\Tools\Policies\DatabaseEngine\1033" gci "Database Status.xml", "Trustworthy Database.xml" | Invoke-PolicyEvaluation -TargetServer "MYCOMPUTER" </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>使用 Get-Childitem 从文件夹中的 XML 文件读取两个策略,然后将它们以管道方式传输到 Invoke-PolicyEvaluation。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>sl "C:\Program Files (x86)\Microsoft SQL Server" sl "%PRODUCTVERSION%\Tools\Policies\DatabaseEngine\1033" Invoke-PolicyEvaluation -Policy "Database Status.xml" -TargetServer "MYCOMPUTER" -OutputXML > C:\MyReportFolder\MyReport.xml </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>使用服务建模语言交换格式 (SML-IF) 架构将策略评估的输出格式化,然后将输出重定向到文件。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>sl SQLSERVER:\SQLPolicy\MYCOMPUTER\DEFAULT\Policies gci | Where-Object { $_.PolicyCategory -eq "Microsoft Best Practices: Maintenance" } | Invoke-PolicyEvaluation -TargetServer "MYCOMPUTER" </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>设置 SQL Server 策略存储区的当前路径。使用 Get-ChildItem 读取所有策略,并使用 Where-Object 筛选 PolicyCategory 属性设置为“Microsoft Best Practices: Maintenance”的策略。然后将筛选的策略集以管道方式传输到 Invoke-PolicyEvaluation。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>sl "C:\Program Files (x86)\Microsoft SQL Server" sl "%PRODUCTVERSION%\Tools\Policies\DatabaseEngine\1033" $conn = New-Object Microsoft.SqlServer.Management.Sdk.Sfc.SqlStoreConnection("server='MYCOMPUTER';Trusted_Connection=True") Invoke-PolicyEvaluation -Policy "Database Status.xml" -TargetServer $conn </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>如何使用 Sfc.SqlStoreConnection 对象指定目标服务器。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>sl "C:\Program Files (x86)\Microsoft SQL Server\%PRODUCTVERSION%" sl "tools\Policies\analysisservices\1033" [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.AnalysisServices") $SSASsvr = new-object Microsoft.AnalysisServices.Server $SSASsvr.Connect("Data Source=localhost") Invoke-PolicyEvaluation 'Surface Area Configuration for Analysis Services Features.xml' -TargetObject $SSASsvr </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>如何加载 SQL Server Analysis Services 程序集,然后创建到本地计算机上默认实例的连接并运行 Analysis Services 外围应用配置器策略。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>sl "C:\Program Files (x86)\Microsoft SQL Server" sl "120\Tools\Policies\DatabaseEngine\1033" Invoke-PolicyEvaluation "Database Status.xml" -TargetServer "MYCOMPUTER" -TargetExpression "Server[@Name='MYCOMPUTER']/Database[@Name='AdventureWorks2014']" </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>使用 -TargetExpression 查询表达式指定针对 AdventureWorks2014 示例数据库评估“Database Status”策略。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>sl "C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Policies\ReportingServices\1033" [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.Dmf.Adapters") $SSRSsvr = new-object Microsoft.SqlServer.Management.Adapters.RSContainer('MyComputer') Invoke-PolicyEvaluation -Policy "Surface Area Configuration for Reporting Services 2008 Features.xml" -TargetObject $SSRSsvr </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>如何加载 SQL Server Reporting Services 程序集,然后创建到本地计算机上默认实例的连接并运行 Reporting Services 外围应用配置器策略。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>SQL Server Books Online: Using the Invoke-PolicyEvaluation cmdlet</maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Invoke-Sqlcmd</command:name><maml:description><maml:para>运行包含 SQL Server sqlcmd 实用工具所支持的语言(Transact-SQL 和 XQuery)和命令的语句的脚本。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Invoke</command:verb><command:noun>Sqlcmd</command:noun><dev:version /></command:details><maml:description><maml:para>运行包含 SQL Server sqlcmd 实用工具所支持的语言和命令的脚本。支持的语言是数据库引擎支持的 Transact-SQL 和 XQuery 语法。Invoke-Sqlcmd 还接受 sqlcmd 支持的很多命令,如 GO 和 QUIT。Invoke-Sqlcmd 接受 sqlcmd 脚本变量,如 SQLCMDUSER。默认情况下,Invoke-Sqlcmd 不设置 sqlcmd 脚本变量。 </maml:para><maml:para>Invoke-Sqlcmd 不支持主要与交互式脚本编辑有关的 sqlcmd 命令。这些不支持的命令包括 :!!、:connect、:error、:out、:ed、:list、:listvar、:reset、:perftrace 和 :serverlist。 </maml:para><maml:para>脚本返回的第一个结果集显示为格式化的表。如果其列列表不同于第一个结果集的列列表,则不显示第一个结果集之后的结果集。如果第一个结果集之后的结果集具有相同的列列表,则将它们的行追加到包含第一个结果集所返回的行的格式化表。 </maml:para><maml:para>除非您使用 PowerShell -Verbose 参数,否则 Invoke-Sqlcmd 不返回 SQL Server 消息输出(如 PRINT 语句的输出)。 </maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Invoke-Sqlcmd</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Query</maml:name><maml:description><maml:para>指定要运行的一个或多个查询。查询可以是 Transact-SQL 或 XQuery 语句,也可以是 sqlcmd 命令。可以指定用分号分隔的多个查询。不指定 sqlcmd GO 分隔符。转义字符串中包含的所有双引号。考虑使用方括号括起来的标识符(如 [MyTable])替代引号引起来的标识符(如“MyTable”)。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AbortOnError</maml:name><maml:description><maml:para>指定如果 Invoke-Sqlcmd 遇到错误将停止运行并将错误级别返回给 PowerShell ERRORLEVEL 变量。如果错误的严重级别高于 10,则返回的错误级别为 1;否则返回的错误级别为 0。如果还指定了 -ErrorLevel,则仅在错误消息严重级别等于或高于为 -ErrorLevel 指定的值时,Invoke-Sqlcmd 才返回 1。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionTimeout</maml:name><maml:description><maml:para>指定 Invoke-Sqlcmd 因为无法成功连接到数据库引擎实例而超时前等待的秒数。超时值必须是 0 和 65534 之间的整数。如果指定 0,则连接尝试将没有超时限制。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>指定数据库名称的字符串。Invoke-Sqlcmd 连接到在 -ServerInstance 中指定的实例中的此数据库。 </maml:para><maml:para>如果未指定 -Database,则使用的数据库依赖于当前路径是否同时指定了 SQLSERVER:\SQL 文件夹和数据库名称。如果该路径同时指定了 SQL 文件夹和数据库名称,则 Invoke-Sqlcmd 连接到在该路径中指定的数据库。如果该路径不基于 SQL 文件夹或该路径未包含数据库名称,则 Invoke-Sqlcmd 连接到当前登录 ID 的默认数据库。如果指定 -IgnoreProviderContext 开关,则 Invoke-Sqlcmd 不考虑在当前路径中指定的任何数据库而是连接到定义为当前登录 ID 的默认数据库。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DedicatedAdministratorConnection</maml:name><maml:description><maml:para>使用专用管理员连接 (DAC) 连接到数据库引擎的实例。系统管理员将 DAC 用于某些操作,如排除不接受新标准连接的实例的故障。必须将实例配置为支持 DAC。如果未启用 DAC,Invoke-Sqlcmd 将报告错误并停止运行。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DisableCommands</maml:name><maml:description><maml:para>关闭在运行批处理文件时可能危害安全的一些 sqlcmd 功能。它阻止将 PowerShell 变量传递给 Invoke-Sqlcmd 脚本。不运行在 SQLCMDINI 脚本变量中指定的启动脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DisableVariables</maml:name><maml:description><maml:para>指定 Invoke-Sqlcmd 忽略 sqlcmd 脚本变量。当脚本中包含多个 INSERT 语句,并且这些语句可能包含格式与变量(如 $(variable_name))相同的字符串时,这一选项很有用。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptConnection</maml:name><maml:description><maml:para>指定在连接到 -ServerInstance 中所指定的数据库引擎实例时 Invoke-Sqlcmd 是否使用安全套接字层 (SSL) 加密。如果指定 TRUE,则使用 SSL 加密。如果指定 FALSE,则不使用该加密。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ErrorLevel</maml:name><maml:description><maml:para>指定 Invoke-Sqlcmd 仅显示其严重级别等于或高于指定的值的错误消息。如果未指定 -ErrorLevel 或将其设置为 0,则显示所有错误消息。数据库引擎错误的严重级别介于 1 到 24 之间。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>HostName</maml:name><maml:description><maml:para>指定工作站名称。工作站名称由 sp_who 系统存储过程报告,在 sys.processes 目录视图的 hostname 列中显示。如果未指定 HostName,则默认为运行 Invoke-Sqlcmd 的计算机的名称。HostName 可用于标识不同的 Invoke-Sqlcmd 会话。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>IgnoreProviderContext</maml:name><maml:description><maml:para>Invoke-Sqlcmd 忽略当前 SQLSERVER:\SQL 路径所建立的数据库上下文。如果未指定 -Database 参数,则 Invoke-Sqlcmd 使用当前登录 ID 或 Windows 帐户的默认数据库。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>IncludeSqlUserErrors</maml:name><maml:description><maml:para>指示 Invoke-Sqlcmd 返回默认情况下忽略的 SQL 用户脚本错误。如果指定此参数,Invoke-Sqlcmd 匹配 sqlcmd 实用工具的默认行为。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>InputFile</maml:name><maml:description><maml:para>指定要作为 Invoke-Sqlcmd 的查询输入的文件。该文件可以包含 Transact-SQL 语句、XQuery 语句以及 sqlcmd 命令和脚本变量。指定文件的完整路径。文件路径或文件名中不允许包含空格。 </maml:para><maml:para>请仅运行来自可信来源的脚本。确保使用合适的 NTFS 权限保护所有输入脚本的安全。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxBinaryLength</maml:name><maml:description><maml:para>指定为包含二进制字符串数据类型(如 binary 和 varbinary)的列返回的最大字节数。默认为 1,024 字节。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxCharLength</maml:name><maml:description><maml:para>指定为包含字符或 Unicode 数据类型(如 char、nchar、varchar 和 nvarchar)的列返回的最大字符数。默认为 4,000 个字符。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NewPassword</maml:name><maml:description><maml:para>指定 SQL Server 身份验证登录 ID 的新密码。Invoke-Sqlcmd 更改该密码然后退出。还必须指定 -Username 和 -Password,其中 -Password 指定登录 ID 的当前密码。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>OutputSqlErrors</maml:name><maml:description><maml:para>指定是否在 Invoke-Sqlcmd 输出中显示错误消息。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Password</maml:name><maml:description><maml:para>指定 -Username 中所指定的 SQL Server 身份验证登录 ID 的密码。密码是区分大小写的。请尽可能使用 Windows 身份验证。不要使用空密码,尽可能使用强密码。有关详细信息,请参阅 SQL Server 联机丛书中的“强密码”。 </maml:para><maml:para>安全注意事项:如果键入 -Password 且后跟密码,任何可以看到监视器的人均可看到该密码。如果将后跟密码的 -Password 写入 .ps1 脚本中,则任何读取该脚本文件的人可以看到您的密码。请将合适的 NTFS 权限分配给该文件以防止其他用户读取该文件。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>QueryTimeout</maml:name><maml:description><maml:para>指定查询超时之前等待的秒数。如果未指定超时值,则查询将不会超时。超时值必须是 1 和 65535 之间的整数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>一个指定数据库引擎实例名称的字符串或 SMO 服务器对象。对于默认实例,仅指定计算机名称:“MyComputer”。对于命名实例,请使用格式:“ComputerName\InstanceName”。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SeverityLevel</maml:name><maml:description><maml:para>指定 Invoke-Sqlcmd 返回给 PowerShell ERRORLEVEL 变量的错误消息严重级别的下限。如果严重级别等于或高于 -SeverityLevel,Invoke-Sqlcmd 将返回运行的查询所生成的错误消息的最高严重级别。如果未指定 -SeverityLevel 或将它设置为 0,则 Invoke-Sqlcmd 将 0 返回给 ERRORLEVEL。数据库引擎错误消息的严重级别介于 1 到 24 之间。Invoke-Sqlcmd 不报告严重级别为 10 的信息性消息的严重级别。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SuppressProviderContextWarning</maml:name><maml:description><maml:para>取消显示警告:“Invoke-Sqlcmd 已使用当前 SQLSERVER:\SQL 路径设置的数据库上下文来建立 cmdlet 的数据库上下文”。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Username</maml:name><maml:description><maml:para>为建立到数据库引擎实例的 SQL Server 身份验证连接指定登录 ID。必须使用 -Password 指定密码。如果未指定 -Username 和 -Password,则 Invoke-Sqlcmd 使用运行 PowerShell 会话的 Windows 帐户尝试进行 Windows 身份验证连接。 </maml:para><maml:para>请尽可能使用 Windows 身份验证。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Variable</maml:name><maml:description><maml:para>创建 sqlcmd 脚本变量以便在 sqlcmd 脚本中使用并设置该变量的值。使用 PowerShell 数组可指定多个变量及其值。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AbortOnError</maml:name><maml:description><maml:para>指定如果 Invoke-Sqlcmd 遇到错误将停止运行并将错误级别返回给 PowerShell ERRORLEVEL 变量。如果错误的严重级别高于 10,则返回的错误级别为 1;否则返回的错误级别为 0。如果还指定了 -ErrorLevel,则仅在错误消息严重级别等于或高于为 -ErrorLevel 指定的值时,Invoke-Sqlcmd 才返回 1。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionTimeout</maml:name><maml:description><maml:para>指定 Invoke-Sqlcmd 因为无法成功连接到数据库引擎实例而超时前等待的秒数。超时值必须是 0 和 65534 之间的整数。如果指定 0,则连接尝试将没有超时限制。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>指定数据库名称的字符串。Invoke-Sqlcmd 连接到在 -ServerInstance 中指定的实例中的此数据库。 </maml:para><maml:para>如果未指定 -Database,则使用的数据库依赖于当前路径是否同时指定了 SQLSERVER:\SQL 文件夹和数据库名称。如果该路径同时指定了 SQL 文件夹和数据库名称,则 Invoke-Sqlcmd 连接到在该路径中指定的数据库。如果该路径不基于 SQL 文件夹或该路径未包含数据库名称,则 Invoke-Sqlcmd 连接到当前登录 ID 的默认数据库。如果指定 -IgnoreProviderContext 开关,则 Invoke-Sqlcmd 不考虑在当前路径中指定的任何数据库而是连接到定义为当前登录 ID 的默认数据库。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DedicatedAdministratorConnection</maml:name><maml:description><maml:para>使用专用管理员连接 (DAC) 连接到数据库引擎的实例。系统管理员将 DAC 用于某些操作,如排除不接受新标准连接的实例的故障。必须将实例配置为支持 DAC。如果未启用 DAC,Invoke-Sqlcmd 将报告错误并停止运行。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DisableCommands</maml:name><maml:description><maml:para>关闭在运行批处理文件时可能危害安全的一些 sqlcmd 功能。它阻止将 PowerShell 变量传递给 Invoke-Sqlcmd 脚本。不运行在 SQLCMDINI 脚本变量中指定的启动脚本。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DisableVariables</maml:name><maml:description><maml:para>指定 Invoke-Sqlcmd 忽略 sqlcmd 脚本变量。当脚本中包含多个 INSERT 语句,并且这些语句可能包含格式与变量(如 $(variable_name))相同的字符串时,这一选项很有用。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptConnection</maml:name><maml:description><maml:para>指定在连接到 -ServerInstance 中所指定的数据库引擎实例时 Invoke-Sqlcmd 是否使用安全套接字层 (SSL) 加密。如果指定 TRUE,则使用 SSL 加密。如果指定 FALSE,则不使用该加密。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ErrorLevel</maml:name><maml:description><maml:para>指定 Invoke-Sqlcmd 仅显示其严重级别等于或高于指定的值的错误消息。如果未指定 -ErrorLevel 或将其设置为 0,则显示所有错误消息。数据库引擎错误的严重级别介于 1 到 24 之间。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>HostName</maml:name><maml:description><maml:para>指定工作站名称。工作站名称由 sp_who 系统存储过程报告,在 sys.processes 目录视图的 hostname 列中显示。如果未指定 HostName,则默认为运行 Invoke-Sqlcmd 的计算机的名称。HostName 可用于标识不同的 Invoke-Sqlcmd 会话。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>IgnoreProviderContext</maml:name><maml:description><maml:para>Invoke-Sqlcmd 忽略当前 SQLSERVER:\SQL 路径所建立的数据库上下文。如果未指定 -Database 参数,则 Invoke-Sqlcmd 使用当前登录 ID 或 Windows 帐户的默认数据库。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>IncludeSqlUserErrors</maml:name><maml:description><maml:para>指示 Invoke-Sqlcmd 返回默认情况下忽略的 SQL 用户脚本错误。如果指定此参数,Invoke-Sqlcmd 匹配 sqlcmd 实用工具的默认行为。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>InputFile</maml:name><maml:description><maml:para>指定要作为 Invoke-Sqlcmd 的查询输入的文件。该文件可以包含 Transact-SQL 语句、XQuery 语句以及 sqlcmd 命令和脚本变量。指定文件的完整路径。文件路径或文件名中不允许包含空格。 </maml:para><maml:para>请仅运行来自可信来源的脚本。确保使用合适的 NTFS 权限保护所有输入脚本的安全。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxBinaryLength</maml:name><maml:description><maml:para>指定为包含二进制字符串数据类型(如 binary 和 varbinary)的列返回的最大字节数。默认为 1,024 字节。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxCharLength</maml:name><maml:description><maml:para>指定为包含字符或 Unicode 数据类型(如 char、nchar、varchar 和 nvarchar)的列返回的最大字符数。默认为 4,000 个字符。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NewPassword</maml:name><maml:description><maml:para>指定 SQL Server 身份验证登录 ID 的新密码。Invoke-Sqlcmd 更改该密码然后退出。还必须指定 -Username 和 -Password,其中 -Password 指定登录 ID 的当前密码。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>OutputSqlErrors</maml:name><maml:description><maml:para>指定是否在 Invoke-Sqlcmd 输出中显示错误消息。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue><dev:type><maml:name>Boolean</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Password</maml:name><maml:description><maml:para>指定 -Username 中所指定的 SQL Server 身份验证登录 ID 的密码。密码是区分大小写的。请尽可能使用 Windows 身份验证。不要使用空密码,尽可能使用强密码。有关详细信息,请参阅 SQL Server 联机丛书中的“强密码”。 </maml:para><maml:para>安全注意事项:如果键入 -Password 且后跟密码,任何可以看到监视器的人均可看到该密码。如果将后跟密码的 -Password 写入 .ps1 脚本中,则任何读取该脚本文件的人可以看到您的密码。请将合适的 NTFS 权限分配给该文件以防止其他用户读取该文件。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Query</maml:name><maml:description><maml:para>指定要运行的一个或多个查询。查询可以是 Transact-SQL 或 XQuery 语句,也可以是 sqlcmd 命令。可以指定用分号分隔的多个查询。不指定 sqlcmd GO 分隔符。转义字符串中包含的所有双引号。考虑使用方括号括起来的标识符(如 [MyTable])替代引号引起来的标识符(如“MyTable”)。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>QueryTimeout</maml:name><maml:description><maml:para>指定查询超时之前等待的秒数。如果未指定超时值,则查询将不会超时。超时值必须是 1 和 65535 之间的整数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>一个指定数据库引擎实例名称的字符串或 SMO 服务器对象。对于默认实例,仅指定计算机名称:“MyComputer”。对于命名实例,请使用格式:“ComputerName\InstanceName”。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue><dev:type><maml:name>PSObject</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SeverityLevel</maml:name><maml:description><maml:para>指定 Invoke-Sqlcmd 返回给 PowerShell ERRORLEVEL 变量的错误消息严重级别的下限。如果严重级别等于或高于 -SeverityLevel,Invoke-Sqlcmd 将返回运行的查询所生成的错误消息的最高严重级别。如果未指定 -SeverityLevel 或将它设置为 0,则 Invoke-Sqlcmd 将 0 返回给 ERRORLEVEL。数据库引擎错误消息的严重级别介于 1 到 24 之间。Invoke-Sqlcmd 不报告严重级别为 10 的信息性消息的严重级别。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SuppressProviderContextWarning</maml:name><maml:description><maml:para>取消显示警告:“Invoke-Sqlcmd 已使用当前 SQLSERVER:\SQL 路径设置的数据库上下文来建立 cmdlet 的数据库上下文”。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Username</maml:name><maml:description><maml:para>为建立到数据库引擎实例的 SQL Server 身份验证连接指定登录 ID。必须使用 -Password 指定密码。如果未指定 -Username 和 -Password,则 Invoke-Sqlcmd 使用运行 PowerShell 会话的 Windows 帐户尝试进行 Windows 身份验证连接。 </maml:para><maml:para>请尽可能使用 Windows 身份验证。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Variable</maml:name><maml:description><maml:para>创建 sqlcmd 脚本变量以便在 sqlcmd 脚本中使用并设置该变量的值。使用 PowerShell 数组可指定多个变量及其值。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>PSObject</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name>Formatted table</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Invoke-Sqlcmd -Query "SELECT GETDATE() AS TimeOfQuery;" -ServerInstance "MyComputer\MyInstance" TimeOfQuery ----------- 5/13/2010 8:49:43 PM </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此示例连接到计算机上数据库引擎的一个命名实例并运行基本 Transact-SQL 脚本。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Invoke-Sqlcmd -InputFile "C:\MyFolder\TestSqlCmd.sql" | Out-File -filePath "C:\MyFolder\TestSqlCmd.rpt" Output sent to TestSqlCmd.rpt. </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此示例读取一个包含 Transact-SQL 语句和 sqlcmd 命令的文件,运行该文件并将输出内容写入另一个文件。确保使用合适的 NTFS 权限保护所有输出文件的安全。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>$MyArray = "MYVAR1='String1'", "MYVAR2='String2'" Invoke-Sqlcmd -Query "SELECT `$(MYVAR1) AS Var1, `$(MYVAR2) AS Var2;" -Variable $MyArray Var1 Var2 ---- ---- String1 String2 </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此示例使用字符串的数组作为 -Variable 参数的输入。该数组定义多个 sqlcmd 变量。使用反引号字符 (`) 将 SELECT 语句中标识 sqlcmd 变量的 $ 符号转义。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Set-Location SQLSERVER:\SQL\MyComputer\MyInstance Invoke-Sqlcmd -Query "SELECT SERVERPROPERTY('MachineName') AS ComputerName;" -ServerInstance (Get-Item .) WARNING: Using provider context. Server = MyComputer ComputerName ------------ MyComputer </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此示例使用 Set-Location 导航到数据库引擎实例的 SQL Server PowerShell 提供程序路径。然后,它使用 Get-Item 检索 SMO 服务器对象作为 Invoke-Sqlcmd 的 -ServerInstance 参数。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Invoke-Sqlcmd -Query "PRINT N'abc'" -Verbose VERBOSE: abc </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此示例使用 PowerShell -Verbose 参数返回 PRINT 命令的消息输出。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Set-Location SQLSERVER:\SQL\MyComputer\DEFAULT\Databases\AdventureWorks2014 Invoke-Sqlcmd "SELECT DB_NAME() AS DatabaseName;" WARNING: Using provider context. Server = MyComputer, Database = AdventureWorks2014. DatabaseName ------------ AdventureWorks2014 </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此示例使用位置字符串提供 -Query 参数的输入。它还显示 Invoke-Sqlcmd 如何使用当前路径将数据库上下文设置为 AdventureWorks2014。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>SQL Server Books Online: Transact-SQL Reference</maml:linkText><maml:uri /></maml:navigationLink><maml:navigationLink><maml:linkText>SQL Server Books Online: sqlcmd Utility</maml:linkText><maml:uri /></maml:navigationLink><maml:navigationLink><maml:linkText>SQL Server Books Online: XQuery Reference</maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Join-SqlAvailabilityGroup</command:name><maml:description><maml:para>将在 InputObject 或 Path 参数中指定的可用性副本加入到由 Name 参数指定的可用性组中。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Join</command:verb><command:noun>SqlAvailabilityGroup</command:noun><dev:version /></command:details><maml:description><maml:para>Join-SqlAvailabilityGroup cmdlet 将本地辅助副本加入到在 Name 参数中指定的可用性组。只可对承载尚未加入到可用性组的辅助副本的 SQL Server 实例执行此 cmdlet。 </maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Join-SqlAvailabilityGroup</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>可用性组的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>指向一个 SQL Server 实例的路径,该实例承载着要加入到可用性组的辅助副本。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Join-SqlAvailabilityGroup</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>可用性组的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>承载辅助副本的 SQL Server 实例的服务器对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Server</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>承载辅助副本的 SQL Server 实例的服务器对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Server</command:parameterValue><dev:type><maml:name>Server</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>可用性组的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>指向一个 SQL Server 实例的路径,该实例承载着要加入到可用性组的辅助副本。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Server</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para> 要加入到可用性组的可用性副本。 </maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><maml:alertSet><maml:title /><maml:alert><maml:para>必须在服务器实例上启用高可用性数据恢复服务,由路径指定的可用性副本必须存在。 </maml:para></maml:alert><maml:alert></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Join-SqlAvailabilityGroup -Path SQLSERVER:\SQL\SecondaryServer\InstanceName -Name 'MyAg' </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令将由位于指定路径的服务器实例承载的辅助副本加入到名为“MyAg”的可用性组。此服务器实例必须承载此可用性组中的辅助副本。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Join-SqlAvailabilityGroup -Path SQLSERVER:\SQL\SecondaryServer\InstanceName -Name 'MyAg' -Script </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令输出一个 Transact-SQL 脚本,该脚本将由位于指定路径的服务器实例承载的辅助副本加入到名为“MyAg”的可用性组。此服务器实例必须承载此可用性组中的辅助副本。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>SQL Server Books Online: Joining a Secondary Replica to an Availability Group (SQL Server)</maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>New-SqlAvailabilityGroup</command:name><maml:description><maml:para>在承载初始主副本的服务器实例上创建可用性组。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>New</command:verb><command:noun>SqlAvailabilityGroup</command:noun><dev:version /></command:details><maml:description><maml:para>New-SqlAvailabilityGroup cmdlet 创建一个可用性副本。由 InputObject 或 Path 参数指定的服务器实例将承载初始主副本。 </maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-SqlAvailabilityGroup</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>要创建的可用性组的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>指向将承载可用性组初始主副本的 SQL Server 实例的路径。如果指定的路径不存在,将引发错误。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AutomatedBackupPreference</maml:name><maml:description><maml:para>可用性组的自动备份首选项。有效选项为: </maml:para><maml:para>Primary:指定备份始终在主副本上发生。这是最常用的选项,因为当在辅助副本上运行备份时,用户需要的功能(如差异备份)不可用。 </maml:para><maml:para>SecondaryOnly:指定备份永远不会在主副本上执行。如果主副本是唯一的联机副本,则备份将不会发生。 </maml:para><maml:para>Secondary:指定对辅助副本发生备份,除非主要副本是唯一的联机副本。在该情况下,备份应在主副本上发生。 </maml:para><maml:para>None:此选项指定当选择用于执行备份的副本时,用户不需考虑主/辅助状态。而只考虑 BackupPriority 与“联机”/“已连接”状态。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityGroupAutomatedBackupPreference</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>使用完全恢复模型而不使用 AUTO_CLOSE 的本地读写用户数据库的列表。这些数据库不能属于另一个可用性组,也不能配置为进行数据库镜像。此参数不能为 Null 或为空。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailureConditionLevel</maml:name><maml:description><maml:para>确定可用性组的自动故障转移行为。有效选项为: </maml:para><maml:para>OnServerDown:当 SQL Server 服务停止时执行故障转移或重新启动。 </maml:para><maml:para>OnServerUnresponsive:当满足任何下限值条件时,以及当 SQL Server 服务连接到群集并且超过“HealthCheckTimeout”阈值时,或者当目前为主角色的可用性副本处于故障状态时,执行故障转移或重新启动。(请参阅 HealthCheckTimeout 参数。) </maml:para><maml:para>OnCriticalServerError:当满足任何下限值条件时,以及当发生内部严重服务器错误(内存不足状况、严重读写违规或转储过多)时,执行故障转移或重新启动。 </maml:para><maml:para>OnModerateServerError:当满足任何下限值条件时,以及当发生中度服务器错误(持久内存不足状况)时,执行故障转移或重新启动。 </maml:para><maml:para>OnAnyQualifiedFailureConditions:当满足任何下限值条件时,以及当发生限定的故障条件(引擎工作线程耗尽、检测到无法解决的死锁)时,执行故障转移或重新启动。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityGroupFailureConditionLevel</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>HealthCheckTimeout</maml:name><maml:description><maml:para>将不响应的服务器声明为运行状况不正常之前所经历的时间长度。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AvailabilityReplica</maml:name><maml:description><maml:para>您要包括在新可用性组中的每个可用性副本的 AvailabilityReplica 对象。可以嵌套此参数,但它不能为空或 Null。 </maml:para><maml:para>提示:若要创建 AvailabilityReplica 对象,请使用 New-SqlAvailabilityReplica cmdlet 以及 AsTemplate 参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">AvailabilityReplica[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>New-SqlAvailabilityGroup</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>要创建的可用性组的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>承载主副本的实例的服务器对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AutomatedBackupPreference</maml:name><maml:description><maml:para>可用性组的自动备份首选项。有效选项为: </maml:para><maml:para>Primary:指定备份始终在主副本上发生。这是最常用的选项,因为当在辅助副本上运行备份时,用户需要的功能(如差异备份)不可用。 </maml:para><maml:para>SecondaryOnly:指定备份永远不会在主副本上执行。如果主副本是唯一的联机副本,则备份将不会发生。 </maml:para><maml:para>Secondary:指定对辅助副本发生备份,除非主要副本是唯一的联机副本。在该情况下,备份应在主副本上发生。 </maml:para><maml:para>None:此选项指定当选择用于执行备份的副本时,用户不需考虑主/辅助状态。而只考虑 BackupPriority 与“联机”/“已连接”状态。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityGroupAutomatedBackupPreference</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>使用完全恢复模型而不使用 AUTO_CLOSE 的本地读写用户数据库的列表。这些数据库不能属于另一个可用性组,也不能配置为进行数据库镜像。此参数不能为 Null 或为空。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailureConditionLevel</maml:name><maml:description><maml:para>确定可用性组的自动故障转移行为。有效选项为: </maml:para><maml:para>OnServerDown:当 SQL Server 服务停止时执行故障转移或重新启动。 </maml:para><maml:para>OnServerUnresponsive:当满足任何下限值条件时,以及当 SQL Server 服务连接到群集并且超过“HealthCheckTimeout”阈值时,或者当目前为主角色的可用性副本处于故障状态时,执行故障转移或重新启动。(请参阅 HealthCheckTimeout 参数。) </maml:para><maml:para>OnCriticalServerError:当满足任何下限值条件时,以及当发生内部严重服务器错误(内存不足状况、严重读写违规或转储过多)时,执行故障转移或重新启动。 </maml:para><maml:para>OnModerateServerError:当满足任何下限值条件时,以及当发生中度服务器错误(持久内存不足状况)时,执行故障转移或重新启动。 </maml:para><maml:para>OnAnyQualifiedFailureConditions:当满足任何下限值条件时,以及当发生限定的故障条件(引擎工作线程耗尽、检测到无法解决的死锁)时,执行故障转移或重新启动。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityGroupFailureConditionLevel</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>HealthCheckTimeout</maml:name><maml:description><maml:para>将不响应的服务器声明为运行状况不正常之前所经历的时间长度。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AvailabilityReplica</maml:name><maml:description><maml:para>您要包括在新可用性组中的每个可用性副本的 AvailabilityReplica 对象。可以嵌套此参数,但它不能为空或 Null。 </maml:para><maml:para>提示:若要创建 AvailabilityReplica 对象,请使用 New-SqlAvailabilityReplica cmdlet 以及 AsTemplate 参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">AvailabilityReplica[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AutomatedBackupPreference</maml:name><maml:description><maml:para>可用性组的自动备份首选项。有效选项为: </maml:para><maml:para>Primary:指定备份始终在主副本上发生。这是最常用的选项,因为当在辅助副本上运行备份时,用户需要的功能(如差异备份)不可用。 </maml:para><maml:para>SecondaryOnly:指定备份永远不会在主副本上执行。如果主副本是唯一的联机副本,则备份将不会发生。 </maml:para><maml:para>Secondary:指定对辅助副本发生备份,除非主要副本是唯一的联机副本。在该情况下,备份应在主副本上发生。 </maml:para><maml:para>None:此选项指定当选择用于执行备份的副本时,用户不需考虑主/辅助状态。而只考虑 BackupPriority 与“联机”/“已连接”状态。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityGroupAutomatedBackupPreference</command:parameterValue><dev:type><maml:name>AvailabilityGroupAutomatedBackupPreference</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AvailabilityReplica</maml:name><maml:description><maml:para>您要包括在新可用性组中的每个可用性副本的 AvailabilityReplica 对象。可以嵌套此参数,但它不能为空或 Null。 </maml:para><maml:para>提示:若要创建 AvailabilityReplica 对象,请使用 New-SqlAvailabilityReplica cmdlet 以及 AsTemplate 参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">AvailabilityReplica[]</command:parameterValue><dev:type><maml:name>AvailabilityReplica[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>使用完全恢复模型而不使用 AUTO_CLOSE 的本地读写用户数据库的列表。这些数据库不能属于另一个可用性组,也不能配置为进行数据库镜像。此参数不能为 Null 或为空。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailureConditionLevel</maml:name><maml:description><maml:para>确定可用性组的自动故障转移行为。有效选项为: </maml:para><maml:para>OnServerDown:当 SQL Server 服务停止时执行故障转移或重新启动。 </maml:para><maml:para>OnServerUnresponsive:当满足任何下限值条件时,以及当 SQL Server 服务连接到群集并且超过“HealthCheckTimeout”阈值时,或者当目前为主角色的可用性副本处于故障状态时,执行故障转移或重新启动。(请参阅 HealthCheckTimeout 参数。) </maml:para><maml:para>OnCriticalServerError:当满足任何下限值条件时,以及当发生内部严重服务器错误(内存不足状况、严重读写违规或转储过多)时,执行故障转移或重新启动。 </maml:para><maml:para>OnModerateServerError:当满足任何下限值条件时,以及当发生中度服务器错误(持久内存不足状况)时,执行故障转移或重新启动。 </maml:para><maml:para>OnAnyQualifiedFailureConditions:当满足任何下限值条件时,以及当发生限定的故障条件(引擎工作线程耗尽、检测到无法解决的死锁)时,执行故障转移或重新启动。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityGroupFailureConditionLevel</command:parameterValue><dev:type><maml:name>AvailabilityGroupFailureConditionLevel</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>HealthCheckTimeout</maml:name><maml:description><maml:para>将不响应的服务器声明为运行状况不正常之前所经历的时间长度。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>承载主副本的实例的服务器对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue><dev:type><maml:name>Context</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>要创建的可用性组的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>指向将承载可用性组初始主副本的 SQL Server 实例的路径。如果指定的路径不存在,将引发错误。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Server</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para> 指定包含主副本的服务器实例。 </maml:para><maml:para> </maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para> 一个新的 Powershell 对象,其中包含可用性组。 </maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>$primaryServer = Get-Item "SQLSERVER:\SQL\PrimaryServer\InstanceName" $secondaryServer = Get-Item "SQLSERVER:\SQL\SecondaryServer\InstanceName" $primaryReplica = New-SqlAvailabilityReplica ` -Name "PrimaryServer\InstanceName" ` -EndpointUrl "TCP://PrimaryServer.domain:5022" ` -FailoverMode "Automatic" ` -AvailabilityMode "SynchronousCommit" ` -AsTemplate ` -Version ($primaryServer.Version) # Create the initial secondary replica $secondaryReplica = New-SqlAvailabilityReplica ` -Name "SecondaryServer\InstanceName" ` -EndpointUrl "TCP://SecondaryServer.domain:5022" ` -FailoverMode "Automatic" ` -AvailabilityMode "SynchronousCommit" ` -AsTemplate ` -Version ($secondaryServer.Version) # Create the Availability Group. New-SqlAvailabilityGroup -InputObject $primaryServer -Name MyAG -AvailabilityReplica ($primaryReplica, $secondaryReplica) -Database @("MyDatabase1","MyDatabase2") </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此示例创建一个新的可用性组“MyAG”以及两个可用性副本和两个数据库(“MyDatabase1”和“MyDatabase2”)。首先,此示例使用 New-SqlAvailabilityReplica cmdlet 创建这两个副本(“$primaryReplica”和“$secondaryReplica”)的内存中表示。这些副本配置为使用同步提交可用性模式以及自动故障转移。它们的数据库镜像端点使用端口 5022。然后,此示例使用 New-SqlAvailabilityGroup cmdlet 创建可用性组。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>SQL Server Books Online: Creating an Availability Group (SQL Server)</maml:linkText><maml:uri /></maml:navigationLink><maml:navigationLink><maml:linkText>SQL Server Books Online: "HADR" Prerequisites and Restrictions</maml:linkText><maml:uri /></maml:navigationLink><maml:navigationLink><maml:linkText>SQL Server Books Online: Specifying the Endpoint URL for an Availability Replica (SQL Server)</maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>New-SqlAvailabilityGroupListener</command:name><maml:description><maml:para>创建一个新的可用性组侦听器,并将其附加到一个现有可用性组。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>New</command:verb><command:noun>SqlAvailabilityGroupListener</command:noun><dev:version /></command:details><maml:description><maml:para>New-SqlAvailabilityGroupListener cmdlet 将创建一个新的可用性组侦听器,并将其附加到一个可用性组。它会采用标识可用性组和 IP 地址的参数。此 cmdlet 只能在承载主副本的服务器实例上执行。 </maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-SqlAvailabilityGroupListener</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>侦听器的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>指向可用性组的路径。新的侦听器将附加到此路径指定的可用性组。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DhcpSubnet</maml:name><maml:description><maml:para>指定侦听器是否应在参数指定的子网上使用 DHCP。此参数应该是采用斜杠形式的 IPv4 地址和子网掩码,例如 192.168.0.1\255.255.255.0。 </maml:para><maml:para>StaticIp 和 DhcpSubnet 是互斥选项。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>侦听器将用于侦听连接的端口。默认端口为 TCP 端口 1433。出于安全考虑,我们建议使用其他端口号。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StaticIp</maml:name><maml:description><maml:para>指定侦听器是否应使用参数指定的静态 IP 地址进行配置。此参数应该是字符串的列表。其中每个字符串都可以是采用斜杠形式的 IPv4 地址和子网掩码,或者是 IPv6 地址。 </maml:para><maml:para>StaticIp 和 DhcpSubnet 是互斥选项。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>New-SqlAvailabilityGroupListener</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>侦听器的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>我们应该将侦听器附加到的可用性组的可用性组对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DhcpSubnet</maml:name><maml:description><maml:para>指定侦听器是否应在参数指定的子网上使用 DHCP。此参数应该是采用斜杠形式的 IPv4 地址和子网掩码,例如 192.168.0.1\255.255.255.0。 </maml:para><maml:para>StaticIp 和 DhcpSubnet 是互斥选项。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>侦听器将用于侦听连接的端口。默认端口为 TCP 端口 1433。出于安全考虑,我们建议使用其他端口号。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StaticIp</maml:name><maml:description><maml:para>指定侦听器是否应使用参数指定的静态 IP 地址进行配置。此参数应该是字符串的列表。其中每个字符串都可以是采用斜杠形式的 IPv4 地址和子网掩码,或者是 IPv6 地址。 </maml:para><maml:para>StaticIp 和 DhcpSubnet 是互斥选项。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DhcpSubnet</maml:name><maml:description><maml:para>指定侦听器是否应在参数指定的子网上使用 DHCP。此参数应该是采用斜杠形式的 IPv4 地址和子网掩码,例如 192.168.0.1\255.255.255.0。 </maml:para><maml:para>StaticIp 和 DhcpSubnet 是互斥选项。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>我们应该将侦听器附加到的可用性组的可用性组对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue><dev:type><maml:name>Context</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>侦听器的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>指向可用性组的路径。新的侦听器将附加到此路径指定的可用性组。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>侦听器将用于侦听连接的端口。默认端口为 TCP 端口 1433。出于安全考虑,我们建议使用其他端口号。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue>65535 </dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StaticIp</maml:name><maml:description><maml:para>指定侦听器是否应使用参数指定的静态 IP 地址进行配置。此参数应该是字符串的列表。其中每个字符串都可以是采用斜杠形式的 IPv4 地址和子网掩码,或者是 IPv6 地址。 </maml:para><maml:para>StaticIp 和 DhcpSubnet 是互斥选项。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>New-SqlAvailabilityGroupListener -Name MyListener -Path SQLSERVER:\SQL\PrimaryServer\InstanceName\AvailabilityGroups\MyAg </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令为可用性组“MyAg”创建名为“MyListener”的可用性组侦听器。此侦听器将使用 DHCP 获取虚拟 IP 地址。必须对承载主副本的服务器实例执行此命令。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>New-SqlAvailabilityGroupListener -Name MyListener -Path SQLSERVER:\SQL\PrimaryServer\InstanceName\AvailabilityGroups\MyAg -Port 1434 </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令为可用性组“MyAg”创建名为“MyListener”的可用性组侦听器。此侦听器将使用 DHCP 获取虚拟 IP 地址并且将侦听端口 1434 上的连接。必须对承载主副本的服务器实例执行此命令。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>New-SqlAvailabilityGroupListener -Name MyListener -DhcpSubnet '192.169.0.1/255.255.252.0' -Path SQLSERVER:\SQL\PrimaryServer\InstanceName\AvailabilityGroups\MyAg </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令为可用性组“MyAg”创建名为“MyListener”的可用性组侦听器。此侦听器将使用指定子网上的 DHCP 以便获取虚拟 IP 地址。必须对承载主副本的服务器实例执行此命令。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>New-SqlAvailabilityGroupListener -Name MyListener -StaticIp '192.168.3.1/255.255.252.0' -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令为可用性组“MyAg”创建名为“MyListener”的可用性组侦听器。此侦听器将使用传递到 -StaticIp 参数的 IPv4 地址作为其虚拟 IP 地址。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>New-SqlAvailabilityGroupListener -Name MyListener -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg -Script </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令输出一个 Transact-SQL 脚本,该脚本为可用性组“MyAg”创建名为“MyListener”的可用性组侦听器。此命令并不实际创建此侦听器。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>New-SqlAvailabilityReplica</command:name><maml:description><maml:para>创建可用性副本。必须对承载主可用性副本的服务器实例执行此 cmdlet。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>New</command:verb><command:noun>SqlAvailabilityReplica</command:noun><dev:version /></command:details><maml:description><maml:para>New-SqlAvailabilityReplica cmdlet 创建可用性副本。必须对承载主副本的 SQL Server 实例执行此 cmdlet。 </maml:para><maml:para>AsTemplate 参数、InputObject 参数和 Path 参数是互斥的。 </maml:para><maml:para>若要在创建新的可用性组之前创建 AvailabilityReplica 对象,请使用 AsTemplate 参数。 </maml:para><maml:para>在将副本添加到现有可用性组时,应使用 InputObject 或 Path 参数指定可用性组的路径。如果这两者都未指定,则使用当前路径。 </maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-SqlAvailabilityReplica</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>新可用性副本的名称。以 computer\instance 格式指定此名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>指向可用性组的路径。新的副本将属于此路径中的可用性组。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupPriority</maml:name><maml:description><maml:para>此选项是一个介于 0 到 100 之间的整数,表示执行备份所需的副本优先级。在联机且可用的副本集中,将选择具有最高优先级的副本来执行备份。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInPrimaryRole</maml:name><maml:description><maml:para>可用性副本在处于主要角色时应如何处理连接。有效设置如下: </maml:para><maml:para>AllowReadWriteConnections:允许读/写连接 </maml:para><maml:para>AllowAllConnections:允许所有连接 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInPrimaryRole</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInSecondaryRole</maml:name><maml:description><maml:para>可用性副本在处于辅助角色时应如何处理连接。有效设置如下: </maml:para><maml:para>AllowNoConnections:不允许连接 </maml:para><maml:para>AllowReadIntentConnectionsOnly:只允许读意向连接 </maml:para><maml:para>AllowAllConnections:允许所有连接 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInSecondaryRole</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadonlyRoutingConnectionUrl</maml:name><maml:description><maml:para>当路由到副本以建立只读连接时,要使用的连接完全限定域名 (FQDN) 和端口。例如: </maml:para><maml:para>TCP://DBSERVER8.manufacturing.Adventure-Works.com:7024 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadOnlyRoutingList</maml:name><maml:description><maml:para>副本服务器名称的有序列表,这些名称表示当通过此可用性副本重定向只读连接时要使用的连接检测器的探测顺序。这一点适用于可用性副本为可用性组的当前主副本的情况。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SessionTimeout</maml:name><maml:description><maml:para>这是在主副本与此副本之间等待回复的秒数,超过该时间后,连接失败。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AvailabilityMode</maml:name><maml:description><maml:para>指示副本是处于“同步提交”还是“异步提交”模式。可以为 Null。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaAvailabilityMode</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EndpointUrl</maml:name><maml:description><maml:para>数据库镜像端点的 URL。此 URL 是一个 TCP 地址,其格式为 TCP://system-address:port。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailoverMode</maml:name><maml:description><maml:para>可以为 Automatic 或 Manual。可以为 Null。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaFailoverMode</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>New-SqlAvailabilityReplica</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>新可用性副本的名称。以 computer\instance 格式指定此名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AsTemplate</maml:name><maml:description><maml:para>您要在内存中为其创建临时 AvailabilityReplica 对象的新可用性副本的路径。使用 AsTemplate 创建您计划包括在新可用性组中的每个新可用性副本。然后,通过运行 New-SqlAvailabilityGroup cmdlet 创建可用性组,并将 AvailabilityReplica 对象指定为 AvailabilityReplica 参数的值。 </maml:para><maml:para>当指定 AsTemplate 参数时,将忽略 InputObject 参数和 Path 参数。 </maml:para><maml:para>指定 AsTemplate 时,您必须将 SQL Server 版本传递给 Version 参数,或者您的当前会话必须与实例之间具有有效连接。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupPriority</maml:name><maml:description><maml:para>此选项是一个介于 0 到 100 之间的整数,表示执行备份所需的副本优先级。在联机且可用的副本集中,将选择具有最高优先级的副本来执行备份。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInPrimaryRole</maml:name><maml:description><maml:para>可用性副本在处于主要角色时应如何处理连接。有效设置如下: </maml:para><maml:para>AllowReadWriteConnections:允许读/写连接 </maml:para><maml:para>AllowAllConnections:允许所有连接 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInPrimaryRole</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInSecondaryRole</maml:name><maml:description><maml:para>可用性副本在处于辅助角色时应如何处理连接。有效设置如下: </maml:para><maml:para>AllowNoConnections:不允许连接 </maml:para><maml:para>AllowReadIntentConnectionsOnly:只允许读意向连接 </maml:para><maml:para>AllowAllConnections:允许所有连接 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInSecondaryRole</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadonlyRoutingConnectionUrl</maml:name><maml:description><maml:para>当路由到副本以建立只读连接时,要使用的连接完全限定域名 (FQDN) 和端口。例如: </maml:para><maml:para>TCP://DBSERVER8.manufacturing.Adventure-Works.com:7024 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadOnlyRoutingList</maml:name><maml:description><maml:para>副本服务器名称的有序列表,这些名称表示当通过此可用性副本重定向只读连接时要使用的连接检测器的探测顺序。这一点适用于可用性副本为可用性组的当前主副本的情况。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SessionTimeout</maml:name><maml:description><maml:para>这是在主副本与此副本之间等待回复的秒数,超过该时间后,连接失败。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Version</maml:name><maml:description><maml:para>指定 SQL Server 版本。仅当指定 AsTemplate 时,此参数才适用。将在具有此版本的服务器上以设计模式创建此模板对象。 </maml:para><maml:para>如果需要,则可以将 Version 指定为整数或字符串。例如: -Version %PRODUCT_MAJOR_VER%, 或 -Version "%PRODUCT_MAJOR_VER%.0.0" </maml:para></maml:description><command:parameterValue required="true" variableLength="false">ServerVersion</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AvailabilityMode</maml:name><maml:description><maml:para>指示副本是处于“同步提交”还是“异步提交”模式。可以为 Null。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaAvailabilityMode</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EndpointUrl</maml:name><maml:description><maml:para>数据库镜像端点的 URL。此 URL 是一个 TCP 地址,其格式为 TCP://system-address:port。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailoverMode</maml:name><maml:description><maml:para>可以为 Automatic 或 Manual。可以为 Null。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaFailoverMode</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>New-SqlAvailabilityReplica</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>新可用性副本的名称。以 computer\instance 格式指定此名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>新的副本将属于的可用性组的 AvailabilityGroup 对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupPriority</maml:name><maml:description><maml:para>此选项是一个介于 0 到 100 之间的整数,表示执行备份所需的副本优先级。在联机且可用的副本集中,将选择具有最高优先级的副本来执行备份。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInPrimaryRole</maml:name><maml:description><maml:para>可用性副本在处于主要角色时应如何处理连接。有效设置如下: </maml:para><maml:para>AllowReadWriteConnections:允许读/写连接 </maml:para><maml:para>AllowAllConnections:允许所有连接 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInPrimaryRole</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInSecondaryRole</maml:name><maml:description><maml:para>可用性副本在处于辅助角色时应如何处理连接。有效设置如下: </maml:para><maml:para>AllowNoConnections:不允许连接 </maml:para><maml:para>AllowReadIntentConnectionsOnly:只允许读意向连接 </maml:para><maml:para>AllowAllConnections:允许所有连接 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInSecondaryRole</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadonlyRoutingConnectionUrl</maml:name><maml:description><maml:para>当路由到副本以建立只读连接时,要使用的连接完全限定域名 (FQDN) 和端口。例如: </maml:para><maml:para>TCP://DBSERVER8.manufacturing.Adventure-Works.com:7024 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadOnlyRoutingList</maml:name><maml:description><maml:para>副本服务器名称的有序列表,这些名称表示当通过此可用性副本重定向只读连接时要使用的连接检测器的探测顺序。这一点适用于可用性副本为可用性组的当前主副本的情况。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SessionTimeout</maml:name><maml:description><maml:para>这是在主副本与此副本之间等待回复的秒数,超过该时间后,连接失败。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AvailabilityMode</maml:name><maml:description><maml:para>指示副本是处于“同步提交”还是“异步提交”模式。可以为 Null。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaAvailabilityMode</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EndpointUrl</maml:name><maml:description><maml:para>数据库镜像端点的 URL。此 URL 是一个 TCP 地址,其格式为 TCP://system-address:port。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailoverMode</maml:name><maml:description><maml:para>可以为 Automatic 或 Manual。可以为 Null。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaFailoverMode</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AsTemplate</maml:name><maml:description><maml:para>您要在内存中为其创建临时 AvailabilityReplica 对象的新可用性副本的路径。使用 AsTemplate 创建您计划包括在新可用性组中的每个新可用性副本。然后,通过运行 New-SqlAvailabilityGroup cmdlet 创建可用性组,并将 AvailabilityReplica 对象指定为 AvailabilityReplica 参数的值。 </maml:para><maml:para>当指定 AsTemplate 参数时,将忽略 InputObject 参数和 Path 参数。 </maml:para><maml:para>指定 AsTemplate 时,您必须将 SQL Server 版本传递给 Version 参数,或者您的当前会话必须与实例之间具有有效连接。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>0</dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AvailabilityMode</maml:name><maml:description><maml:para>指示副本是处于“同步提交”还是“异步提交”模式。可以为 Null。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaAvailabilityMode</command:parameterValue><dev:type><maml:name>AvailabilityReplicaAvailabilityMode</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupPriority</maml:name><maml:description><maml:para>此选项是一个介于 0 到 100 之间的整数,表示执行备份所需的副本优先级。在联机且可用的副本集中,将选择具有最高优先级的副本来执行备份。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInPrimaryRole</maml:name><maml:description><maml:para>可用性副本在处于主要角色时应如何处理连接。有效设置如下: </maml:para><maml:para>AllowReadWriteConnections:允许读/写连接 </maml:para><maml:para>AllowAllConnections:允许所有连接 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInPrimaryRole</command:parameterValue><dev:type><maml:name>AvailabilityReplicaConnectionModeInPrimaryRole</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInSecondaryRole</maml:name><maml:description><maml:para>可用性副本在处于辅助角色时应如何处理连接。有效设置如下: </maml:para><maml:para>AllowNoConnections:不允许连接 </maml:para><maml:para>AllowReadIntentConnectionsOnly:只允许读意向连接 </maml:para><maml:para>AllowAllConnections:允许所有连接 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInSecondaryRole</command:parameterValue><dev:type><maml:name>AvailabilityReplicaConnectionModeInSecondaryRole</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EndpointUrl</maml:name><maml:description><maml:para>数据库镜像端点的 URL。此 URL 是一个 TCP 地址,其格式为 TCP://system-address:port。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailoverMode</maml:name><maml:description><maml:para>可以为 Automatic 或 Manual。可以为 Null。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaFailoverMode</command:parameterValue><dev:type><maml:name>AvailabilityReplicaFailoverMode</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>新的副本将属于的可用性组的 AvailabilityGroup 对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue><dev:type><maml:name>Context</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>新可用性副本的名称。以 computer\instance 格式指定此名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>指向可用性组的路径。新的副本将属于此路径中的可用性组。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadonlyRoutingConnectionUrl</maml:name><maml:description><maml:para>当路由到副本以建立只读连接时,要使用的连接完全限定域名 (FQDN) 和端口。例如: </maml:para><maml:para>TCP://DBSERVER8.manufacturing.Adventure-Works.com:7024 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadOnlyRoutingList</maml:name><maml:description><maml:para>副本服务器名称的有序列表,这些名称表示当通过此可用性副本重定向只读连接时要使用的连接检测器的探测顺序。这一点适用于可用性副本为可用性组的当前主副本的情况。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SessionTimeout</maml:name><maml:description><maml:para>这是在主副本与此副本之间等待回复的秒数,超过该时间后,连接失败。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Version</maml:name><maml:description><maml:para>指定 SQL Server 版本。仅当指定 AsTemplate 时,此参数才适用。将在具有此版本的服务器上以设计模式创建此模板对象。 </maml:para><maml:para>如果需要,则可以将 Version 指定为整数或字符串。例如: -Version %PRODUCT_MAJOR_VER%, 或 -Version "%PRODUCT_MAJOR_VER%.0.0" </maml:para></maml:description><command:parameterValue required="true" variableLength="false">ServerVersion</command:parameterValue><dev:type><maml:name>ServerVersion</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para> 为副本指定可用性组。 </maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityReplica</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para> 一个 Powershell 对象,其中包含新创建的可用性副本。 </maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>$serverObject = (Get-Item SQLSERVER:\Sql\PrimaryServer\InstanceName) $serverVersion = $serverObject.Version $endpointURL = "TCP://PrimaryServerName.domain.com:5022" $failoverMode = "Automatic" $availabilityMode = "SynchronousCommit" New-SqlAvailabilityReplica -Name PrimaryServer\Instance -EndpointUrl $endpointURL -FailoverMode $failoverMode -AvailabilityMode $availabilityMode -AsTemplate -Version $serverVersion </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此实例创建可用性副本的内存中表示。不向服务器提交任何更改。此副本应传递给 New-SqlAvailabilityGroup cmdlet 的 AvailabilityReplica 参数。此副本将使用位于指定 URL 的数据库镜像端点与可用性组中的其他副本通信。此副本支持自动故障转移和同步提交可用性模式。要构造内存中表示,需要使用 -AsTemplate 和 -Version 参数。-Version 参数指定将承载此副本的服务器实例的版本。版本号必须为 11。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>$serverObject = (Get-Item SQLSERVER:\Sql\PrimaryServer\InstanceName) $serverVersion = $serverObject.Version $endpointURL = "TCP://PrimaryServerName.domain.com:5022" $failoverMode = "Manual" $availabilityMode = "AsynchronousCommit" New-SqlAvailabilityReplica -Name SecondaryServer\Instance -EndpointUrl $endpointURL -FailoverMode $failoverMode -AvailabilityMode $availabilityMode -AsTemplate -Version $serverVersion </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令创建可用性副本的内存中表示。不向服务器提交任何更改。此副本应传递给 New-SqlAvailabilityGroup cmdlet 的 AvailabilityReplica 参数。此副本将使用位于指定 URL 的端点与可用性组中的其他副本通信。此副本支持手动故障转移和异步提交可用性模式。要构造内存中表示,需要使用 -AsTemplate 和 -Version 参数。-Version 参数指定将承载此副本的服务器实例的版本。版本号必须为 11。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>$agPath = "SQLSERVER:\Sql\PrimaryServer\InstanceName\AvailabilityGroups\MyAg" $endpointURL = "TCP://PrimaryServerName.domain.com:5022" $failoverMode = "Manual" $availabilityMode = "AsynchronousCommit" $secondaryReadMode = "AllowAllConnections" New-SqlAvailabilityReplica -Name SecondaryServer\Instance -EndpointUrl $endpointURL -FailoverMode $failoverMode -AvailabilityMode $availabilityMode -ConnectionModeInSecondaryRole $secondaryReadMode -Path $agPath </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>下面的示例将可用性副本添加到名为“MyAg”的现有可用性组。此副本支持手动故障转移和异步提交可用性模式。在辅助角色中,此副本将支持读访问连接,使您可以将只读处理转移到此副本。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>SQL Server Books Online: Specifying the Endpoint URL for an Availability Replica (SQL Server)</maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>New-SqlBackupEncryptionOption</command:name><maml:description><maml:para>定义 Backup-SqlDatabase cmdlet 或 Set-SqlSmartAdmin cmdlet 的加密选项。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>New</command:verb><command:noun>SqlBackupEncryptionOption</command:noun><dev:version /></command:details><maml:description><maml:para></maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-SqlBackupEncryptionOption</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Algorithm</maml:name><maml:description><maml:para>加密算法。可能的值有:AES128、AES192、AES256 和 TripleDes。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptionAlgorithm</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptorName</maml:name><maml:description><maml:para>服务器证书或服务器非对称密钥的名称。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptorType</maml:name><maml:description><maml:para>加密程序类型。可能的值有 ServerCertificate 和 ServerAsymmetricKey。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptorType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoEncryption</maml:name><maml:description><maml:para>指定禁用加密。此参数不能与任何其他参数结合使用。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Algorithm</maml:name><maml:description><maml:para>加密算法。可能的值有:AES128、AES192、AES256 和 TripleDes。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptionAlgorithm</command:parameterValue><dev:type><maml:name>BackupEncryptionAlgorithm</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptorName</maml:name><maml:description><maml:para>服务器证书或服务器非对称密钥的名称。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptorType</maml:name><maml:description><maml:para>加密程序类型。可能的值有 ServerCertificate 和 ServerAsymmetricKey。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptorType</command:parameterValue><dev:type><maml:name>BackupEncryptorType</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoEncryption</maml:name><maml:description><maml:para>指定禁用加密。此参数不能与任何其他参数结合使用。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.BackupEncryptionOptions</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>作为 Backup-SqlDatabase 和 Set-SqlSmartAdmin 的 –EncryptionOption 参数的输入。</maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>$encryptionOption = New-SqlBackupEncryptionOption -Algorithm Aes256 -EncryptorType ServerCertificate -EncryptorName "BackupCert" </dev:code><dev:code>C:\PS>Backup-SqlDatabase -ServerInstance . -Database "db1" -BackupFile "db1.bak" -CompressionOption On -EncryptionOption $encryptionOption </dev:code><dev:remarks><maml:para>此示例创建加密选项并在 Backup-SqlDatabase 中将它作为参数值以创建加密的备份。</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>Online Version:</maml:linkText><maml:uri></maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>New-SqlCredential</command:name><maml:description><maml:para>创建新的 SQL Server 凭据对象。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>New</command:verb><command:noun>SqlCredential</command:noun><dev:version /></command:details><maml:description><maml:para>New-SqlCredential cmdlet 创建新的 SQL Server 凭据对象。SQL Server 凭据对象用于存储身份验证信息。备份到 Windows Azure 存储服务或从中还原时 SQL Server 凭据是必需的,它用于存储 Windows Azure 存储帐户名称和访问密钥信息。 </maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-SqlCredential</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>凭据的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您要在其中执行操作的 SQL Server 实例的路径。这是一个可选参数。如果未指定,此参数的值使用当前的工作位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ProviderName</maml:name><maml:description><maml:para>加密提供程序名称。指定企业密钥管理提供程序 (EKM) 的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Secret</maml:name><maml:description><maml:para>用户或帐户的密码。对于 Windows Azure 存储服务身份验证,这是存储帐户访问密钥值。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">SecureString</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Identity</maml:name><maml:description><maml:para>用户或帐户的名称。对于 Windows Azure 存储服务身份验证,这是 Windows Azure 存储帐户的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>New-SqlCredential</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>凭据的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>应创建凭据的服务器对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ProviderName</maml:name><maml:description><maml:para>加密提供程序名称。指定企业密钥管理提供程序 (EKM) 的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Secret</maml:name><maml:description><maml:para>用户或帐户的密码。对于 Windows Azure 存储服务身份验证,这是存储帐户访问密钥值。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">SecureString</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Identity</maml:name><maml:description><maml:para>用户或帐户的名称。对于 Windows Azure 存储服务身份验证,这是 Windows Azure 存储帐户的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Identity</maml:name><maml:description><maml:para>用户或帐户的名称。对于 Windows Azure 存储服务身份验证,这是 Windows Azure 存储帐户的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>应创建凭据的服务器对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue><dev:type><maml:name>Context</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>凭据的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您要在其中执行操作的 SQL Server 实例的路径。这是一个可选参数。如果未指定,此参数的值使用当前的工作位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ProviderName</maml:name><maml:description><maml:para>加密提供程序名称。指定企业密钥管理提供程序 (EKM) 的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Secret</maml:name><maml:description><maml:para>用户或帐户的密码。对于 Windows Azure 存储服务身份验证,这是存储帐户访问密钥值。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">SecureString</command:parameterValue><dev:type><maml:name>SecureString</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS> cd SQLServer:\SQL\Computer\Instance $storageAccount = “myWindowsAzureStorageAccount” $storageKey = “<storage account access key value>” New-SqlCredential – name “mysqlcredential” –Identity $storageAccount –secret $storageKey </dev:code><dev:remarks><maml:para>此命令在 SQL Server 当前实例中创建 SQL 凭据“mysqlcredential”。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\>#cd to computer level cd sqlserver:\sql\computer $storageAccount = “myWindowsAzureStorageAccount” $storageKey = “<storage account access key value>” $secureString = convertto-securestring $storageKey -asplaintext -force # get the list of instances $instances = Get-childitem #pipe the instances to new-sqlcredentail cmdlet to create SQL credential $instances | new-sqlcredential -Name “mysqlcredential” -Identity storageAccount -Secret $secureString </dev:code><dev:remarks><maml:para>此命令在 SQL Server 所有实例中创建 SQL 凭据“mysqlcredential”。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>New-SqlHADREndpoint</command:name><maml:description><maml:para>在 SQL Server 实例上创建数据库镜像端点。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>New</command:verb><command:noun>SqlHADREndpoint</command:noun><dev:version /></command:details><maml:description><maml:para>New-SqlHadrndpoint cmdlet 在 SQL Server 的指定实例上创建数据库镜像端点。在为任何可用性组承载可用性副本的每个服务器实例上都需要该端点。每个服务器实例只能具有一个数据库镜像端点。如果某一服务器实例已拥有某个数据库镜像端点,则使用现有的端点。 </maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-SqlHADREndpoint</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>要创建的端点的名称。这是必需的参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>指向要创建端点的 SQL Server 实例的路径。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AuthenticationOrder</maml:name><maml:description><maml:para>端点使用的身份验证的顺序和类型。选项为 Certificate、CertificateKerberos、CertificateNegotiate、CertificateNtlm、Kerberos、KerberosCertificate、Negotiate、NegotiateCertificate、Ntlm 和 NtlmCertificate。如果指定的选项需要证书,则还必须设置 -Certificate 参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointAuthenticationOrder</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Certificate</maml:name><maml:description><maml:para>端点应该用于对连接进行身份验证的证书的名称。远端点必须具有其公钥与指定证书的私钥相匹配的证书。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Encryption</maml:name><maml:description><maml:para>端点的加密选项。选项为 Disabled、Supported 或 Required。Required 为默认值。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointEncryption</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionAlgorithm</maml:name><maml:description><maml:para>端点使用的加密形式。选项为 Aes、AesRC4、None、RC4 和 RC4Aes。默认情况下,端点将使用 Aes 加密。 </maml:para><maml:para>注意:RC4 算法仅用于支持向后兼容性。仅当数据库兼容级别为 90 或 100 时,才能使用 RC4 或 RC4_128 对新材料进行加密。(建议不要使用。)而是使用一种较新的算法,如 AES 算法之一。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointEncryptionAlgorithm</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>IpAddress</maml:name><maml:description><maml:para>端点将侦听的 IP 地址。默认值为 ALL,这表示侦听器将接受任何有效 IP 地址上的连接。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">IPAddress</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Owner</maml:name><maml:description><maml:para>端点的所有者的登录名。默认情况下,该登录名为当前登录名。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>端点将在其上侦听连接的 TCP 端口。默认端口为 5022。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>New-SqlHADREndpoint</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>要创建的端点的名称。这是必需的参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>应创建端点的 SQL Server 实例的服务器对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AuthenticationOrder</maml:name><maml:description><maml:para>端点使用的身份验证的顺序和类型。选项为 Certificate、CertificateKerberos、CertificateNegotiate、CertificateNtlm、Kerberos、KerberosCertificate、Negotiate、NegotiateCertificate、Ntlm 和 NtlmCertificate。如果指定的选项需要证书,则还必须设置 -Certificate 参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointAuthenticationOrder</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Certificate</maml:name><maml:description><maml:para>端点应该用于对连接进行身份验证的证书的名称。远端点必须具有其公钥与指定证书的私钥相匹配的证书。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Encryption</maml:name><maml:description><maml:para>端点的加密选项。选项为 Disabled、Supported 或 Required。Required 为默认值。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointEncryption</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionAlgorithm</maml:name><maml:description><maml:para>端点使用的加密形式。选项为 Aes、AesRC4、None、RC4 和 RC4Aes。默认情况下,端点将使用 Aes 加密。 </maml:para><maml:para>注意:RC4 算法仅用于支持向后兼容性。仅当数据库兼容级别为 90 或 100 时,才能使用 RC4 或 RC4_128 对新材料进行加密。(建议不要使用。)而是使用一种较新的算法,如 AES 算法之一。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointEncryptionAlgorithm</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>IpAddress</maml:name><maml:description><maml:para>端点将侦听的 IP 地址。默认值为 ALL,这表示侦听器将接受任何有效 IP 地址上的连接。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">IPAddress</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Owner</maml:name><maml:description><maml:para>端点的所有者的登录名。默认情况下,该登录名为当前登录名。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>端点将在其上侦听连接的 TCP 端口。默认端口为 5022。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AuthenticationOrder</maml:name><maml:description><maml:para>端点使用的身份验证的顺序和类型。选项为 Certificate、CertificateKerberos、CertificateNegotiate、CertificateNtlm、Kerberos、KerberosCertificate、Negotiate、NegotiateCertificate、Ntlm 和 NtlmCertificate。如果指定的选项需要证书,则还必须设置 -Certificate 参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointAuthenticationOrder</command:parameterValue><dev:type><maml:name>EndpointAuthenticationOrder</maml:name><maml:uri /></dev:type><dev:defaultValue>SMO.EndpointAuthenticationOrder.Negotiate</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Certificate</maml:name><maml:description><maml:para>端点应该用于对连接进行身份验证的证书的名称。远端点必须具有其公钥与指定证书的私钥相匹配的证书。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Encryption</maml:name><maml:description><maml:para>端点的加密选项。选项为 Disabled、Supported 或 Required。Required 为默认值。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointEncryption</command:parameterValue><dev:type><maml:name>EndpointEncryption</maml:name><maml:uri /></dev:type><dev:defaultValue>SMO.EndpointAuthentication.Required</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionAlgorithm</maml:name><maml:description><maml:para>端点使用的加密形式。选项为 Aes、AesRC4、None、RC4 和 RC4Aes。默认情况下,端点将使用 Aes 加密。 </maml:para><maml:para>注意:RC4 算法仅用于支持向后兼容性。仅当数据库兼容级别为 90 或 100 时,才能使用 RC4 或 RC4_128 对新材料进行加密。(建议不要使用。)而是使用一种较新的算法,如 AES 算法之一。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointEncryptionAlgorithm</command:parameterValue><dev:type><maml:name>EndpointEncryptionAlgorithm</maml:name><maml:uri /></dev:type><dev:defaultValue>RC4</dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>应创建端点的 SQL Server 实例的服务器对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue><dev:type><maml:name>Context</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>IpAddress</maml:name><maml:description><maml:para>端点将侦听的 IP 地址。默认值为 ALL,这表示侦听器将接受任何有效 IP 地址上的连接。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">IPAddress</command:parameterValue><dev:type><maml:name>IPAddress</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>要创建的端点的名称。这是必需的参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Owner</maml:name><maml:description><maml:para>端点的所有者的登录名。默认情况下,该登录名为当前登录名。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>指向要创建端点的 SQL Server 实例的路径。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>端点将在其上侦听连接的 TCP 端口。默认端口为 5022。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue>5022</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>SMO.Server</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para> 此参数指定要创建端点的服务器实例。 </maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name>SMO.Endpoint</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>New-SqlHADREndpoint -Path SQLSERVER:\Sql\Computer\Instance -Name MyEndpoint </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令在位于指定路径的服务器实例上创建名为“MyEndpoint”的数据库镜像端点。此端点使用默认端口 5022。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>New-SqlHADREndpoint -Path SQLSERVER:\Sql\Computer\Instance -Name EndpointName -Port 4022 -EncryptionAlgorithm 'Aes' -Encryption 'Required' </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令在位于指定路径的服务器实例上创建名为“MyEndpoint”的数据库镜像端点。此端点侦听端口 4022。此端点使用 AES 算法进行加密并且要求连接使用加密。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>New-SqlHADREndpoint -Path SQLSERVER:\Sql\Computer\Instance -Name EndpointName -AuthenticationOrder 'Certificate' -Certificate 'MyCertificate' </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令在位于指定路径的服务器实例上创建名为“MyEndpoint”的数据库镜像端点。此端点使用名为“MyCertificate”的证书对连接进行身份验证。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>New-SqlHADREndpoint -Path SQLSERVER:\Sql\Computer\Instance -Name MyEndpoint -Script </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令输出一个 Transact-SQL 脚本,该脚本在位于指定路径的服务器实例上创建名为“MyEndpoint”的数据库镜像端点。此命令并不实际创建此端点。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Remove-SqlAvailabilityDatabase</command:name><maml:description><maml:para>从其可用性组中删除由 InputObject 或 Path 参数指定的可用性数据库。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Remove</command:verb><command:noun>SqlAvailabilityDatabase</command:noun><dev:version /></command:details><maml:description><maml:para>Remove-SqlAvailabilityDatabase cmdlet 从其可用性组中删除由 InputObject 或 Path 参数指定的可用性数据库。如果在承载主副本的服务器实例上执行,则此 cmdlet 将从可用性组中删除主数据库及其所有对应的辅助数据库。如果在承载辅助副本的服务器实例上执行,则此 cmdlet 将从可用性组中仅删除本地辅助数据库;此辅助数据库将不再联接到该可用性组,但数据库的其他副本将继续联接。 </maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-SqlAvailabilityDatabase</maml:name><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>可用性数据库的路径。这是必需的参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-SqlAvailabilityDatabase</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>要删除的可用性数据库的 AvailabilityDatabase 对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>要删除的可用性数据库的 AvailabilityDatabase 对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue><dev:type><maml:name>Target</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>可用性数据库的路径。这是必需的参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityDatabase</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para> 指定要删除的可用性数据库。 </maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Remove-SqlAvailabilityDatabase -Path SQLSERVER:\Sql\PrimaryComputer\InstanceName\AvailabilityGroups\MyAg\AvailabilityDatabases\MyDatabase </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令从名为“MyAg”的可用性组中删除可用性数据库“MyDatabase”。因为此命令在承载主副本的服务器实例上执行,所以,主数据库及其对应的所有辅助数据库都将从可用性组中删除。在任何辅助副本上都不会出现针对此数据库的数据同步。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Get-ChildItem SQLSERVER:\Sql\PrimaryComputer\InstanceName\AvailabilityGroups\MyAg\AvailabilityDatabases | Remove-SqlAvailabilityDatabase </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令从名为“MyAg”的可用性组中删除所有可用性数据库。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Remove-SqlAvailabilityDatabase -Path SQLSERVER:\Sql\SecondaryComputer\InstanceName\AvailabilityGroups\MyAg\AvailabilityDatabases\MyDatabase </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令从名为“SecondaryComputer\Instance”的服务器实例承载的辅助副本中删除辅助数据库“MyDatabase”。与已删除的辅助数据库的数据同步将停止。此命令将不会影响主数据库或任何其他辅助数据库。 </maml:para><maml:para>注意:若要在此辅助数据库上重新开始数据同步,请通过对相同的服务器实例使用 Add-SqlAvailabilityDatabase cmdlet,将其重新联接到该可用性组。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Remove-SqlAvailabilityDatabase -Path SQLSERVER:\Sql\PrimaryComputer\InstanceName\AvailabilityGroups\MyAg\AvailabilityDatabases\MyDatabase -Script </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令输出一个 Transact-SQL 命令,该命令从可用性组“MyAg”中删除可用性数据库“MyDatabase”。此命令并不实际删除此可用性数据库。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Remove-SqlAvailabilityGroup</command:name><maml:description><maml:para>删除由 InputObject 或 Path 参数指定的可用性组。 </maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Remove</command:verb><command:noun>SqlAvailabilityGroup</command:noun><dev:version /></command:details><maml:description><maml:para>Remove-SqlAvailabilityGroup cmdlet 删除由 InputObject 或 Path 参数指定的可用性组。此 cmdlet 可以删除已部分创建的可用性组。对于 WSFC 节点上拥有正确安全凭据的 AlwaysOn 可用性组,可对已为其启用的任何 SQL Server 实例执行此 cmdlet。如果尚未为 AlwaysOn 可用性组启用对其执行此 cmdlet 的实例,或者如果由 Path 参数指定的可用性组不存在,则将引发错误。 </maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-SqlAvailabilityGroup</maml:name><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>指向可用性组的路径。这是必需的参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-SqlAvailabilityGroup</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>要删除的可用性组的 AvailabilityGroup 对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>要删除的可用性组的 AvailabilityGroup 对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue><dev:type><maml:name>Target</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>指向可用性组的路径。这是必需的参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Remove-SqlAvailabilityGroup -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令删除名为“MyAg”的可用性组。可以对承载可用性组的可用性副本的任何服务器实例执行此命令。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Get-ChildItem SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups | Remove-SqlAvailabilityGroup </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令删除由名为“Computer\Instance”的服务器实例承载的所有可用性组以及可用性副本。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Remove-SqlAvailabilityGroup -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg -Script </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令输出用于删除名为“MyAg”的可用性组的 Transact-SQL 脚本。此命令并不实际删除此可用性组。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>SQL Server Books Online: DROP AVAILABILITY GROUP (Transact-SQL)</maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Remove-SqlAvailabilityReplica</command:name><maml:description><maml:para>删除由 InputObject 或 Path 参数指定的辅助可用性副本。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Remove</command:verb><command:noun>SqlAvailabilityReplica</command:noun><dev:version /></command:details><maml:description><maml:para>Remove-SqlAvailabilityGroup cmdlet 删除由 InputObject 或 Path 参数指定的辅助副本。此 cmdlet 只能在承载主副本的服务器实例上执行。 </maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-SqlAvailabilityReplica</maml:name><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>指向可用性副本的路径。这是必需的参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-SqlAvailabilityReplica</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>应删除的副本的 AvailabilityReplica 对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>应删除的副本的 AvailabilityReplica 对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue><dev:type><maml:name>Target</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>指向可用性副本的路径。这是必需的参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityReplica</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para> 要删除的可用性副本。 </maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Remove-SqlAvailabilityReplica -Path SQLSERVER:\SQL\PrimaryServer\InstanceName\AvailabilityGroups\MyAg\AvailabilityReplicas\MyReplica </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令从名为“MyAg”的可用性组中删除名为“MyReplica”的可用性副本。此命令必须在承载可用性组的主副本的服务器实例上运行。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Remove-SqlAvailabilityReplica -Path SQLSERVER:\SQL\PrimaryServer\InstanceName\AvailabilityGroups\MyAg\AvailabilityReplicas\MyReplica -Script </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令输出一个 Transact-SQL 脚本,该脚本从名为“MyAg”的可用性组中删除名为“MyReplica”的可用性副本。此命令并不实际删除此副本。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>SQL Server Books Online: Deleting an Availability Group (SQL Server)</maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Remove-SqlCredential</command:name><maml:description><maml:para>删除 SQL 凭据对象。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Remove</command:verb><command:noun>SqlCredential</command:noun><dev:version /></command:details><maml:description><maml:para>Remove-SqlCredential cmdlet 删除 SQL Server 凭据对象。此 cmdlet 支持以下两种操作模式: 1.通过使用 –path 参数指定凭据的路径或位置(包括凭据名称)。 2.通过使用 –InputObject 参数将 Smo.Credential 对象传递给该对象。 </maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-SqlCredential</maml:name><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您要对其执行此操作的凭据的路径。示例:SQLSERVER:\SQL\Computer\Instance\Credentials\Credential </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-SqlCredential</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>一个输入凭据对象。可使用 Get-SqlCredential cmdlet 检索此对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>一个输入凭据对象。可使用 Get-SqlCredential cmdlet 检索此对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue><dev:type><maml:name>Target</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您要对其执行此操作的凭据的路径。示例:SQLSERVER:\SQL\Computer\Instance\Credentials\Credential </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\>Remove-SqlCredential -Path SQLSERVER:\SQL\Computer\Instance\Credentials\MySqlCredential </dev:code><dev:remarks><maml:para>此命令使用在 –path 参数中指定的路径删除 SQL 凭据“MySqlCredential”。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\>The command retrieves the credential object from the Get-Credential cmdlet and then pipes it to the Remove-Sql Credential cmdlet to delete the SQL Credential ‘MySqlCredential’. PS C:\>$cred = Get-SqlCredential -Name MySqlCredential $cred | Remove-SqlCredential </dev:code><dev:remarks></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Remove-SqlFirewallRule</command:name><maml:description><maml:para>禁用允许连接到 SQL Server 的特定实例的 Windows 防火墙规则。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Remove</command:verb><command:noun>SqlFirewallRule</command:noun><dev:version /></command:details><maml:description><maml:para>禁用允许连接到 SQL Server 的特定实例的 Windows 防火墙规则。</maml:para><maml:para>SQL Server 云适配器必须在承载 SQL Server 实例的计算机上运行并且可访问它。</maml:para><maml:para>此 cmdlet 支持以下操作模式:</maml:para><maml:para>1.通过指定实例 PowerShell 路径。</maml:para><maml:para>2.通过指定服务器对象。</maml:para><maml:para>3.通过指定 SQL Server 目标实例的 ServerInstance。</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-SqlFirewallRule</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>指定一个在目标计算机上具有 Windows 管理员凭据的用户帐户。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>强制 cmdlet 在不提示用户的情况下自动接受目标计算机的 SQL Server 云适配器自签名的证书。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目标计算机的公共管理端口。当目标计算机的端口不能直接访问但是可通过端点公开(这意味着我们需要连接到不同的端口)时,应使用此参数。</maml:para><maml:para>SQL Server 云适配器必须可通过此端口访问。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您要在其中执行操作的 SQL Server 实例的路径。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目标服务器上重试命令的时间段。超时后,将不再重试。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-SqlFirewallRule</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>指定一个在目标计算机上具有 Windows 管理员凭据的用户帐户。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>强制 cmdlet 在不提示用户的情况下自动接受目标计算机的 SQL Server 云适配器自签名的证书。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目标计算机的公共管理端口。当目标计算机的端口不能直接访问但是可通过端点公开(这意味着我们需要连接到不同的端口)时,应使用此参数。</maml:para><maml:para>SQL Server 云适配器必须可通过此端口访问。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目标服务器上重试命令的时间段。超时后,将不再重试。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>目标实例的服务器对象。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-SqlFirewallRule</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>指定一个在目标计算机上具有 Windows 管理员凭据的用户帐户。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>强制 cmdlet 在不提示用户的情况下自动接受目标计算机的 SQL Server 云适配器自签名的证书。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目标计算机的公共管理端口。当目标计算机的端口不能直接访问但是可通过端点公开(这意味着我们需要连接到不同的端口)时,应使用此参数。</maml:para><maml:para>SQL Server 云适配器必须可通过此端口访问。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目标服务器上重试命令的时间段。超时后,将不再重试。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>此参数指定成为操作目标的 SQL Server 实例的名称。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>强制 cmdlet 在不提示用户的情况下自动接受目标计算机的 SQL Server 云适配器自签名的证书。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>指定一个在目标计算机上具有 Windows 管理员凭据的用户帐户。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>目标实例的服务器对象。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue><dev:type><maml:name>Server[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目标计算机的公共管理端口。当目标计算机的端口不能直接访问但是可通过端点公开(这意味着我们需要连接到不同的端口)时,应使用此参数。</maml:para><maml:para>SQL Server 云适配器必须可通过此端口访问。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您要在其中执行操作的 SQL Server 实例的路径。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目标服务器上重试命令的时间段。超时后,将不再重试。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>此参数指定成为操作目标的 SQL Server 实例的名称。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\>CD SQLSERVER:\SQL\Computer\Instance; Remove-SqlFirewallRule -Credential $credential -AcceptSelfSignedCertificate; </dev:code><dev:remarks><maml:para>此命令在计算机“Computer”上禁用 Windows 防火墙规则以阻止连接到此计算机上的 SQL Server 实例“Instance”。当前工作目录用于确定应发生该操作的服务器实例。将在不提示用户的情况下自动接受目标计算机的自签名证书。</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>This command retrieves all instances of SQL Server on the machine ‘MachineName’ and disables the Windows Firewall rules to block connections to each one of them. The self-signed certificate of the target machine will be automatically accepted without prompting the user. PS C:\>Get-SqlInstance -Credential $credential -MachineName "MachineName" | Remove-SqlFirewallRule -Credential $credential -AcceptSelfSignedCertificate; </dev:code><dev:remarks><maml:para></maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>Online Version:</maml:linkText><maml:uri></maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Restore-SqlDatabase</command:name><maml:description><maml:para>还原数据库的全部或部分内容或事务日志记录的备份。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Restore</command:verb><command:noun>SqlDatabase</command:noun><dev:version /></command:details><maml:description><maml:para>Restore-SqlDatabase cmdlet 在 SQL Server 数据库上执行还原操作。这包括完整数据库还原、事务日志还原和数据库文件还原。此 cmdlet 根据 Microsoft.SqlServer.Management.Smo.Restore 类进行仿造。此类的参数一般对应于 Smo 对象的属性。 </maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Restore-SqlDatabase</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>要还原的数据库的名称。不能与 -DatabaseObject 参数一起使用。 </maml:para><maml:para>使用 -Database 参数时,还必须指定 -Path、-InputObject 或 -ServerInstance 参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>BackupFile</maml:name><maml:description><maml:para>存储备份文件的位置。这是一个可选参数。如果未指定此参数,则在服务器的默认备份位置搜索名称“databasename.trn”(对于日志还原)或“databasename.bak”(对于所有其他类型的还原)。此参数不能与 BackupDevice 参数结合使用。如果要备份到 Windows Azure Blob 存储服务 (URL),必须指定此参数或 BackupDevice 参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupDevice</maml:name><maml:description><maml:para>存储备份的设备。此参数不能与 BackupFile 参数结合使用。如果您要备份到磁带机,则使用此参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceItem[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BlockSize</maml:name><maml:description><maml:para>备份的物理块大小(字节)。支持的大小是 512、1024、2048、4096、8192、16384、32768 和 65536 (64 KB) 字节。对于磁带设备默认为 65536,其他情况为 512。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BufferCount</maml:name><maml:description><maml:para>用于备份操作的 I/O 缓冲区总数。可以指定任意正整数。如果使用很多缓冲区,则可能由于 Sqlservr.exe 进程中的虚拟地址空间不足而导致发生“内存不足”错误。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Checksum</maml:name><maml:description><maml:para>在还原操作过程中计算校验和值。如果未设置,则不计算校验和。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ClearSuspectPageTable</maml:name><maml:description><maml:para>在还原操作后删除可疑的页表。如果未设置,则不对可疑的页表执行任何操作。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ContinueAfterError</maml:name><maml:description><maml:para>出现校验和错误时继续操作。如果未设置,则在出现校验和错误后操作将失败。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFile</maml:name><maml:description><maml:para>还原操作所针对的数据库文件。仅当 RestoreAction 属性设置为 Files 时才使用。RestoreAction 参数设置为 Files 时,必须指定 DatabaseFileGroups 属性或 DatabaseFiles 属性。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFileGroup</maml:name><maml:description><maml:para>还原操作所针对的数据库文件组。仅当 RestoreAction 属性设置为 File 时才使用。RestoreAction 参数设置为 Files 时,必须指定 DatabaseFileGroups 属性或 DatabaseFiles 属性。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FileNumber</maml:name><maml:description><maml:para>用于标识备份介质上的目标备份集的索引号。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>KeepReplication</maml:name><maml:description><maml:para>保留复制配置。如果未设置,则还原操作将忽略复制配置。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>要在备份介质和 SQL Server 实例之间传输的最大字节数。可能的值是 65536 字节 (64 KB) 的倍数,最多可到 4194304 字节 (4 MB)。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaName</maml:name><maml:description><maml:para>用于标识特定介质集的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRecovery</maml:name><maml:description><maml:para>数据库还原到“正在还原”状态。不发生回滚。可以还原其他备份。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRewind</maml:name><maml:description><maml:para>让磁带机在还原操作完成后在结束位置保留打开状态。如果未设置,则操作完成后将倒带。不适用于磁盘还原。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Offset</maml:name><maml:description><maml:para>要还原的页地址。仅当 -RestoreAction 设置为 OnlinePage 时才有效。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">Int64[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Partial</maml:name><maml:description><maml:para>还原操作为部分还原。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>PassThru</maml:name><maml:description><maml:para>输出用于执行备份操作的 Smo 备份对象。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您要在其中执行还原操作的 SQL Server 实例的路径。这是一个可选参数。如果未指定,此参数的值使用当前的工作位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RelocateFile</maml:name><maml:description><maml:para>Smo.Relocate 文件对象的列表。每个对象都由一个逻辑备份文件名和一个物理文件系统位置组成。还原操作将已还原的数据库移到目标服务器上的指定物理位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">RelocateFile[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReplaceDatabase</maml:name><maml:description><maml:para>创建数据库的新映像。覆盖任何同名的现有数据库。如果未设置,则当具有该名称的数据库已存在时,还原操作将失败。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Restart</maml:name><maml:description><maml:para>继续处理部分完成的还原操作。如果未设置(默认值),则 cmdlet 将在备份集的开始处重新启动中断的还原操作。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RestoreAction</maml:name><maml:description><maml:para>应执行的还原操作类型。有效的选项包括 Database、Files、Log、OnlinePage、OnlineFiles。 </maml:para><maml:para>Database:还原数据库。 </maml:para><maml:para>Files:还原一个或多个数据文件。这要求设置 DatabaseFile 或 DatabaseFileGroup 参数。 </maml:para><maml:para>Log:还原事务日志。 </maml:para><maml:para>OnlinePage:在数据库仍可用于其他用户时联机还原数据页。 </maml:para><maml:para>OnlineFiles:在数据库仍可用于其他用户时还原一个或多个数据文件。这要求设置 DatabaseFile 或 DatabaseFileGroup 参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">RestoreActionType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RestrictedUser</maml:name><maml:description><maml:para>仅限 db_owner 固定数据库角色以及 dbcreator 和 sysadmin 固定服务器角色访问已还原的数据库。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>存储身份验证信息的 SQL Server 凭据,用于在 Windows Azure Blob 存储服务上验证身份。存储的身份验证信息包括 Windows Azure 存储帐户名称和相关的访问密钥值。从 Windows Azure Blob 存储服务 (URL) 还原时,必须指定此参数。此参数不用于磁盘或磁带。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StandbyFile</maml:name><maml:description><maml:para>用作 SQL Server 实例的映像策略一部分的撤消文件的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopAtMarkAfterDate</maml:name><maml:description><maml:para>指定要与由 StopAtMarkName 参数指定的标记名称一起用来确定恢复操作的停止点的日期。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopAtMarkName</maml:name><maml:description><maml:para>在标记的事务之后停止恢复。与 StopAtMarkAfterDate 参数一起用来确定恢复操作的停止点。恢复包括其中包含标记的事务。如果未设置 StopAtMarkAfterDate 值,则恢复操作将在含有指定名称的第一个标记处停止。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopBeforeMarkAfterDate</maml:name><maml:description><maml:para>指定要与 StopBeforeMarkName 一起用来确定恢复操作的停止点的日期。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopBeforeMarkName</maml:name><maml:description><maml:para>在标记的事务之前停止恢复。与 StopBeforeMarkAfterDate 一起用来确定恢复操作的停止点。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ToPointInTime</maml:name><maml:description><maml:para>数据库日志还原的端点。仅当 -RestoreAction 参数设置为 Log 时才适用。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UnloadTapeAfter</maml:name><maml:description><maml:para>操作完成后,磁带机将倒带并卸载。如果未设置,则不尝试倒带和卸载磁带介质。不适用于磁盘备份。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Restore-SqlDatabase</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>要还原的数据库的名称。不能与 -DatabaseObject 参数一起使用。 </maml:para><maml:para>使用 -Database 参数时,还必须指定 -Path、-InputObject 或 -ServerInstance 参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>BackupFile</maml:name><maml:description><maml:para>存储备份文件的位置。这是一个可选参数。如果未指定此参数,则在服务器的默认备份位置搜索名称“databasename.trn”(对于日志还原)或“databasename.bak”(对于所有其他类型的还原)。此参数不能与 BackupDevice 参数结合使用。如果要备份到 Windows Azure Blob 存储服务 (URL),必须指定此参数或 BackupDevice 参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupDevice</maml:name><maml:description><maml:para>存储备份的设备。此参数不能与 BackupFile 参数结合使用。如果您要备份到磁带机,则使用此参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceItem[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BlockSize</maml:name><maml:description><maml:para>备份的物理块大小(字节)。支持的大小是 512、1024、2048、4096、8192、16384、32768 和 65536 (64 KB) 字节。对于磁带设备默认为 65536,其他情况为 512。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BufferCount</maml:name><maml:description><maml:para>用于备份操作的 I/O 缓冲区总数。可以指定任意正整数。如果使用很多缓冲区,则可能由于 Sqlservr.exe 进程中的虚拟地址空间不足而导致发生“内存不足”错误。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Checksum</maml:name><maml:description><maml:para>在还原操作过程中计算校验和值。如果未设置,则不计算校验和。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ClearSuspectPageTable</maml:name><maml:description><maml:para>在还原操作后删除可疑的页表。如果未设置,则不对可疑的页表执行任何操作。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionTimeout</maml:name><maml:description><maml:para>在超时失败之前等待服务器连接的秒数。超时值必须是 0 和 65534 之间的整数。如果指定 0,则连接尝试将没有超时限制。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ContinueAfterError</maml:name><maml:description><maml:para>出现校验和错误时继续操作。如果未设置,则在出现校验和错误后操作将失败。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>一个 PSCredential 对象,为有权执行此操作的 SQL Server 登录名指定凭据。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFile</maml:name><maml:description><maml:para>还原操作所针对的数据库文件。仅当 RestoreAction 属性设置为 Files 时才使用。RestoreAction 参数设置为 Files 时,必须指定 DatabaseFileGroups 属性或 DatabaseFiles 属性。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFileGroup</maml:name><maml:description><maml:para>还原操作所针对的数据库文件组。仅当 RestoreAction 属性设置为 File 时才使用。RestoreAction 参数设置为 Files 时,必须指定 DatabaseFileGroups 属性或 DatabaseFiles 属性。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FileNumber</maml:name><maml:description><maml:para>用于标识备份介质上的目标备份集的索引号。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>KeepReplication</maml:name><maml:description><maml:para>保留复制配置。如果未设置,则还原操作将忽略复制配置。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>要在备份介质和 SQL Server 实例之间传输的最大字节数。可能的值是 65536 字节 (64 KB) 的倍数,最多可到 4194304 字节 (4 MB)。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaName</maml:name><maml:description><maml:para>用于标识特定介质集的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRecovery</maml:name><maml:description><maml:para>数据库还原到“正在还原”状态。不发生回滚。可以还原其他备份。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRewind</maml:name><maml:description><maml:para>让磁带机在还原操作完成后在结束位置保留打开状态。如果未设置,则操作完成后将倒带。不适用于磁盘还原。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Offset</maml:name><maml:description><maml:para>要还原的页地址。仅当 -RestoreAction 设置为 OnlinePage 时才有效。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">Int64[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Partial</maml:name><maml:description><maml:para>还原操作为部分还原。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>PassThru</maml:name><maml:description><maml:para>输出用于执行备份操作的 Smo 备份对象。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RelocateFile</maml:name><maml:description><maml:para>Smo.Relocate 文件对象的列表。每个对象都由一个逻辑备份文件名和一个物理文件系统位置组成。还原操作将已还原的数据库移到目标服务器上的指定物理位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">RelocateFile[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReplaceDatabase</maml:name><maml:description><maml:para>创建数据库的新映像。覆盖任何同名的现有数据库。如果未设置,则当具有该名称的数据库已存在时,还原操作将失败。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Restart</maml:name><maml:description><maml:para>继续处理部分完成的还原操作。如果未设置(默认值),则 cmdlet 将在备份集的开始处重新启动中断的还原操作。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RestoreAction</maml:name><maml:description><maml:para>应执行的还原操作类型。有效的选项包括 Database、Files、Log、OnlinePage、OnlineFiles。 </maml:para><maml:para>Database:还原数据库。 </maml:para><maml:para>Files:还原一个或多个数据文件。这要求设置 DatabaseFile 或 DatabaseFileGroup 参数。 </maml:para><maml:para>Log:还原事务日志。 </maml:para><maml:para>OnlinePage:在数据库仍可用于其他用户时联机还原数据页。 </maml:para><maml:para>OnlineFiles:在数据库仍可用于其他用户时还原一个或多个数据文件。这要求设置 DatabaseFile 或 DatabaseFileGroup 参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">RestoreActionType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RestrictedUser</maml:name><maml:description><maml:para>仅限 db_owner 固定数据库角色以及 dbcreator 和 sysadmin 固定服务器角色访问已还原的数据库。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>存储身份验证信息的 SQL Server 凭据,用于在 Windows Azure Blob 存储服务上验证身份。存储的身份验证信息包括 Windows Azure 存储帐户名称和相关的访问密钥值。从 Windows Azure Blob 存储服务 (URL) 还原时,必须指定此参数。此参数不用于磁盘或磁带。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StandbyFile</maml:name><maml:description><maml:para>用作 SQL Server 实例的映像策略一部分的撤消文件的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopAtMarkAfterDate</maml:name><maml:description><maml:para>指定要与由 StopAtMarkName 参数指定的标记名称一起用来确定恢复操作的停止点的日期。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopAtMarkName</maml:name><maml:description><maml:para>在标记的事务之后停止恢复。与 StopAtMarkAfterDate 参数一起用来确定恢复操作的停止点。恢复包括其中包含标记的事务。如果未设置 StopAtMarkAfterDate 值,则恢复操作将在含有指定名称的第一个标记处停止。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopBeforeMarkAfterDate</maml:name><maml:description><maml:para>指定要与 StopBeforeMarkName 一起用来确定恢复操作的停止点的日期。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopBeforeMarkName</maml:name><maml:description><maml:para>在标记的事务之前停止恢复。与 StopBeforeMarkAfterDate 一起用来确定恢复操作的停止点。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ToPointInTime</maml:name><maml:description><maml:para>数据库日志还原的端点。仅当 -RestoreAction 参数设置为 Log 时才适用。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UnloadTapeAfter</maml:name><maml:description><maml:para>操作完成后,磁带机将倒带并卸载。如果未设置,则不尝试倒带和卸载磁带介质。不适用于磁盘备份。 </maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>SQL Server 实例的名称。此服务器实例成为还原操作的目标。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Restore-SqlDatabase</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>要还原的数据库的名称。不能与 -DatabaseObject 参数一起使用。 </maml:para><maml:para>使用 -Database 参数时,还必须指定 -Path、-InputObject 或 -ServerInstance 参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>BackupFile</maml:name><maml:description><maml:para>存储备份文件的位置。这是一个可选参数。如果未指定此参数,则在服务器的默认备份位置搜索名称“databasename.trn”(对于日志还原)或“databasename.bak”(对于所有其他类型的还原)。此参数不能与 BackupDevice 参数结合使用。如果要备份到 Windows Azure Blob 存储服务 (URL),必须指定此参数或 BackupDevice 参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupDevice</maml:name><maml:description><maml:para>存储备份的设备。此参数不能与 BackupFile 参数结合使用。如果您要备份到磁带机,则使用此参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceItem[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BlockSize</maml:name><maml:description><maml:para>备份的物理块大小(字节)。支持的大小是 512、1024、2048、4096、8192、16384、32768 和 65536 (64 KB) 字节。对于磁带设备默认为 65536,其他情况为 512。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BufferCount</maml:name><maml:description><maml:para>用于备份操作的 I/O 缓冲区总数。可以指定任意正整数。如果使用很多缓冲区,则可能由于 Sqlservr.exe 进程中的虚拟地址空间不足而导致发生“内存不足”错误。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Checksum</maml:name><maml:description><maml:para>在还原操作过程中计算校验和值。如果未设置,则不计算校验和。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ClearSuspectPageTable</maml:name><maml:description><maml:para>在还原操作后删除可疑的页表。如果未设置,则不对可疑的页表执行任何操作。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ContinueAfterError</maml:name><maml:description><maml:para>出现校验和错误时继续操作。如果未设置,则在出现校验和错误后操作将失败。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFile</maml:name><maml:description><maml:para>还原操作所针对的数据库文件。仅当 RestoreAction 属性设置为 Files 时才使用。RestoreAction 参数设置为 Files 时,必须指定 DatabaseFileGroups 属性或 DatabaseFiles 属性。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFileGroup</maml:name><maml:description><maml:para>还原操作所针对的数据库文件组。仅当 RestoreAction 属性设置为 File 时才使用。RestoreAction 参数设置为 Files 时,必须指定 DatabaseFileGroups 属性或 DatabaseFiles 属性。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FileNumber</maml:name><maml:description><maml:para>用于标识备份介质上的目标备份集的索引号。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>KeepReplication</maml:name><maml:description><maml:para>保留复制配置。如果未设置,则还原操作将忽略复制配置。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>要在备份介质和 SQL Server 实例之间传输的最大字节数。可能的值是 65536 字节 (64 KB) 的倍数,最多可到 4194304 字节 (4 MB)。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaName</maml:name><maml:description><maml:para>用于标识特定介质集的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRecovery</maml:name><maml:description><maml:para>数据库还原到“正在还原”状态。不发生回滚。可以还原其他备份。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRewind</maml:name><maml:description><maml:para>让磁带机在还原操作完成后在结束位置保留打开状态。如果未设置,则操作完成后将倒带。不适用于磁盘还原。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Offset</maml:name><maml:description><maml:para>要还原的页地址。仅当 -RestoreAction 设置为 OnlinePage 时才有效。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">Int64[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Partial</maml:name><maml:description><maml:para>还原操作为部分还原。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>PassThru</maml:name><maml:description><maml:para>输出用于执行备份操作的 Smo 备份对象。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RelocateFile</maml:name><maml:description><maml:para>Smo.Relocate 文件对象的列表。每个对象都由一个逻辑备份文件名和一个物理文件系统位置组成。还原操作将已还原的数据库移到目标服务器上的指定物理位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">RelocateFile[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReplaceDatabase</maml:name><maml:description><maml:para>创建数据库的新映像。覆盖任何同名的现有数据库。如果未设置,则当具有该名称的数据库已存在时,还原操作将失败。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Restart</maml:name><maml:description><maml:para>继续处理部分完成的还原操作。如果未设置(默认值),则 cmdlet 将在备份集的开始处重新启动中断的还原操作。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RestoreAction</maml:name><maml:description><maml:para>应执行的还原操作类型。有效的选项包括 Database、Files、Log、OnlinePage、OnlineFiles。 </maml:para><maml:para>Database:还原数据库。 </maml:para><maml:para>Files:还原一个或多个数据文件。这要求设置 DatabaseFile 或 DatabaseFileGroup 参数。 </maml:para><maml:para>Log:还原事务日志。 </maml:para><maml:para>OnlinePage:在数据库仍可用于其他用户时联机还原数据页。 </maml:para><maml:para>OnlineFiles:在数据库仍可用于其他用户时还原一个或多个数据文件。这要求设置 DatabaseFile 或 DatabaseFileGroup 参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">RestoreActionType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RestrictedUser</maml:name><maml:description><maml:para>仅限 db_owner 固定数据库角色以及 dbcreator 和 sysadmin 固定服务器角色访问已还原的数据库。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>存储身份验证信息的 SQL Server 凭据,用于在 Windows Azure Blob 存储服务上验证身份。存储的身份验证信息包括 Windows Azure 存储帐户名称和相关的访问密钥值。从 Windows Azure Blob 存储服务 (URL) 还原时,必须指定此参数。此参数不用于磁盘或磁带。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StandbyFile</maml:name><maml:description><maml:para>用作 SQL Server 实例的映像策略一部分的撤消文件的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopAtMarkAfterDate</maml:name><maml:description><maml:para>指定要与由 StopAtMarkName 参数指定的标记名称一起用来确定恢复操作的停止点的日期。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopAtMarkName</maml:name><maml:description><maml:para>在标记的事务之后停止恢复。与 StopAtMarkAfterDate 参数一起用来确定恢复操作的停止点。恢复包括其中包含标记的事务。如果未设置 StopAtMarkAfterDate 值,则恢复操作将在含有指定名称的第一个标记处停止。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopBeforeMarkAfterDate</maml:name><maml:description><maml:para>指定要与 StopBeforeMarkName 一起用来确定恢复操作的停止点的日期。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopBeforeMarkName</maml:name><maml:description><maml:para>在标记的事务之前停止恢复。与 StopBeforeMarkAfterDate 一起用来确定恢复操作的停止点。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ToPointInTime</maml:name><maml:description><maml:para>数据库日志还原的端点。仅当 -RestoreAction 参数设置为 Log 时才适用。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UnloadTapeAfter</maml:name><maml:description><maml:para>操作完成后,磁带机将倒带并卸载。如果未设置,则不尝试倒带和卸载磁带介质。不适用于磁盘备份。 </maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>应发生还原的 SQL Server 实例的服务器对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Restore-SqlDatabase</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>DatabaseObject</maml:name><maml:description><maml:para>一个数据库对象。还原操作将备份还原到此数据库。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Database</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>BackupFile</maml:name><maml:description><maml:para>存储备份文件的位置。这是一个可选参数。如果未指定此参数,则在服务器的默认备份位置搜索名称“databasename.trn”(对于日志还原)或“databasename.bak”(对于所有其他类型的还原)。此参数不能与 BackupDevice 参数结合使用。如果要备份到 Windows Azure Blob 存储服务 (URL),必须指定此参数或 BackupDevice 参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupDevice</maml:name><maml:description><maml:para>存储备份的设备。此参数不能与 BackupFile 参数结合使用。如果您要备份到磁带机,则使用此参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceItem[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BlockSize</maml:name><maml:description><maml:para>备份的物理块大小(字节)。支持的大小是 512、1024、2048、4096、8192、16384、32768 和 65536 (64 KB) 字节。对于磁带设备默认为 65536,其他情况为 512。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BufferCount</maml:name><maml:description><maml:para>用于备份操作的 I/O 缓冲区总数。可以指定任意正整数。如果使用很多缓冲区,则可能由于 Sqlservr.exe 进程中的虚拟地址空间不足而导致发生“内存不足”错误。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Checksum</maml:name><maml:description><maml:para>在还原操作过程中计算校验和值。如果未设置,则不计算校验和。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ClearSuspectPageTable</maml:name><maml:description><maml:para>在还原操作后删除可疑的页表。如果未设置,则不对可疑的页表执行任何操作。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ContinueAfterError</maml:name><maml:description><maml:para>出现校验和错误时继续操作。如果未设置,则在出现校验和错误后操作将失败。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFile</maml:name><maml:description><maml:para>还原操作所针对的数据库文件。仅当 RestoreAction 属性设置为 Files 时才使用。RestoreAction 参数设置为 Files 时,必须指定 DatabaseFileGroups 属性或 DatabaseFiles 属性。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFileGroup</maml:name><maml:description><maml:para>还原操作所针对的数据库文件组。仅当 RestoreAction 属性设置为 File 时才使用。RestoreAction 参数设置为 Files 时,必须指定 DatabaseFileGroups 属性或 DatabaseFiles 属性。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FileNumber</maml:name><maml:description><maml:para>用于标识备份介质上的目标备份集的索引号。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>KeepReplication</maml:name><maml:description><maml:para>保留复制配置。如果未设置,则还原操作将忽略复制配置。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>要在备份介质和 SQL Server 实例之间传输的最大字节数。可能的值是 65536 字节 (64 KB) 的倍数,最多可到 4194304 字节 (4 MB)。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaName</maml:name><maml:description><maml:para>用于标识特定介质集的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRecovery</maml:name><maml:description><maml:para>数据库还原到“正在还原”状态。不发生回滚。可以还原其他备份。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRewind</maml:name><maml:description><maml:para>让磁带机在还原操作完成后在结束位置保留打开状态。如果未设置,则操作完成后将倒带。不适用于磁盘还原。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Offset</maml:name><maml:description><maml:para>要还原的页地址。仅当 -RestoreAction 设置为 OnlinePage 时才有效。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">Int64[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Partial</maml:name><maml:description><maml:para>还原操作为部分还原。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>PassThru</maml:name><maml:description><maml:para>输出用于执行备份操作的 Smo 备份对象。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RelocateFile</maml:name><maml:description><maml:para>Smo.Relocate 文件对象的列表。每个对象都由一个逻辑备份文件名和一个物理文件系统位置组成。还原操作将已还原的数据库移到目标服务器上的指定物理位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">RelocateFile[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReplaceDatabase</maml:name><maml:description><maml:para>创建数据库的新映像。覆盖任何同名的现有数据库。如果未设置,则当具有该名称的数据库已存在时,还原操作将失败。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Restart</maml:name><maml:description><maml:para>继续处理部分完成的还原操作。如果未设置(默认值),则 cmdlet 将在备份集的开始处重新启动中断的还原操作。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RestoreAction</maml:name><maml:description><maml:para>应执行的还原操作类型。有效的选项包括 Database、Files、Log、OnlinePage、OnlineFiles。 </maml:para><maml:para>Database:还原数据库。 </maml:para><maml:para>Files:还原一个或多个数据文件。这要求设置 DatabaseFile 或 DatabaseFileGroup 参数。 </maml:para><maml:para>Log:还原事务日志。 </maml:para><maml:para>OnlinePage:在数据库仍可用于其他用户时联机还原数据页。 </maml:para><maml:para>OnlineFiles:在数据库仍可用于其他用户时还原一个或多个数据文件。这要求设置 DatabaseFile 或 DatabaseFileGroup 参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">RestoreActionType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RestrictedUser</maml:name><maml:description><maml:para>仅限 db_owner 固定数据库角色以及 dbcreator 和 sysadmin 固定服务器角色访问已还原的数据库。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>存储身份验证信息的 SQL Server 凭据,用于在 Windows Azure Blob 存储服务上验证身份。存储的身份验证信息包括 Windows Azure 存储帐户名称和相关的访问密钥值。从 Windows Azure Blob 存储服务 (URL) 还原时,必须指定此参数。此参数不用于磁盘或磁带。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StandbyFile</maml:name><maml:description><maml:para>用作 SQL Server 实例的映像策略一部分的撤消文件的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopAtMarkAfterDate</maml:name><maml:description><maml:para>指定要与由 StopAtMarkName 参数指定的标记名称一起用来确定恢复操作的停止点的日期。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopAtMarkName</maml:name><maml:description><maml:para>在标记的事务之后停止恢复。与 StopAtMarkAfterDate 参数一起用来确定恢复操作的停止点。恢复包括其中包含标记的事务。如果未设置 StopAtMarkAfterDate 值,则恢复操作将在含有指定名称的第一个标记处停止。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopBeforeMarkAfterDate</maml:name><maml:description><maml:para>指定要与 StopBeforeMarkName 一起用来确定恢复操作的停止点的日期。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopBeforeMarkName</maml:name><maml:description><maml:para>在标记的事务之前停止恢复。与 StopBeforeMarkAfterDate 一起用来确定恢复操作的停止点。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ToPointInTime</maml:name><maml:description><maml:para>数据库日志还原的端点。仅当 -RestoreAction 参数设置为 Log 时才适用。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UnloadTapeAfter</maml:name><maml:description><maml:para>操作完成后,磁带机将倒带并卸载。如果未设置,则不尝试倒带和卸载磁带介质。不适用于磁盘备份。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupDevice</maml:name><maml:description><maml:para>存储备份的设备。此参数不能与 BackupFile 参数结合使用。如果您要备份到磁带机,则使用此参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceItem[]</command:parameterValue><dev:type><maml:name>BackupDeviceItem[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>BackupFile</maml:name><maml:description><maml:para>存储备份文件的位置。这是一个可选参数。如果未指定此参数,则在服务器的默认备份位置搜索名称“databasename.trn”(对于日志还原)或“databasename.bak”(对于所有其他类型的还原)。此参数不能与 BackupDevice 参数结合使用。如果要备份到 Windows Azure Blob 存储服务 (URL),必须指定此参数或 BackupDevice 参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BlockSize</maml:name><maml:description><maml:para>备份的物理块大小(字节)。支持的大小是 512、1024、2048、4096、8192、16384、32768 和 65536 (64 KB) 字节。对于磁带设备默认为 65536,其他情况为 512。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BufferCount</maml:name><maml:description><maml:para>用于备份操作的 I/O 缓冲区总数。可以指定任意正整数。如果使用很多缓冲区,则可能由于 Sqlservr.exe 进程中的虚拟地址空间不足而导致发生“内存不足”错误。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Checksum</maml:name><maml:description><maml:para>在还原操作过程中计算校验和值。如果未设置,则不计算校验和。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ClearSuspectPageTable</maml:name><maml:description><maml:para>在还原操作后删除可疑的页表。如果未设置,则不对可疑的页表执行任何操作。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionTimeout</maml:name><maml:description><maml:para>在超时失败之前等待服务器连接的秒数。超时值必须是 0 和 65534 之间的整数。如果指定 0,则连接尝试将没有超时限制。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ContinueAfterError</maml:name><maml:description><maml:para>出现校验和错误时继续操作。如果未设置,则在出现校验和错误后操作将失败。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>一个 PSCredential 对象,为有权执行此操作的 SQL Server 登录名指定凭据。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>要还原的数据库的名称。不能与 -DatabaseObject 参数一起使用。 </maml:para><maml:para>使用 -Database 参数时,还必须指定 -Path、-InputObject 或 -ServerInstance 参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFile</maml:name><maml:description><maml:para>还原操作所针对的数据库文件。仅当 RestoreAction 属性设置为 Files 时才使用。RestoreAction 参数设置为 Files 时,必须指定 DatabaseFileGroups 属性或 DatabaseFiles 属性。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFileGroup</maml:name><maml:description><maml:para>还原操作所针对的数据库文件组。仅当 RestoreAction 属性设置为 File 时才使用。RestoreAction 参数设置为 Files 时,必须指定 DatabaseFileGroups 属性或 DatabaseFiles 属性。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>DatabaseObject</maml:name><maml:description><maml:para>一个数据库对象。还原操作将备份还原到此数据库。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Database</command:parameterValue><dev:type><maml:name>Database</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FileNumber</maml:name><maml:description><maml:para>用于标识备份介质上的目标备份集的索引号。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>应发生还原的 SQL Server 实例的服务器对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue><dev:type><maml:name>Server[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>KeepReplication</maml:name><maml:description><maml:para>保留复制配置。如果未设置,则还原操作将忽略复制配置。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>要在备份介质和 SQL Server 实例之间传输的最大字节数。可能的值是 65536 字节 (64 KB) 的倍数,最多可到 4194304 字节 (4 MB)。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaName</maml:name><maml:description><maml:para>用于标识特定介质集的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRecovery</maml:name><maml:description><maml:para>数据库还原到“正在还原”状态。不发生回滚。可以还原其他备份。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRewind</maml:name><maml:description><maml:para>让磁带机在还原操作完成后在结束位置保留打开状态。如果未设置,则操作完成后将倒带。不适用于磁盘还原。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Offset</maml:name><maml:description><maml:para>要还原的页地址。仅当 -RestoreAction 设置为 OnlinePage 时才有效。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">Int64[]</command:parameterValue><dev:type><maml:name>Int64[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Partial</maml:name><maml:description><maml:para>还原操作为部分还原。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>PassThru</maml:name><maml:description><maml:para>输出用于执行备份操作的 Smo 备份对象。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您要在其中执行还原操作的 SQL Server 实例的路径。这是一个可选参数。如果未指定,此参数的值使用当前的工作位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RelocateFile</maml:name><maml:description><maml:para>Smo.Relocate 文件对象的列表。每个对象都由一个逻辑备份文件名和一个物理文件系统位置组成。还原操作将已还原的数据库移到目标服务器上的指定物理位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">RelocateFile[]</command:parameterValue><dev:type><maml:name>RelocateFile[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReplaceDatabase</maml:name><maml:description><maml:para>创建数据库的新映像。覆盖任何同名的现有数据库。如果未设置,则当具有该名称的数据库已存在时,还原操作将失败。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Restart</maml:name><maml:description><maml:para>继续处理部分完成的还原操作。如果未设置(默认值),则 cmdlet 将在备份集的开始处重新启动中断的还原操作。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RestoreAction</maml:name><maml:description><maml:para>应执行的还原操作类型。有效的选项包括 Database、Files、Log、OnlinePage、OnlineFiles。 </maml:para><maml:para>Database:还原数据库。 </maml:para><maml:para>Files:还原一个或多个数据文件。这要求设置 DatabaseFile 或 DatabaseFileGroup 参数。 </maml:para><maml:para>Log:还原事务日志。 </maml:para><maml:para>OnlinePage:在数据库仍可用于其他用户时联机还原数据页。 </maml:para><maml:para>OnlineFiles:在数据库仍可用于其他用户时还原一个或多个数据文件。这要求设置 DatabaseFile 或 DatabaseFileGroup 参数。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">RestoreActionType</command:parameterValue><dev:type><maml:name>RestoreActionType</maml:name><maml:uri /></dev:type><dev:defaultValue>Microsoft.SqlServer.Management.Smo.RestoreActionType.Database</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RestrictedUser</maml:name><maml:description><maml:para>仅限 db_owner 固定数据库角色以及 dbcreator 和 sysadmin 固定服务器角色访问已还原的数据库。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>SQL Server 实例的名称。此服务器实例成为还原操作的目标。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>存储身份验证信息的 SQL Server 凭据,用于在 Windows Azure Blob 存储服务上验证身份。存储的身份验证信息包括 Windows Azure 存储帐户名称和相关的访问密钥值。从 Windows Azure Blob 存储服务 (URL) 还原时,必须指定此参数。此参数不用于磁盘或磁带。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue><dev:type><maml:name>PSObject</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StandbyFile</maml:name><maml:description><maml:para>用作 SQL Server 实例的映像策略一部分的撤消文件的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopAtMarkAfterDate</maml:name><maml:description><maml:para>指定要与由 StopAtMarkName 参数指定的标记名称一起用来确定恢复操作的停止点的日期。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopAtMarkName</maml:name><maml:description><maml:para>在标记的事务之后停止恢复。与 StopAtMarkAfterDate 参数一起用来确定恢复操作的停止点。恢复包括其中包含标记的事务。如果未设置 StopAtMarkAfterDate 值,则恢复操作将在含有指定名称的第一个标记处停止。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopBeforeMarkAfterDate</maml:name><maml:description><maml:para>指定要与 StopBeforeMarkName 一起用来确定恢复操作的停止点的日期。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopBeforeMarkName</maml:name><maml:description><maml:para>在标记的事务之前停止恢复。与 StopBeforeMarkAfterDate 一起用来确定恢复操作的停止点。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ToPointInTime</maml:name><maml:description><maml:para>数据库日志还原的端点。仅当 -RestoreAction 参数设置为 Log 时才适用。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UnloadTapeAfter</maml:name><maml:description><maml:para>操作完成后,磁带机将倒带并卸载。如果未设置,则不尝试倒带和卸载磁带介质。不适用于磁盘备份。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Smo.Server</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para> 一个 SMO.Server 对象,指示应发生还原操作的 SQL Server 实例。 </maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Restore-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupFile "\\share\folder\MyDB.bak" </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令将完整数据库“MyDB”从文件“\\share\folder\MyDB.bak”还原到服务器实例“computer\Instance”。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Restore-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupFile "\\share\folder\MyDB.trn" -RestoreAction Log </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令将数据库“MyDB”的事务日志从文件“\\share\folder\MyDB.trn”还原到服务器实例“computer\Instance”。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Restore-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupFile "\\share\folder\MyDB.bak" -Credential (Get-Credential sa) </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令使用 sa SQL 登录名,将完整数据库“MyDB”从文件“\\share\folder\MyDB.trn”还原到服务器实例“Computer\Instance”。此命令将提示您输入密码以完成 SQL 身份验证。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Restore-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupFile "\\share\folder\MyDB.trn" -RestoreAction Log -NoRecovery </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令使用 NORECOVERY 选项,将数据库“MyDB”的事务日志从文件“\\share\folder\MyDB.trn”还原到服务器实例“Computer\Instance”。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Restore-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupFile "\\share\folder\MyDB.trn" -RestoreAction Log -ToPointInTime "Nov 11, 2011 11:11 AM" </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令将数据库“MyDB”的事务日志还原到传递给 -ToPointInTime 参数的最新日期,即“2011 年 11 月 11 日,上午 11 点 11 分”。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>$RelocateData = New-Object Microsoft.SqlServer.Management.Smo.RelocateFile("MyDB_Data", "c:\MySQLServer\MyDB.mdf") $RelocateLog = New-Object Microsoft.SqlServer.Management.Smo.RelocateFile("MyDB_Log", "c:\MySQLServer\MyDB.ldf") Restore-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupFile "\\share\folder\MyDB.trn" -RelocateFile @($RelocateData,$RelocateLog) </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此示例将完整数据库“MyDB”还原到服务器实例“Computer\Instance”,并重新确定数据和日志文件的位置。对于每个要移动的文件,此示例都会构造一个 Microsoft.SqlServer.Management.Smo.RelocateFile 实例:“$RelocateData”和“$RelocateLog”。每个构造函数都采用两个参数:文件的逻辑名称以及文件将放到目标服务器上的物理位置。这些 RelocateFile 对象传递到 Restore-SqlDatabase cmdlet 的 -RelocateFile 参数。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>$tapeDevice = New-Object Microsoft.Sqlserver.Management.Smo.BackupDeviceItem("\\.\tape0", "Tape") Restore-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupDevice $tapeDevice </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此示例将数据库“MyDB”从名为“\\.\tape0”的磁带机还原到服务器实例“computer\Instance”。为表示此设备,此示例构造一个 Microsoft.Sqlserver.Management.Smo.BackupDeviceItem 实例。此构造函数采用两个参数:备份设备的名称 ('\\.\tape0') 和备份设备的类型 ('Tape')。然后,此 BackupDeviceItem 对象传递到 Restore-SqlDatabase cmdlet 的 -BackupDevice 参数。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\>Restore-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupFile "https://mystorageaccountname.blob.core.windows.net/container/MyDB.bak" https://mystorageaccountname.blob.core.windows.net/container/MyDB.bak" -SqlCredential "mySqlCredential" </dev:code><dev:remarks><maml:para>此命令将完整数据库“MyDB”从 Windows Azure Blob 存储服务上的文件还原到服务器实例“Computer\Instance”。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Resume-SqlAvailabilityDatabase</command:name><maml:description><maml:para>恢复可用性数据库上的数据移动。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Resume</command:verb><command:noun>SqlAvailabilityDatabase</command:noun><dev:version /></command:details><maml:description><maml:para>Resume-SqlAvailabilityDatabase cmdlet 恢复可用性数据库上的数据移动。恢复主数据库将恢复相应辅助数据库上的数据移动。当恢复特定的辅助数据库时,将只在该数据库上恢复数据移动。 </maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Resume-SqlAvailabilityDatabase</maml:name><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>指向可用性数据库的路径。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Resume-SqlAvailabilityDatabase</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>要对其恢复数据移动的主或辅助数据库的 AvailabilityDatabase 对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>要对其恢复数据移动的主或辅助数据库的 AvailabilityDatabase 对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue><dev:type><maml:name>Target</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>指向可用性数据库的路径。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityDatabase</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name>SQL Server Books Online: Resuming a Database in an Availability Group (SQL Server)</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Resume-SqlAvailabilityDatabase -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg\AvailabilityDatabases\MyDatabase </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令针对可用性组“MyAg”中的可用性数据库“MyDatabase”恢复数据同步。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>dir SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\AgName\AvailabilityDatabases | Resume-SqlAvailabilityDatabase </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令针对名为“Computer\Instance”的服务器实例上的可用性组“MyAg”中的所有可用性数据库恢复数据同步。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Resume-SqlAvailabilityDatabase -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg\AvailabilityDatabases\MyDatabase -Script </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令输出一个 Transact-SQL 脚本,该脚本针对名为“Computer\Instance”的服务器实例上的可用性组“MyAg”中的可用性数据库“MyDatabase”恢复数据同步。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Set-SqlAuthenticationMode</command:name><maml:description><maml:para>配置 SQL Server 目标实例的身份验证模式。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Set</command:verb><command:noun>SqlAuthenticationMode</command:noun><dev:version /></command:details><maml:description><maml:para>配置 SQL Server 目标实例的身份验证模式。</maml:para><maml:para>SQL Server 云适配器必须在承载 SQL Server 实例的计算机上运行并且可访问它。</maml:para><maml:para>此 cmdlet 支持以下操作模式:</maml:para><maml:para>1.通过指定实例 PowerShell 路径。</maml:para><maml:para>2.通过指定服务器对象。</maml:para><maml:para>3.通过指定 SQL Server 目标实例的 ServerInstance。</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-SqlAuthenticationMode</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>指定一个在目标计算机上具有 Windows 管理员凭据的用户帐户。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Mode</maml:name><maml:description><maml:para>将在 SQL Server 目标实例上配置的身份验证模式。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">ServerLoginMode</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>将在 SQL Server 目标实例中创建的管理员凭据(如果启用“混合模式”身份验证)。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>强制 cmdlet 在不提示用户的情况下自动接受目标计算机的 SQL Server 云适配器自签名的证书。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ForceServiceRestart</maml:name><maml:description><maml:para>根据需要强制 SQL Server 服务重新启动而不提示用户。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目标计算机的公共管理端口。当目标计算机的端口不能直接访问但是可通过端点公开(这意味着我们需要连接到不同的端口)时,应使用此参数。</maml:para><maml:para>SQL Server 云适配器必须可通过此端口访问。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>阻止 SQL Server 服务在不提示用户的情况下重新启动。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您要在其中执行操作的 SQL Server 实例的路径。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目标服务器上重试命令的时间段。超时后,将不再重试。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-SqlAuthenticationMode</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>指定一个在目标计算机上具有 Windows 管理员凭据的用户帐户。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Mode</maml:name><maml:description><maml:para>将在 SQL Server 目标实例上配置的身份验证模式。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">ServerLoginMode</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>将在 SQL Server 目标实例中创建的管理员凭据(如果启用“混合模式”身份验证)。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>强制 cmdlet 在不提示用户的情况下自动接受目标计算机的 SQL Server 云适配器自签名的证书。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ForceServiceRestart</maml:name><maml:description><maml:para>根据需要强制 SQL Server 服务重新启动而不提示用户。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目标计算机的公共管理端口。当目标计算机的端口不能直接访问但是可通过端点公开(这意味着我们需要连接到不同的端口)时,应使用此参数。</maml:para><maml:para>SQL Server 云适配器必须可通过此端口访问。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>阻止 SQL Server 服务在不提示用户的情况下重新启动。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目标服务器上重试命令的时间段。超时后,将不再重试。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>目标实例的服务器对象。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-SqlAuthenticationMode</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>指定一个在目标计算机上具有 Windows 管理员凭据的用户帐户。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Mode</maml:name><maml:description><maml:para>将在 SQL Server 目标实例上配置的身份验证模式。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">ServerLoginMode</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>将在 SQL Server 目标实例中创建的管理员凭据(如果启用“混合模式”身份验证)。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>强制 cmdlet 在不提示用户的情况下自动接受目标计算机的 SQL Server 云适配器自签名的证书。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ForceServiceRestart</maml:name><maml:description><maml:para>根据需要强制 SQL Server 服务重新启动而不提示用户。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目标计算机的公共管理端口。当目标计算机的端口不能直接访问但是可通过端点公开(这意味着我们需要连接到不同的端口)时,应使用此参数。</maml:para><maml:para>SQL Server 云适配器必须可通过此端口访问。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>阻止 SQL Server 服务在不提示用户的情况下重新启动。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目标服务器上重试命令的时间段。超时后,将不再重试。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>此参数指定成为操作目标的 SQL Server 实例的名称。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>强制 cmdlet 在不提示用户的情况下自动接受目标计算机的 SQL Server 云适配器自签名的证书。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>指定一个在目标计算机上具有 Windows 管理员凭据的用户帐户。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ForceServiceRestart</maml:name><maml:description><maml:para>根据需要强制 SQL Server 服务重新启动而不提示用户。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>目标实例的服务器对象。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue><dev:type><maml:name>Server[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目标计算机的公共管理端口。当目标计算机的端口不能直接访问但是可通过端点公开(这意味着我们需要连接到不同的端口)时,应使用此参数。</maml:para><maml:para>SQL Server 云适配器必须可通过此端口访问。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Mode</maml:name><maml:description><maml:para>将在 SQL Server 目标实例上配置的身份验证模式。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">ServerLoginMode</command:parameterValue><dev:type><maml:name>ServerLoginMode</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>阻止 SQL Server 服务在不提示用户的情况下重新启动。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您要在其中执行操作的 SQL Server 实例的路径。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目标服务器上重试命令的时间段。超时后,将不再重试。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>此参数指定成为操作目标的 SQL Server 实例的名称。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>将在 SQL Server 目标实例中创建的管理员凭据(如果启用“混合模式”身份验证)。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\>CD SQLSERVER:\SQL\Computer\Instance; Set-SqlAuthenticationMode -Credential $credential Integrated -ForceServiceRestart -AcceptSelfSignedCertificate; </dev:code><dev:remarks><maml:para>此命令为服务器实例“Computer\Instance”将身份验证模式配置为“集成”。当前工作目录用于确定应发生该操作的服务器实例。SQL Server 服务将自动重新启动而不提示用户。将在不提示用户的情况下自动接受目标计算机的自签名证书。</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>This command retrieves all instances of SQL Server on the machine ‘MachineName’ and configures the authentication mode to ‘Mixed’, with the provided SQL credentials for each one of them. The SQL Server service will not be restarted automatically. The self-signed certificate of the target machine will be automatically accepted without prompting the user. PS C:\>Get-SqlInstance -Credential $credential -MachineName "MachineName" | Set-SqlAuthenticationMode -Credential $credential -Mode Mixed -SqlCredential $sqlCredential -NoServiceRestart -AcceptSelfSignedCertificate; </dev:code><dev:remarks><maml:para></maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>Online Version:</maml:linkText><maml:uri></maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Set-SqlAvailabilityGroup</command:name><maml:description><maml:para>此 cmdlet 修改现有可用性组上的设置。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Set</command:verb><command:noun>SqlAvailabilityGroup</command:noun><dev:version /></command:details><maml:description><maml:para>Set-SqlAvailabilityGroup cmdlet 修改现有可用性组上的 AutomatedBackupPreference、FailureConditionLevel 和 HealthCheckTimeout 设置。此 cmdlet 只能在承载主副本的服务器实例上执行。 </maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-SqlAvailabilityGroup</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>指向可用性组的路径。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AutomatedBackupPreference</maml:name><maml:description><maml:para>可用性组的自动备份首选项。有效选项为: </maml:para><maml:para>Primary:指定备份始终在主副本(无论此副本在何处)上发生。这是最常用的选项,因为当在辅助副本上运行备份时,用户需要的功能(如差异备份)不可用。 </maml:para><maml:para>SecondaryOnly:指定备份永远不会在主副本上执行。如果主副本是唯一的联机副本,则备份将不会发生。 </maml:para><maml:para>Secondary:指定对辅助副本发生备份,除非主要副本是唯一的联机副本。在该情况下,备份应在主副本上发生。 </maml:para><maml:para>None:此选项指定当选择副本以执行备份时,您不需要考虑主/辅助状态。而只考虑 BackupPriority 与“联机”/“已连接”状态。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityGroupAutomatedBackupPreference</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailureConditionLevel</maml:name><maml:description><maml:para>确定可用性组的自动故障转移行为。有效选项为: </maml:para><maml:para>OnServerDown:当 SQL Server 服务停止时执行故障转移或重新启动。 </maml:para><maml:para>OnServerUnresponsive:当满足任何下限值条件时,以及当 SQL Server 服务连接到群集并且超过“HealthCheckTimeout”阈值时,或者当目前为主角色的可用性副本处于故障状态时,执行故障转移或重新启动。(请参阅 HealthCheckTimeout 参数。) </maml:para><maml:para>OnCriticalServerError:当满足任何下限值条件时,以及当发生内部严重服务器错误(内存不足状况、严重读写违规或转储过多)时,执行故障转移或重新启动。 </maml:para><maml:para>OnModerateServerError:当满足任何下限值条件时,以及当发生中度服务器错误(持久内存不足状况)时,执行故障转移或重新启动。 </maml:para><maml:para>OnAnyQualifiedFailureConditions:当满足任何下限值条件时,以及当发生限定的故障条件(引擎工作线程耗尽、检测到无法解决的死锁)时,执行故障转移或重新启动。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityGroupFailureConditionLevel</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>HealthCheckTimeout</maml:name><maml:description><maml:para>将不响应的服务器声明为运行状况不正常之前所经历的时间长度(以毫秒为单位)。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-SqlAvailabilityGroup</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>要修改的可用性组的 AvailabilityGroup 对象。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AutomatedBackupPreference</maml:name><maml:description><maml:para>可用性组的自动备份首选项。有效选项为: </maml:para><maml:para>Primary:指定备份始终在主副本(无论此副本在何处)上发生。这是最常用的选项,因为当在辅助副本上运行备份时,用户需要的功能(如差异备份)不可用。 </maml:para><maml:para>SecondaryOnly:指定备份永远不会在主副本上执行。如果主副本是唯一的联机副本,则备份将不会发生。 </maml:para><maml:para>Secondary:指定对辅助副本发生备份,除非主要副本是唯一的联机副本。在该情况下,备份应在主副本上发生。 </maml:para><maml:para>None:此选项指定当选择副本以执行备份时,您不需要考虑主/辅助状态。而只考虑 BackupPriority 与“联机”/“已连接”状态。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityGroupAutomatedBackupPreference</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailureConditionLevel</maml:name><maml:description><maml:para>确定可用性组的自动故障转移行为。有效选项为: </maml:para><maml:para>OnServerDown:当 SQL Server 服务停止时执行故障转移或重新启动。 </maml:para><maml:para>OnServerUnresponsive:当满足任何下限值条件时,以及当 SQL Server 服务连接到群集并且超过“HealthCheckTimeout”阈值时,或者当目前为主角色的可用性副本处于故障状态时,执行故障转移或重新启动。(请参阅 HealthCheckTimeout 参数。) </maml:para><maml:para>OnCriticalServerError:当满足任何下限值条件时,以及当发生内部严重服务器错误(内存不足状况、严重读写违规或转储过多)时,执行故障转移或重新启动。 </maml:para><maml:para>OnModerateServerError:当满足任何下限值条件时,以及当发生中度服务器错误(持久内存不足状况)时,执行故障转移或重新启动。 </maml:para><maml:para>OnAnyQualifiedFailureConditions:当满足任何下限值条件时,以及当发生限定的故障条件(引擎工作线程耗尽、检测到无法解决的死锁)时,执行故障转移或重新启动。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityGroupFailureConditionLevel</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>HealthCheckTimeout</maml:name><maml:description><maml:para>将不响应的服务器声明为运行状况不正常之前所经历的时间长度(以毫秒为单位)。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AutomatedBackupPreference</maml:name><maml:description><maml:para>可用性组的自动备份首选项。有效选项为: </maml:para><maml:para>Primary:指定备份始终在主副本(无论此副本在何处)上发生。这是最常用的选项,因为当在辅助副本上运行备份时,用户需要的功能(如差异备份)不可用。 </maml:para><maml:para>SecondaryOnly:指定备份永远不会在主副本上执行。如果主副本是唯一的联机副本,则备份将不会发生。 </maml:para><maml:para>Secondary:指定对辅助副本发生备份,除非主要副本是唯一的联机副本。在该情况下,备份应在主副本上发生。 </maml:para><maml:para>None:此选项指定当选择副本以执行备份时,您不需要考虑主/辅助状态。而只考虑 BackupPriority 与“联机”/“已连接”状态。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityGroupAutomatedBackupPreference</command:parameterValue><dev:type><maml:name>AvailabilityGroupAutomatedBackupPreference</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailureConditionLevel</maml:name><maml:description><maml:para>确定可用性组的自动故障转移行为。有效选项为: </maml:para><maml:para>OnServerDown:当 SQL Server 服务停止时执行故障转移或重新启动。 </maml:para><maml:para>OnServerUnresponsive:当满足任何下限值条件时,以及当 SQL Server 服务连接到群集并且超过“HealthCheckTimeout”阈值时,或者当目前为主角色的可用性副本处于故障状态时,执行故障转移或重新启动。(请参阅 HealthCheckTimeout 参数。) </maml:para><maml:para>OnCriticalServerError:当满足任何下限值条件时,以及当发生内部严重服务器错误(内存不足状况、严重读写违规或转储过多)时,执行故障转移或重新启动。 </maml:para><maml:para>OnModerateServerError:当满足任何下限值条件时,以及当发生中度服务器错误(持久内存不足状况)时,执行故障转移或重新启动。 </maml:para><maml:para>OnAnyQualifiedFailureConditions:当满足任何下限值条件时,以及当发生限定的故障条件(引擎工作线程耗尽、检测到无法解决的死锁)时,执行故障转移或重新启动。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityGroupFailureConditionLevel</command:parameterValue><dev:type><maml:name>AvailabilityGroupFailureConditionLevel</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>HealthCheckTimeout</maml:name><maml:description><maml:para>将不响应的服务器声明为运行状况不正常之前所经历的时间长度(以毫秒为单位)。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>要修改的可用性组的 AvailabilityGroup 对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">T</command:parameterValue><dev:type><maml:name>T</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>指向可用性组的路径。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Set-SqlAvailabilityGroup -Path SQLSERVER:\Sql\PrimaryServer\InstanceName\AvailabilityGroups\MyAG -HealthCheckTimeout 120000 </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令将可用性组“MyAg”上的 HealhCheckTimeout 属性设置为 120,000 毫秒(2 分钟)。如果在此时间长度中主服务器未响应并且启用了自动故障转移,则将开始自动故障转移。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Set-SqlAvailabilityGroup -Path SQLSERVER:\Sql\PrimaryServer\InstanceName\AvailabilityGroups\MyAg -AutomatedBackupPreference SecondaryOnly </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令将可用性组“MyAg”上的 AutomatedBackupPreference 属性设置为“SecondaryOnly”。此可用性组中数据库的自动备份将永远不会在主副本上发生,但将重新定向到具有最高备份优先级的辅助副本上(请参阅可用性副本的 BackupPriority 属性)。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Set-SqlAvailabilityGroup -Path SQLSERVER:\Sql\PrimaryServer\InstanceName\AvailabilityGroups\MyAg -FailureConditionLevel OnServerDown </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令将可用性组“MyAg”上的 FailureConditionLevel 属性设置为“OnServerDown”。这意味着,在承载主副本的服务器实例进入脱机状态并且启用了自动故障转移后,将开始自动故障转移。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Set-SqlAvailabilityGroupListener</command:name><maml:description><maml:para>此 cmdlet 将修改现有可用性组侦听器的端口设置。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Set</command:verb><command:noun>SqlAvailabilityGroupListener</command:noun><dev:version /></command:details><maml:description><maml:para>Set-SqlAvailabilityGroupListener cmdlet 将修改现有可用性组侦听器的端口设置。此 cmdlet 只能在承载主副本的服务器实例上执行。 </maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-SqlAvailabilityGroupListener</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>可用性组侦听器的路径。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>侦听器将用于侦听连接的 TCP 端口。默认端口为 TCP 端口 1433。出于安全考虑,我们建议使用其他端口号。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-SqlAvailabilityGroupListener</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>要修改的侦听器的 SMO AvailabilityGroupListener 对象。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>侦听器将用于侦听连接的 TCP 端口。默认端口为 TCP 端口 1433。出于安全考虑,我们建议使用其他端口号。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>要修改的侦听器的 SMO AvailabilityGroupListener 对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">T</command:parameterValue><dev:type><maml:name>T</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>可用性组侦听器的路径。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>侦听器将用于侦听连接的 TCP 端口。默认端口为 TCP 端口 1433。出于安全考虑,我们建议使用其他端口号。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue>1433</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroupListener</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Set-SqlAvailabilityGroupListener -Port 1535 -Path SQLSERVER:\Sql\PrimaryServer\InstanceName\AvailabilityGroups\MyAg\AvailabilityGroupListeners\MyListener </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令将名为“MyListener”的可用性组侦听器的端口号设置为 1535。此端口用于侦听与侦听器的连接。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Set-SqlAvailabilityGroupListener -Port 1535 -Script -Path SQLSERVER:\Sql\PrimaryServer\InstanceName\AvailabilityGroups\MyAg\AvailabilityGroupListeners\MyListener </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令生成一个 Transact-SQL 脚本,该脚本将名为“MyListener”的可用性组侦听器的端口号设置为 1535。此命令并不实际更改此端口号。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Set-SqlAvailabilityReplica</command:name><maml:description><maml:para>此 cmdlet 修改现有可用性副本上的设置。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Set</command:verb><command:noun>SqlAvailabilityReplica</command:noun><dev:version /></command:details><maml:description><maml:para>Set-SqlAvailabilityReplica cmdlet 设置或修改可用性副本的各种属性。此 cmdlet 只能在承载主副本的服务器实例上执行。 </maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-SqlAvailabilityReplica</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>指向可用性副本的路径。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AvailabilityMode</maml:name><maml:description><maml:para>副本的可用性模式。选项为:SynchronousCommit 或 AsynchronousCommit。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaAvailabilityMode</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupPriority</maml:name><maml:description><maml:para>此选项是一个介于 0 到 100 之间的整数,表示执行备份所需的副本优先级。在联机且可用的副本集中,将选择具有最高优先级的副本来执行备份。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInPrimaryRole</maml:name><maml:description><maml:para>可用性副本在处于主要角色时应如何处理连接。有效设置如下: </maml:para><maml:para>AllowReadWriteConnections:允许读/写连接 </maml:para><maml:para>AllowAllConnections:允许所有连接 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInPrimaryRole</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInSecondaryRole</maml:name><maml:description><maml:para>可用性副本在处于辅助角色时应如何处理连接。有效设置如下: </maml:para><maml:para>AllowNoConnections:不允许连接 </maml:para><maml:para>AllowReadIntentConnectionsOnly:只允许读意向连接 </maml:para><maml:para>AllowAllConnections:允许所有连接 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInSecondaryRole</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EndpointUrl</maml:name><maml:description><maml:para>采用 TCP://System-address:port 格式的端点的 URL </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailoverMode</maml:name><maml:description><maml:para>副本的故障转移模式。选项为 Manual 或 Automatic。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaFailoverMode</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadonlyRoutingConnectionUrl</maml:name><maml:description><maml:para>当路由到副本以建立只读连接时,要使用的连接完全限定域名 (FQDN) 和端口。例如: </maml:para><maml:para>TCP://DBSERVER8.manufacturing.Adventure-Works.com:7024 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadOnlyRoutingList</maml:name><maml:description><maml:para>副本服务器名称的有序列表,这些名称表示当通过此可用性副本重定向只读连接时要使用的连接检测器的探测顺序。这一点适用于可用性副本为可用性组的当前主副本的情况。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SessionTimeout</maml:name><maml:description><maml:para>这是在主副本与此副本之间等待回复的秒数,超过该时间后,连接失败。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-SqlAvailabilityReplica</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>要修改的副本的 AvailabilityReplica 对象。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AvailabilityMode</maml:name><maml:description><maml:para>副本的可用性模式。选项为:SynchronousCommit 或 AsynchronousCommit。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaAvailabilityMode</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupPriority</maml:name><maml:description><maml:para>此选项是一个介于 0 到 100 之间的整数,表示执行备份所需的副本优先级。在联机且可用的副本集中,将选择具有最高优先级的副本来执行备份。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInPrimaryRole</maml:name><maml:description><maml:para>可用性副本在处于主要角色时应如何处理连接。有效设置如下: </maml:para><maml:para>AllowReadWriteConnections:允许读/写连接 </maml:para><maml:para>AllowAllConnections:允许所有连接 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInPrimaryRole</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInSecondaryRole</maml:name><maml:description><maml:para>可用性副本在处于辅助角色时应如何处理连接。有效设置如下: </maml:para><maml:para>AllowNoConnections:不允许连接 </maml:para><maml:para>AllowReadIntentConnectionsOnly:只允许读意向连接 </maml:para><maml:para>AllowAllConnections:允许所有连接 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInSecondaryRole</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EndpointUrl</maml:name><maml:description><maml:para>采用 TCP://System-address:port 格式的端点的 URL </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailoverMode</maml:name><maml:description><maml:para>副本的故障转移模式。选项为 Manual 或 Automatic。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaFailoverMode</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadonlyRoutingConnectionUrl</maml:name><maml:description><maml:para>当路由到副本以建立只读连接时,要使用的连接完全限定域名 (FQDN) 和端口。例如: </maml:para><maml:para>TCP://DBSERVER8.manufacturing.Adventure-Works.com:7024 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadOnlyRoutingList</maml:name><maml:description><maml:para>副本服务器名称的有序列表,这些名称表示当通过此可用性副本重定向只读连接时要使用的连接检测器的探测顺序。这一点适用于可用性副本为可用性组的当前主副本的情况。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SessionTimeout</maml:name><maml:description><maml:para>这是在主副本与此副本之间等待回复的秒数,超过该时间后,连接失败。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AvailabilityMode</maml:name><maml:description><maml:para>副本的可用性模式。选项为:SynchronousCommit 或 AsynchronousCommit。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaAvailabilityMode</command:parameterValue><dev:type><maml:name>AvailabilityReplicaAvailabilityMode</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupPriority</maml:name><maml:description><maml:para>此选项是一个介于 0 到 100 之间的整数,表示执行备份所需的副本优先级。在联机且可用的副本集中,将选择具有最高优先级的副本来执行备份。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInPrimaryRole</maml:name><maml:description><maml:para>可用性副本在处于主要角色时应如何处理连接。有效设置如下: </maml:para><maml:para>AllowReadWriteConnections:允许读/写连接 </maml:para><maml:para>AllowAllConnections:允许所有连接 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInPrimaryRole</command:parameterValue><dev:type><maml:name>AvailabilityReplicaConnectionModeInPrimaryRole</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInSecondaryRole</maml:name><maml:description><maml:para>可用性副本在处于辅助角色时应如何处理连接。有效设置如下: </maml:para><maml:para>AllowNoConnections:不允许连接 </maml:para><maml:para>AllowReadIntentConnectionsOnly:只允许读意向连接 </maml:para><maml:para>AllowAllConnections:允许所有连接 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInSecondaryRole</command:parameterValue><dev:type><maml:name>AvailabilityReplicaConnectionModeInSecondaryRole</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EndpointUrl</maml:name><maml:description><maml:para>采用 TCP://System-address:port 格式的端点的 URL </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailoverMode</maml:name><maml:description><maml:para>副本的故障转移模式。选项为 Manual 或 Automatic。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaFailoverMode</command:parameterValue><dev:type><maml:name>AvailabilityReplicaFailoverMode</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>要修改的副本的 AvailabilityReplica 对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">T</command:parameterValue><dev:type><maml:name>T</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>指向可用性副本的路径。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadonlyRoutingConnectionUrl</maml:name><maml:description><maml:para>当路由到副本以建立只读连接时,要使用的连接完全限定域名 (FQDN) 和端口。例如: </maml:para><maml:para>TCP://DBSERVER8.manufacturing.Adventure-Works.com:7024 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadOnlyRoutingList</maml:name><maml:description><maml:para>副本服务器名称的有序列表,这些名称表示当通过此可用性副本重定向只读连接时要使用的连接检测器的探测顺序。这一点适用于可用性副本为可用性组的当前主副本的情况。 </maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SessionTimeout</maml:name><maml:description><maml:para>这是在主副本与此副本之间等待回复的秒数,超过该时间后,连接失败。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityReplica</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para> 要修改的可用性副本。 </maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Set-SqlAvailabilityReplica -AvailabilityMode "SynchronousCommit" -FailoverMode "Automatic" -Path SQLSERVER:\Sql\PrimaryServer\InstanceName\AvailabilityGroups\MyAg\AvailabilityReplicas\MyReplica </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令修改可用性组“MyAg”中的副本“MyReplica”,以便使用同步提交可用性模式和支持自动故障转移。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Set-SqlAvailabilityReplica -AvailabilityMode "AsynchronousCommit" -FailoverMode "Manual" -Path SQLSERVER:\Sql\PrimaryServer\InstanceName\AvailabilityGroups\MyAg\AvailabilityReplicas\MyReplica </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令修改可用性组“MyAg”中的副本“MyReplica”,以便使用异步提交可用性模式和仅支持强制手动故障转移(可能造成数据丢失)。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Set-SqlAvailabilityReplica -ConnectionModeInSecondaryRole "AllowAllConnections" -Path SQLSERVER:\Sql\PrimaryServer\InstanceName\AvailabilityGroups\MyAg\AvailabilityReplicas\MyReplica </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令修改可用性组“MyAg”中的副本“MyReplica”,以便允许辅助角色中的所有连接。如果您想要将只读数据处理工作负荷交由辅助副本承担,这将很有用。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Set-Location SQLSERVER:\SQL\PrimaryServer\default\AvailabilityGroups\MyAg $primaryReplica = Get-Item "AvailabilityReplicas\PrimaryServer" $secondaryReplica = Get-Item "AvailabilityReplicas\SecondaryServer" Set-SqlAvailabilityReplica -ReadOnlyRoutingConnectionUrl "TCP://PrimaryServer.domain.com:5022" -InputObject $primaryReplica Set-SqlAvailabilityReplica -ReadOnlyRoutingConnectionUrl "TCP://SecondaryServer.domain.com:5022" -InputObject $secondaryReplica Set-SqlAvailabilityReplica -ReadOnlyRoutingList "SecondaryServer","PrimaryServer" -InputObject $primaryReplica </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此示例在一个可用性组中配置主副本和一个辅助副本以便用于只读路由。如果 ConnectionModeInSecondaryRole 选项设置为 AllowAllConnections 或 AllowReadIntentConnectionsOnly,则只读路由将允许辅助副本在客户端通过虚拟网络名称连接到可用性组时接收和接受读取请求。首先,该示例将向每个副本分配一个只读路由 URL。然后,在主副本上设置只读路由列表。连接字符串中的设置了“ReadOnly”属性的连接将被重定向到辅助副本。如果此辅助副本无法读取(由 ConnectionModeInSecondaryRole 设置确定),则连接将被定向回主副本。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Set-SqlAvailabilityReplica -BackupPriority 60 -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg\AvailabilityReplicas\MyReplica </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令将可用性副本“MyReplica”的备份优先级设置为 60。此优先级由承载主副本的服务器实例用来确定哪一副本应该用于针对可用性组中某一数据库的自动备份请求(选择具有最高优先级的副本)。该优先级可以是 0 和 100 之间(含 0 和 100)的任何数字。优先级 0 指示副本不应视作支持备份请求的候选。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Set-SqlCredential</command:name><maml:description><maml:para>设置 SQL 凭据对象的属性</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Set</command:verb><command:noun>SqlCredential</command:noun><dev:version /></command:details><maml:description><maml:para>您可以使用此 cmdlet 设置 SQL 凭据对象的标识和密码属性。此 cmdlet 支持以下两种操作模式: 1.通过使用 –path 参数指定凭据的路径或位置(包括凭据名称)。 2.通过使用 –InputObject 将 Smo.Credential 对象传递给该对象。 </maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-SqlCredential</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您要对其执行此操作的凭据的路径。示例:SQLSERVER:\SQL\Computer\Instance\Credentials\Credential </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Identity</maml:name><maml:description><maml:para>指定资源 SQL Server 需要对其进行身份验证的用户或帐户名称。对于 Windows Azure 存储服务,这是 Windows Azure 存储帐户的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="4" aliases=""><maml:name>Secret</maml:name><maml:description><maml:para>使用此参数指定用户或帐户的密码。对于 Windows Azure 存储服务,这是 Windows Azure 存储帐户的访问密钥值。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">SecureString</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-SqlCredential</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>一个输入凭据对象。可使用 Get-SqlCredential cmdlet 检索此对象。 </maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Identity</maml:name><maml:description><maml:para>指定资源 SQL Server 需要对其进行身份验证的用户或帐户名称。对于 Windows Azure 存储服务,这是 Windows Azure 存储帐户的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="4" aliases=""><maml:name>Secret</maml:name><maml:description><maml:para>使用此参数指定用户或帐户的密码。对于 Windows Azure 存储服务,这是 Windows Azure 存储帐户的访问密钥值。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">SecureString</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Identity</maml:name><maml:description><maml:para>指定资源 SQL Server 需要对其进行身份验证的用户或帐户名称。对于 Windows Azure 存储服务,这是 Windows Azure 存储帐户的名称。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>一个输入凭据对象。可使用 Get-SqlCredential cmdlet 检索此对象。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">T</command:parameterValue><dev:type><maml:name>T</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您要对其执行此操作的凭据的路径。示例:SQLSERVER:\SQL\Computer\Instance\Credentials\Credential </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="4" aliases=""><maml:name>Secret</maml:name><maml:description><maml:para>使用此参数指定用户或帐户的密码。对于 Windows Azure 存储服务,这是 Windows Azure 存储帐户的访问密钥值。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">SecureString</command:parameterValue><dev:type><maml:name>SecureString</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\>Set-SqlCredential -Path SQLSERVER:\SQL\Computer\Instance\Credentials\MySqlCredential –Identity "mystorageaccount" </dev:code><dev:remarks><maml:para>此命令通过指定 SQL 凭据的路径将 MySqlCredential 的标识设置为“mystorageaccount”。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\>The command retrieves the credential object from the Get-Credential cmdlet and then pipes it to the Set-Sql Credential cmdlet to set the identity of mySqLCrendential to ‘mystorageaccount’. PS C:\> $cred = Get-SqlCredential -Name MySqlCredential $cred | Set-SqlCredential –Identity "mystorageaccount" </dev:code><dev:remarks></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 3-------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\>The command prompts for the storage access key information and the Set-Sql Credential cmdlet to set the value for SECRET with the input value. PS C:\> $secret = read-host "Please enter the storage account access key" PS C:\> Set-SqlCredential –Identity "mystorageaccount" –Secret $secret </dev:code><dev:remarks></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Set-SqlHADREndpoint</command:name><maml:description><maml:para>设置现有数据库镜像端点的属性。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Set</command:verb><command:noun>SqlHADREndpoint</command:noun><dev:version /></command:details><maml:description><maml:para>Set-SqlHadrEndpoint cmdlet 允许更改现有数据库镜像端点的属性,如名称、状态或身份验证属性等。 </maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-SqlHADREndpoint</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>数据库镜像端点的路径。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AuthenticationOrder</maml:name><maml:description><maml:para>端点使用的身份验证的顺序和类型。选项为 Certificate、CertificateKerberos、CertificateNegotiate、CertificateNtlm、Kerberos、KerberosCertificate、Negotiate、NegotiateCertificate、Ntlm 和 NtlmCertificate。如果指定的选项需要证书,则还必须设置 -Certificate 参数,除非某个证书已经与该端点相关联。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointAuthenticationOrder</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Certificate</maml:name><maml:description><maml:para>端点应该用于对连接进行身份验证的证书的名称。远端点必须具有其公钥与指定证书的私钥相匹配的证书。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Encryption</maml:name><maml:description><maml:para>端点加密设置。选项为 Disabled、Supported 或 Required。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointEncryption</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionAlgorithm</maml:name><maml:description><maml:para>端点使用的加密形式。选项为 Aes、AesRC4、None、RC4 和 RC4Aes。 </maml:para><maml:para>注意:RC4 算法仅用于支持向后兼容性。仅当数据库兼容级别为 90 或 100 时,才能使用 RC4 或 RC4_128 对新材料进行加密。(建议不要使用。)而是使用一种较新的算法,如 AES 算法之一。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointEncryptionAlgorithm</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>IpAddress</maml:name><maml:description><maml:para>端点将侦听的 IP 地址。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">IPAddress</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Owner</maml:name><maml:description><maml:para>端点的所有者。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>端点用于侦听连接的 TCP 端口号。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>State</maml:name><maml:description><maml:para>端点的状态:Started、Stopped 或 Disabled。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointState</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-SqlHADREndpoint</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>应该修改的端点的 Endpoint 对象。该端点必须是数据库镜像端点。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AuthenticationOrder</maml:name><maml:description><maml:para>端点使用的身份验证的顺序和类型。选项为 Certificate、CertificateKerberos、CertificateNegotiate、CertificateNtlm、Kerberos、KerberosCertificate、Negotiate、NegotiateCertificate、Ntlm 和 NtlmCertificate。如果指定的选项需要证书,则还必须设置 -Certificate 参数,除非某个证书已经与该端点相关联。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointAuthenticationOrder</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Certificate</maml:name><maml:description><maml:para>端点应该用于对连接进行身份验证的证书的名称。远端点必须具有其公钥与指定证书的私钥相匹配的证书。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Encryption</maml:name><maml:description><maml:para>端点加密设置。选项为 Disabled、Supported 或 Required。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointEncryption</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionAlgorithm</maml:name><maml:description><maml:para>端点使用的加密形式。选项为 Aes、AesRC4、None、RC4 和 RC4Aes。 </maml:para><maml:para>注意:RC4 算法仅用于支持向后兼容性。仅当数据库兼容级别为 90 或 100 时,才能使用 RC4 或 RC4_128 对新材料进行加密。(建议不要使用。)而是使用一种较新的算法,如 AES 算法之一。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointEncryptionAlgorithm</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>IpAddress</maml:name><maml:description><maml:para>端点将侦听的 IP 地址。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">IPAddress</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Owner</maml:name><maml:description><maml:para>端点的所有者。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>端点用于侦听连接的 TCP 端口号。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>State</maml:name><maml:description><maml:para>端点的状态:Started、Stopped 或 Disabled。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointState</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AuthenticationOrder</maml:name><maml:description><maml:para>端点使用的身份验证的顺序和类型。选项为 Certificate、CertificateKerberos、CertificateNegotiate、CertificateNtlm、Kerberos、KerberosCertificate、Negotiate、NegotiateCertificate、Ntlm 和 NtlmCertificate。如果指定的选项需要证书,则还必须设置 -Certificate 参数,除非某个证书已经与该端点相关联。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointAuthenticationOrder</command:parameterValue><dev:type><maml:name>EndpointAuthenticationOrder</maml:name><maml:uri /></dev:type><dev:defaultValue>SMO.EndpointAuthenticationOrder.Negotiate</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Certificate</maml:name><maml:description><maml:para>端点应该用于对连接进行身份验证的证书的名称。远端点必须具有其公钥与指定证书的私钥相匹配的证书。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Encryption</maml:name><maml:description><maml:para>端点加密设置。选项为 Disabled、Supported 或 Required。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointEncryption</command:parameterValue><dev:type><maml:name>EndpointEncryption</maml:name><maml:uri /></dev:type><dev:defaultValue>SMO.EndpointAuthentication.Required</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionAlgorithm</maml:name><maml:description><maml:para>端点使用的加密形式。选项为 Aes、AesRC4、None、RC4 和 RC4Aes。 </maml:para><maml:para>注意:RC4 算法仅用于支持向后兼容性。仅当数据库兼容级别为 90 或 100 时,才能使用 RC4 或 RC4_128 对新材料进行加密。(建议不要使用。)而是使用一种较新的算法,如 AES 算法之一。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointEncryptionAlgorithm</command:parameterValue><dev:type><maml:name>EndpointEncryptionAlgorithm</maml:name><maml:uri /></dev:type><dev:defaultValue>RC4</dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>应该修改的端点的 Endpoint 对象。该端点必须是数据库镜像端点。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">T</command:parameterValue><dev:type><maml:name>T</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>IpAddress</maml:name><maml:description><maml:para>端点将侦听的 IP 地址。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">IPAddress</command:parameterValue><dev:type><maml:name>IPAddress</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Owner</maml:name><maml:description><maml:para>端点的所有者。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>数据库镜像端点的路径。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>端点用于侦听连接的 TCP 端口号。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue>4022</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。 </maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>State</maml:name><maml:description><maml:para>端点的状态:Started、Stopped 或 Disabled。 </maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointState</command:parameterValue><dev:type><maml:name>EndpointState</maml:name><maml:uri /></dev:type><dev:defaultValue>SMO.EndpointState.Stopped</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>SMO.Endpoint</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para> 要设置其属性的 AlwaysOn 端点。 </maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name>SMO.Endpoint</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Set-SqlHadrEndpoint -Path SQLSERVER:\Sql\Computer\Instance\Endpoints\MyDbmEndpoint -Port 5050 </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令将名为“MyDbmEndpoint”的数据库镜像端点的端口号设置为服务器实例“Computer\Instance”上的 5050。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS>Set-SqlHadrEndpoint -Path SQLSERVER:\Sql\Computer\Instance\Endpoints\MyDbmEndpoint -State Started </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此命令在服务器实例“Computer\Instance”上启动名为“MyDbmEndpoint”的数据库镜像端点。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Set-SqlNetworkConfiguration</command:name><maml:description><maml:para>设置 SQL Server 目标实例的网络配置。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Set</command:verb><command:noun>SqlNetworkConfiguration</command:noun><dev:version /></command:details><maml:description><maml:para>设置 SQL Server 目标实例的网络配置。</maml:para><maml:para>SQL Server 云适配器必须在承载 SQL Server 实例的计算机上运行并且可访问它。</maml:para><maml:para>此 cmdlet 支持以下操作模式:</maml:para><maml:para>1.通过指定实例 PowerShell 路径。</maml:para><maml:para>2.通过指定服务器对象。</maml:para><maml:para>3.通过指定 SQL Server 目标实例的 ServerInstance。</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-SqlNetworkConfiguration</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>指定一个在目标计算机上具有 Windows 管理员凭据的用户帐户。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Protocol</maml:name><maml:description><maml:para>指定要在 SQL Server 目标实例上配置的网络协议。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Protocols</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>要接受 TCP 连接的端口。要配置动态端口,此参数应设置为零。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>强制 cmdlet 在不提示用户的情况下自动接受目标计算机的 SQL Server 云适配器自签名的证书。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Disable</maml:name><maml:description><maml:para>指定我们要在 SQL Server 目标实例上禁用指定的网络协议。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ForceServiceRestart</maml:name><maml:description><maml:para>根据需要强制 SQL Server 服务重新启动而不提示用户。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目标计算机的公共管理端口。当目标计算机的端口不能直接访问但是可通过端点公开(这意味着我们需要连接到不同的端口)时,应使用此参数。</maml:para><maml:para>SQL Server 云适配器必须可通过此端口访问。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>阻止 SQL Server 服务在不提示用户的情况下重新启动。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您要在其中执行操作的 SQL Server 实例的路径。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目标服务器上重试命令的时间段。超时后,将不再重试。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-SqlNetworkConfiguration</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>指定一个在目标计算机上具有 Windows 管理员凭据的用户帐户。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Protocol</maml:name><maml:description><maml:para>指定要在 SQL Server 目标实例上配置的网络协议。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Protocols</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>要接受 TCP 连接的端口。要配置动态端口,此参数应设置为零。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>强制 cmdlet 在不提示用户的情况下自动接受目标计算机的 SQL Server 云适配器自签名的证书。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Disable</maml:name><maml:description><maml:para>指定我们要在 SQL Server 目标实例上禁用指定的网络协议。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ForceServiceRestart</maml:name><maml:description><maml:para>根据需要强制 SQL Server 服务重新启动而不提示用户。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目标计算机的公共管理端口。当目标计算机的端口不能直接访问但是可通过端点公开(这意味着我们需要连接到不同的端口)时,应使用此参数。</maml:para><maml:para>SQL Server 云适配器必须可通过此端口访问。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>阻止 SQL Server 服务在不提示用户的情况下重新启动。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目标服务器上重试命令的时间段。超时后,将不再重试。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>目标实例的服务器对象。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-SqlNetworkConfiguration</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>指定一个在目标计算机上具有 Windows 管理员凭据的用户帐户。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Protocol</maml:name><maml:description><maml:para>指定要在 SQL Server 目标实例上配置的网络协议。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Protocols</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>要接受 TCP 连接的端口。要配置动态端口,此参数应设置为零。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>强制 cmdlet 在不提示用户的情况下自动接受目标计算机的 SQL Server 云适配器自签名的证书。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Disable</maml:name><maml:description><maml:para>指定我们要在 SQL Server 目标实例上禁用指定的网络协议。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ForceServiceRestart</maml:name><maml:description><maml:para>根据需要强制 SQL Server 服务重新启动而不提示用户。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目标计算机的公共管理端口。当目标计算机的端口不能直接访问但是可通过端点公开(这意味着我们需要连接到不同的端口)时,应使用此参数。</maml:para><maml:para>SQL Server 云适配器必须可通过此端口访问。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>阻止 SQL Server 服务在不提示用户的情况下重新启动。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目标服务器上重试命令的时间段。超时后,将不再重试。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>此参数指定成为操作目标的 SQL Server 实例的名称。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>强制 cmdlet 在不提示用户的情况下自动接受目标计算机的 SQL Server 云适配器自签名的证书。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>指定一个在目标计算机上具有 Windows 管理员凭据的用户帐户。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Disable</maml:name><maml:description><maml:para>指定我们要在 SQL Server 目标实例上禁用指定的网络协议。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ForceServiceRestart</maml:name><maml:description><maml:para>根据需要强制 SQL Server 服务重新启动而不提示用户。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>目标实例的服务器对象。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue><dev:type><maml:name>Server[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目标计算机的公共管理端口。当目标计算机的端口不能直接访问但是可通过端点公开(这意味着我们需要连接到不同的端口)时,应使用此参数。</maml:para><maml:para>SQL Server 云适配器必须可通过此端口访问。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>阻止 SQL Server 服务在不提示用户的情况下重新启动。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您要在其中执行操作的 SQL Server 实例的路径。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>要接受 TCP 连接的端口。要配置动态端口,此参数应设置为零。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Protocol</maml:name><maml:description><maml:para>指定要在 SQL Server 目标实例上配置的网络协议。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Protocols</command:parameterValue><dev:type><maml:name>Protocols</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目标服务器上重试命令的时间段。超时后,将不再重试。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>此参数指定成为操作目标的 SQL Server 实例的名称。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue><dev:type><maml:name>String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\>CD SQLSERVER:\SQL\Computer\Instance; Set-SqlNetworkConfiguration -Credential $credential -Protocol TCP -Port 1433 -NoServiceRestart -AcceptSelfSignedCertificate; </dev:code><dev:remarks><maml:para>此命令对于服务器实例“Computer\Instance”将网络配置设置为在端口 1433 接受 TCP 连接。当前工作目录用于确定应发生该操作的服务器实例。SQL Server 服务将不自动重新启动。将在不提示用户的情况下自动接受目标计算机的自签名证书。</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>This command retrieves all instances of SQL Server on the machine ‘MachineName’ and disables TCP connections for each one of them. The SQL Server service will not be restarted automatically. The self-signed certificate of the target machine will be automatically accepted without prompting the user. PS C:\>Get-SqlInstance -Credential $credential -MachineName "MachineName" | Set-SqlNetworkConfiguration -Credential $credential -Protocol TCP -Disable -NoServiceRestart -AcceptSelfSignedCertificate; </dev:code><dev:remarks><maml:para></maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>Online Version:</maml:linkText><maml:uri></maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Set-SqlSmartAdmin</command:name><maml:description><maml:para>此 cmdlet 配置或修改备份保持期和存储设置。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Set</command:verb><command:noun>SqlSmartAdmin</command:noun><dev:version /></command:details><maml:description><maml:para>Set-SqlSmartAdmin cmdlet 配置或修改 BackupEnabled、BackupRetentionPeriodinDays、MasterSwitch 和 SqlCredential 参数设置。只能针对实例级配置而不针对特定数据库执行此 cmdlet。</maml:para><maml:para>此 cmdlet 支持以下操作模式来返回此对象: 1.通过直接方式或管道方式将 Smo.Server 对象传递给 -InputObject 参数。 2.将 SQL Server 实例的路径传递给 -Path 参数</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-SqlSmartAdmin</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>SQL Server 实例的路径。这是一个可选参数。如果未指定,此参数的值使用当前工作目录。这在创建脚本来管理多个实例时很有用。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupEnabled</maml:name><maml:description><maml:para>用于启用或禁用“SQL Server 托管备份到 Windows Azure”的参数。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupRetentionPeriodInDays</maml:name><maml:description><maml:para>应保留备份文件的天数。这确定数据库的可恢复性的时间范围。例如,如果将该值设置为 30 天,则可以将数据库恢复到过去 30 天内的某个时间点。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionOption</maml:name><maml:description><maml:para>加密选项。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptionOptions</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MasterSwitch</maml:name><maml:description><maml:para>用于暂停或重新启动智能管理下的所有服务,包括“SQL Server 托管备份到 Windows Azure”。这是必需的参数。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>用于验证 Windows Azure 存储帐户身份的 SqlCredential 对象。这是必需的参数。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-SqlSmartAdmin</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>Smo 智能管理对象。可使用 Get-SqlSmartAdmin cmdlet 检索此对象。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupEnabled</maml:name><maml:description><maml:para>用于启用或禁用“SQL Server 托管备份到 Windows Azure”的参数。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupRetentionPeriodInDays</maml:name><maml:description><maml:para>应保留备份文件的天数。这确定数据库的可恢复性的时间范围。例如,如果将该值设置为 30 天,则可以将数据库恢复到过去 30 天内的某个时间点。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionOption</maml:name><maml:description><maml:para>加密选项。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptionOptions</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MasterSwitch</maml:name><maml:description><maml:para>用于暂停或重新启动智能管理下的所有服务,包括“SQL Server 托管备份到 Windows Azure”。这是必需的参数。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>用于验证 Windows Azure 存储帐户身份的 SqlCredential 对象。这是必需的参数。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupEnabled</maml:name><maml:description><maml:para>用于启用或禁用“SQL Server 托管备份到 Windows Azure”的参数。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue><dev:type><maml:name>Boolean</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupRetentionPeriodInDays</maml:name><maml:description><maml:para>应保留备份文件的天数。这确定数据库的可恢复性的时间范围。例如,如果将该值设置为 30 天,则可以将数据库恢复到过去 30 天内的某个时间点。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionOption</maml:name><maml:description><maml:para>加密选项。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptionOptions</command:parameterValue><dev:type><maml:name>BackupEncryptionOptions</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>Smo 智能管理对象。可使用 Get-SqlSmartAdmin cmdlet 检索此对象。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">T</command:parameterValue><dev:type><maml:name>T</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MasterSwitch</maml:name><maml:description><maml:para>用于暂停或重新启动智能管理下的所有服务,包括“SQL Server 托管备份到 Windows Azure”。这是必需的参数。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue><dev:type><maml:name>Boolean</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>SQL Server 实例的路径。这是一个可选参数。如果未指定,此参数的值使用当前工作目录。这在创建脚本来管理多个实例时很有用。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>输出用于执行由此 cmdlet 执行的任务的 Transact-SQL 脚本。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>用于验证 Windows Azure 存储帐户身份的 SqlCredential 对象。这是必需的参数。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue><dev:type><maml:name>PSObject</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>描述在执行了 cmdlet 的情况下将发生的情况但不实际执行 cmdlet。</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\ PS> cd SQLSERVER:\SQL\Computer\MyInstance </dev:code><dev:code>PS C:\>Get-SqlSmartAdmin | Set-SqlSmartAdmin –BackupEnabled $True –BackupRetentionPeriodInDays 10 </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此示例配置“MyInstance”的云备份设置。它使用 Get-SqlSmartAdmin cmdlet 检索智能管理对象并通过管道将它传输到 Set-SqlSmartAdmin cmdlet。</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\ PS> cd SQLSERVER:\SQL\Computer\MyInstance </dev:code><dev:code>PS C:\>Get-SqlSmartAdmin | Set-SqlSmartAdmin –MasterSwitch $False </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此示例为整个实例暂停 SQL Server 托管备份服务。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\ PS> cd SQLSERVER:\SQL\Computer\MyInstance </dev:code><dev:code>PS C:\>Get-SqlSmartAdmin | Set-SqlSmartAdmin –MasterSwitch $True </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此示例恢复“SQL Server 托管备份到 Windows Azure”服务。 </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\>$encryptionOption = New-SqlBackupEncryptionOption -EncryptionAlgorithm Aes128 -EncryptorType ServerCertificate -EncryptorName "MyBackupCert" </dev:code><dev:code>PS C:\>Get-SqlSmartAdmin | Set-SqlSmartAdmin -EncryptionOption $encryptionOption </dev:code><dev:remarks><maml:para>说明 </maml:para><maml:para>----------- </maml:para><maml:para>此示例通过提供 –Encryption 参数设置“SQL Server 托管备份到 Windows Azure”的加密选项。</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Start-SqlInstance</command:name><maml:description><maml:para>启动指定的 SQL Server 实例。</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Start</command:verb><command:noun>SqlInstance</command:noun><dev:version /></command:details><maml:description><maml:para>启动指定的 SQL Server 实例。</maml:para><maml:para>SQL Server 云适配器必须在承载 SQL Server 实例的计算机上运行并且可访问它。</maml:para><maml:para>此 cmdlet 支持以下操作模式:</maml:para><maml:para>1.通过指定实例 PowerShell 路径。</maml:para><maml:para>2.通过指定服务器对象。</maml:para><maml:para>3.通过指定 SQL Server 目标实例的 ServerInstance。</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Start-SqlInstance</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>指定一个在目标计算机上具有 Windows 管理员凭据的用户帐户。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>强制 cmdlet 在不提示用户的情况下自动接受目标计算机的 SQL Server 云适配器自签名的证书。</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>目标计算机的公共管理端口。当目标计算机的端口不能直接访问但是可通过端点公开(这意味着我们需要连接到不同的端口)时,应使用此参数。</maml:para><maml:para>SQL Server 云适配器必须可通过此端口访问。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>您要在其中执行操作的 SQL Server 实例的路径。这是一个可选参数。如果未指定,此参数的值默认为当前的工作位置。</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>在目标服务器上重试命令的时间段。超时后,将不再重试。</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>在执行 cmdlet 前提示您进行确认。</maml:para></maml:description></command:parameter><command:paramete |