Microsoft SQL Server view script
File type: Source code and script file
A .viw file is a Microsoft SQL Server view script.
It contains the SQL statements used to create or define a view in a Microsoft SQL Server database.
File type category:
Source code and script file
Date updated: November 6, 2026
The .viw file extension is associated with Microsoft SQL Server, Microsoft's relational database management system for Microsoft Windows.
A .viw file stores a view script. A view is a database object that presents the results of a stored query, while the script provides the SQL needed to create or recreate that object in a database.
The file is a script rather than a database file containing the view's stored data. It can be used with SQL Server tools to recreate or modify the view.
Open the .viw file in a text editor to inspect its SQL statements. To use the script, open or paste it in Microsoft SQL Server Management Studio and execute it against the appropriate SQL Server database.
Execution can create or modify a view, so the script should be checked before it is run.
A .viw file does not normally need conversion. Its SQL statements can be opened in a text editor and saved with the .sql extension, provided the contents are preserved.
To obtain a usable database object, execute the script in Microsoft SQL Server rather than converting it to another file format.
Software applications that can open viw files:
Microsoft Windows
Software apps that create viw files:
Microsoft Windows
Software applications that handle other tasks involving viw files:
Microsoft Windows