Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Other SQL Server Topics (2005)
 How to get rid of Database name while scripting

Author  Topic 

Jayaraj
Starting Member

3 Posts

Posted - 2008-06-30 : 11:20:08
Hi Friends/Gurus,
In SQL server 2005 I use the script option directly from the object. But it appends the database name and user to it. Is there a way I can configure my sql management studio client so that it wont' include the DB name and user when I script something?
For eg if I script a table it will say



INSERT INTO [DBNAME].dbo.[TableName](column1,column2)



My expectation is to get just
INSERT INTO [TableName](column1,column2)



The reason is, we move the script from dev to uat and then production and we don't want the DB name in the script/stored procedure. The DB names in UAT/production are different from dev environment

Thanks,
Jay

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-06-30 : 22:39:26
Try modify template in ssms.
Go to Top of Page
   

- Advertisement -