Oracle SQL Developer, rather inexplicably in my view, doesn't come out-of-the-box with a good facility to set the schema. Even the set active schema command gets ignored.
This extension provides a handy drop-down box that allows you to set the active schema. Brilliant :-)
http://javaforge.com/project/schemasel
Showing posts with label schema. Show all posts
Showing posts with label schema. Show all posts
Wednesday, February 12, 2014
Thursday, March 21, 2013
Altering schema for all tables in MS SQL Server 2005
I ran into a situation today where I needed to alter all tables for an MS SQL Server 2005 database.
A quick Google revealed this post from Ruslan Trifonov.
exec sp_MSforeachtable "ALTER SCHEMA new_schema TRANSFER ? PRINT '? modified' "
Excellent :-) That was easy ...
Reference to ALTER SCHEMA command is here.
In it's simplest form, the command appears to take this shape: ALTER SCHEMA HumanResources TRANSFER Person.Address;
For those who aren't familiar with the '?' in T/SQL, it's represents a parameter, so this statement is parameterized. Essentially, sp_MSforeachtable is going to pass the name of each table to statement/query.
Great stuff. Big thanks to Ruslan. That was easy :-)
A quick Google revealed this post from Ruslan Trifonov.
exec sp_MSforeachtable "ALTER SCHEMA new_schema TRANSFER ? PRINT '? modified' "
Excellent :-) That was easy ...
Reference to ALTER SCHEMA command is here.
In it's simplest form, the command appears to take this shape: ALTER SCHEMA HumanResources TRANSFER Person.Address;
For those who aren't familiar with the '?' in T/SQL, it's represents a parameter, so this statement is parameterized. Essentially, sp_MSforeachtable is going to pass the name of each table to statement/query.
Great stuff. Big thanks to Ruslan. That was easy :-)
Subscribe to:
Posts (Atom)
Get Restart log using PowerShell
I'm often curious about a restart on a Windows server system. An easy way to get a list of the restart and what initiated it is to use t...
-
Most of what we're going to want to look at when you're having production issues are available through DMV's. If granti...
-
I’ve been having some trouble getting DBCA to run in order to create databases. Thought I’d share it with you, and thus document it for la...
-
I'm often curious about a restart on a Windows server system. An easy way to get a list of the restart and what initiated it is to use t...