Home Forums SQL Server 2008 T-SQL (SS2K8) How to stop SSMS from adding database name to scripts RE: How to stop SSMS from adding database name to scripts

  • I have no problem getting rid of it.

    My problem is that I don't ever want the scripter to add the database name. It never should. Otherwise you couldn't move it from database to database (Dev to Stage to Production).

    This is my problem.

    If you don't get rid of it or miss one then your programs will start crashing. In my case, I missed one and it looked like it was working in Dev and in QA (the database referenced was DEV). And since the Dev database was on the same server as stage, it still worked (or seemed to). We didn't see any errors and the data was similar.

    But when we moved our data to the customer and they put it on their database, they didn't have the Dev database so the programs crashed.

    I absolutely cannot see a reason to script the database name onto the table name. If you need to access a different database, then you add it.

    Thanks,

    Tom