background preloader

DBA

Facebook Twitter

How to find locks in sql server 2000. SQL Server 2000 command to disable user account. Script SQL Server 2005 diagrams to a file. Download source code - 4.72 Kb Introduction Microsoft SQL Server 2000 has a feature that allows you to generate diagrams of your schema. These diagrams are saved in a custom, binary format by the Enterprise Manager in the [dtproperties] table - they are backed-up with the rest of your data, but they are not easy to transfer between databases or add to source control (like Visual SourceSafe). In order to move a diagram to another database (or get it into a 'text' format for source control), you need to extract the binary data from [dtproperties] and get it into a more usable format - Clay Beatty wrote a tool to do just that for SQL Server 2000. The code for this article contains a similar tool, re-written for SQL Server 2005. It consists of a stored procedure and function that work together to generate a set of INSERT/UPDATE statements which you apply to a database in order to restore the source diagram.

Background: Scripting diagrams in SQL Server 2000 SQL Server 2005 About the new 2005 code. SQL Server Logins and Users. Designing the Star Schema Database. SQL Server - Database Schemas. Ever since SQL Server 2005 was released, each object in a database has belonged to a database schema. SQL Server 2008 has continued with database schemas, and an explanation follows. What is a Database Schema? A database schema is a way to logically group objects such as tables, views, stored procedures etc. Think of a schema as a container of objects. You can assign a user login permissions to a single schema so that the user can only access the objects they are authorized to access. Schemas can be created and altered in a database, and users can be granted access to a schema.

Creating a Database Schema To create a database schema in SQL Server 2008: Navigate to Security > SchemasRight click on Schemas and select New Schema.... Add any extended properties (via the Extended Properties tab)Click OK. Add a Table to the New Schema Now that we have a new schema, we can add objects such as tables, views, and stored procedures to it. To transfer the "Individual" table to the person "schema": 2005 – Get Field Name and Type of Database Table « Journey to SQLAuthority. How to check number of Active connections in SQL server? SQL Server information @ Narayana Vyas Kondreddi's website: A good resource for all your SQL Server needs!