Visual Studio 2008, Local Database, cannot modify custom table view - database

I just installed Visual Studio 2008 and SQL Server 2008 on my machine - in that order.
I note that VS insisted on installing SQL Server 2005 Express in order to be able to create a local database in by web projects.
In any case, whenever I add a local database and go to create a diagram, I can't seem to modify the Custom table view.
For example, I like to see the column name, data type, nullable and default value columns.
Whenever I click "Table View" - "Modify Custom", nothing happens!
Strangely, this action works fine in SQL Server 2008.
Has anyone else ever encountered this - and (hopefully) found a solution?

Related

How to set the SQL Database Project in the Visual Studio 2017 connected to the Database?

I am working on SQL Database Project in the Visual Studio 2017. Purpose is to push only the Stored Procedure Changes to VSTS Git.
Instead of connecting to the Database from the Project Solution, I am using Import SQL Scripts.
In this approach, any changes in the stored procedure has to be copied and pasted on the stored procedure in the Project Solution.
How to set the SQL Database Project in the Visual Studio 2017 connected to the Database? And Connecting to the Database should not allow Import option to extract the all other database objects such as Table, View from SQL to Visual Studio. We do not want all other scripts. We just need only those Stored Procedures to be sync with database environment.
At present, we are making the changes to the Stored Procedures in the SQL Management Studio. Further then, we manually copy the SQL Script from SQL Management Studio to Visual Studio Environment.
Whether, will it be possible for us to have the changes auto-sync between SQL Management Studio to Visual Studio (or) by refreshing the Visual Studio Project.
In Visual Studio, go to Tools -> SQL Server -> Schema Compare. At the top of the new window, access the dropdown, and put your local DB connection (where you've added the stored procedure) on the left, and your DB project on the right. Hit Compare, and then Update. This should update the dbo directory in your Database project to match the local db schema, whether you're adding 1 proc or 100.
At this point, you'll also need to add a reference to the stored procedure to your database project in VS. Put the .sqlproj into a text editor, add the reference (there will be lots of examples to copy; it should be easy), save, and build the project to make sure you got it right. git add, commit, and push!
This only works if the schema of your local DB matches what is in the VS project. If you want to copy something from a database with a different schema, I think you're stuck copy-pasting.
AFAIK, there is no way to automate this, but I would love to be corrected about that. It would save me so much time at work. :)

Can I automatically generate Select queries on Visual Studio similar to what SQL server management studio does?

I had SQL server management studio on my computer and I used to explore my company's database using it. When building queries it was very easy to right click on a table and 'select top 1000' rows. I would take that code then and modify it. This will save me time typing all field names for example.
Now I have MS Visual Studio and I can't install the Server Management Express. I can explore the database and I can right click on a table and view the records. However, I am not able to generate the select query automatically. How can I create these queries automatically and is there a way to visually design my sql query?
On Visual Studio, if you go tools -> Server Explorer and add a DB Connection, then you can mimic the management studio option to generate sql from db objects...

exporting data in sql server 2012

i am trying to export data from the database I created in SQL Server 2012 so that I may take it to school and copy it all over to the main server there. I was shown how to do it on campus in the computer lab but whenever I right click the table and go for Tasks>Export There is not an option for Tasks. I also couldn't just generate the script I had to Right click table, Script Table as>Create to>New Query. Any suggestions?
Right-click at the database node in SSMS Object Explorer (you're probably right-clicking a table node which wouldn't have "Export") (I assume you're talking about SQL Server Management Studio)
Here's a screenshot (Microsoft SQL Server Management Studio 10.0.2531.0):
Rightclick on database->click attack-> selct your database...
Make sure that data base backup should be make from that system... then only it will work.. if you copy from other sysytem means it wont work..

Changing column properties in SQL Server database in SQL Server Management Studio

When I want to change column properties of an existing table in an SQL Server Express 2008 R2 database via the SQL Server Management Studio Express - it doesn't let me.
I can view the properties but they're all grayed out and I don't find anything to ungray it. I've just migrated from Access and I'm wondering whether this just isn't possible (there's already data in the table - I can however delete and create new columns) or whether I'm missing something.
Right click the table and choose "Design" instead of expanding the columns, right clicking the column and choosing "Properties".

Scripting tables from Sql 2008 Mgmt Studio

I use the Sql Server Mgmt Studio to script the creation of our database and all entities. Recently we migrated from SQL Server 2005 to SQL Server 2008 and I'm now using the 2008 version of Mgmt Studio.
I'm noticing some small but annoying differences in its scripting support that are making it really hard for me to diff my existing 2005 scripts with new ones created in 2008.
Some of the problems I'm encountering are the tables being ordered in some indeterminate order (not alphabetical), and extra linefeeds after every GO command.
Does anyone know how to make the 2008 version of Mgmt Studio script the same as the 2005 version?
An added note, I've found that if I use the multiselect feature of the Object Explorer Details window I can get consistent ordering of tables in the resulting script, but if I use the Generate Script wizard I do not. The wizard only seems to change the order when I make schema changes, but it makes diff'ing changes much harder. Surely others are seeing this problem?
If you go to Tools -> Options, open the "SQL Server Object Explorer" node and then select the "Scripting" node, there are several options to alter the way that scripts are generated, including "Script for server version" which can be set to "SQL Server 2005".

Resources