次の方法で共有


Password Property

この機能は、将来のバージョンの Microsoft SQL Server では削除される予定です。新規の開発作業ではこの機能を使用しないようにし、現在この機能を使用しているアプリケーションは修正することを検討してください。

The Password property indicates a password for a Microsoft SQL Server login record.

構文

object
.Password [= value]

Parts

  • object
    An expression that evaluates to an object in the Applies To list
  • value
    A string that contains the password

Data Type

String

Modifiable

Read/write

Prototype (C/C++)

HRESULT GetPassword(SQLDMO_LPBSTR pRetVal);
HRESULT SetPassword(SQLDMO_LPCSTR NewValue);
ms136184.note(ja-jp,SQL.90).gifメモ :
SQL Distributed Management Objects (SQL-DMO) strings are always returned as OLE BSTR objects. A C/C++ application obtains a reference to the string. The application must release the reference using SysFreeString.

解説

Use the Password property of the DatabaseRole object to set the password for an application role. For more information about security based on application roles, see サブスクリプション管理プロジェクトの開始.

For the RegisteredServer object, the Password property provides the password used when a connection is made using the default login.

For the SQLServer object, the Password property provides the password used for a connection made with SQL Server Authentication.

For the Backup2 and Restore2 objects, the Password property provides the password used for a backup set. Password can be used in conjunction with the MediaPassword property, which provides the password for a media set. For more information, see MediaPassword Property.

ms136184.note(ja-jp,SQL.90).gifメモ :
The recommended method for connecting to an instance of SQL Server is Windows Authentication.
ms136184.note(ja-jp,SQL.90).gifメモ :
If an application calls Password on an instance of SQL Server version 7.0 or earlier with the Backup2 or Restore2 objects, the settings are ignored.

Applies To:

Backup2 Object

Restore2 Object

DatabaseRole Object

SQLServer Object

RegisteredServer Object