2007-05-07 (first published: 2007-04-20)
266 reads
2007-05-07 (first published: 2007-04-20)
266 reads
To Retreive List of Default Constraints from current database with PRINT or DROP
2007-05-04 (first published: 2007-04-20)
573 reads
I wrote this little tool out of the frustratingly slow process one must endure to find out what database Recovery Model your SQL 2000 databases are currently set to. This tool will quickly reveal whether your database Recovery model is set to either "Simple", "Full", or "Bulk-Logged." Who has time to manually pull up "Properties" […]
2007-05-03 (first published: 2003-03-06)
852 reads
This script uses an old mathematical way of doing hierarchical queries. The most common way of showing hierarchical data in SQL Server is by creating a stored procedure that calls itself. This is not a recent problem, in fact this programming technique has been around since the first programming languages. By using stacks, you can […]
2007-05-02 (first published: 2004-02-17)
616 reads
2007-04-30 (first published: 2007-04-03)
1,710 reads
2007-04-27 (first published: 2007-04-03)
1,303 reads
Here's the scenario: 1. You have been given a script to run.2. You do not know the database name.3. You know which server.Substitute the word "TABLENAME" with the table name in the script and run in query analyzer. This query will check every database on the server and return the name of the database with […]
2007-04-26 (first published: 2007-04-04)
531 reads
Check Indexes on all databases and rebuild/reindex based on fragmentation
2007-04-25 (first published: 2007-04-05)
1,497 reads
2007-04-24 (first published: 2007-04-05)
486 reads
This script is basically a front-end for the sp_"scriptproc" stored procedures that ship with MSSQL. This will allow you to create ALL of your procs (INS, UPD and DEL) on the fly using the article name instead of having to first search for the article ID. It also uses sp_scriptdynamicupdproc where appropriate. This facilitates quick […]
2007-04-23 (first published: 2007-03-27)
1,780 reads
Continuing with my takeaways from SQLCon and FabCon Europe in Barcelona, let’s talk about...
By Steve Jones
Next year the PASS Data Community Summit is in DENVER! and London, but Denver...
By Steve Jones
Yesterday was the first day of sessions at the PASS Data Community Summit (after...
Comments posted to this topic are about the item Pay for Performance, which is...
Comments posted to this topic are about the item Switching Schemas I
Comments posted to this topic are about the item Enforcing Unique Customer Emails When...
I run this query:
SELECT s.name AS schemaname , o.name AS objectname FROM sys.objects o INNER JOIN sys.schemas s ON s.schema_id = o.schema_id WHERE o.name = 'Beer'I get one row back for an object named dbo.beer. There is an ETL schema and both of these are nonpartitioned tables. I run this code:
ALTER TABLE dbo.beer switch TO etl.beerWhat happens? See possible answers