DatabaseFile.Rename Method

Renames a database file.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Syntax

'Declaration
Public Sub Rename ( _
    newname As String _
)
'Usage
Dim instance As DatabaseFile 
Dim newname As String

instance.Rename(newname)
public void Rename(
    string newname
)
public:
virtual void Rename(
    String^ newname
) sealed
abstract Rename : 
        newname:string -> unit  
override Rename : 
        newname:string -> unit
public final function Rename(
    newname : String
)

Parameters

Implements

IRenamable.Rename(String)

Examples

Using Filegroups and Files to Store Data

See Also

Reference

DatabaseFile Class

Microsoft.SqlServer.Management.Smo Namespace

Other Resources

Files and Filegroups Architecture