Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7576259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:52:38+00:00 2026-05-30T16:52:38+00:00

This is some weird behavior… Whenever I script certain tables (using CREATE TO…) or

  • 0

This is some weird behavior…

Whenever I script certain tables (using CREATE TO…) or edit stored procedures (using modify in the right click context menu) I sometimes get really weird results… For example, scripting most tables gives me:

CREATE TABLE [dbo.].[TableINeverAskedFor]
...

CREATE TABLE [dbo].[TableIWant](
    [ID] [int] IDENTITY(1,1) NOT NULL,
    [Name] [nvarchar](128) NOT NULL,
    [ModuleID] [int] NOT NULL,
    [OtherInfo] [int] NOT NULL,
CONSTRAINT [PK_ModuleDefinitions] PRIMARY KEY NONCLUSTERED 

CREATE TABLE [dbo.].[TableINeverAskedFor]
...

ALTER TABLE [dbo].[TableWhichHasNothingToDoWithMyTable] ADD  CONSTRAINT [FK_WhyDoesThisHappen?]  DEFAULT ((0)) FOR [ID]

Stored procedures are even more weird… the bigger the sotred procedure, the more alter scripts I get, just like above. It’s really annoying and I am afraid I’m going to do something stupid and not pay attention one day.

Relevant info:

  • I have SQL Server 2008 R2 installed, a new install.
  • I have a few developers in my shop experiencing similar problems.
  • I also have a SQL Server 2008 box (no R2) doing the same thing.
  • My instance is updated with SP1 and theirs aren’t.
  • We can also replicate the issue on multiple databases.
  • Our production server is not giving us the same issue.
  • Some stored procedures and tables don’t have this problem however the same stored procedures and tables can be replicated. It’s not a random issue.
  • I have no plugins installed.

EDIT: It’s not that weird… I can see it being useful for table creation. Editing a stored procedure though, that was what was very confusing to me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T16:52:40+00:00Added an answer on May 30, 2026 at 4:52 pm

    In Management Studio go to Tools > Options > SQL Server Object Explorer > Scripting and change Generate script for dependent objects to false. False is the default so you did ask for this at some point. 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Alright, I have some weird behavior and this question goes to the people out
I am encountering some weird behavior when calling a shell script from a Java
I am getting some weird behavior when using cout in my programm, which is
We're having this weird behavior regarding our logs. We're using log4net and here is
I have noticed some weird behavior when sourcing another script within my shell script.
I've noticed some weird behavior with NSBundle when using it in a command-line program.
I'm having some weird behavior in an application which is puzzling me. I create
I have this exported file of some weird (standard for this industry!) format, which
I'm having some weird issues with Xcode, and this is pretty much impossible to
I'm new to Ruby, so I'm having some trouble understanding this weird exception problem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.