.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

SSMS 2008 - Is there a better way to display/group tables in multiple scheams under single database

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :

In SQL server 2008 we have 30 users schemas setup under a single database (say "UserDB")

Each user is set up with access to his/her own schema

So when you login to server and drill down to Databases >>UserDb >> Tables,  you will see the tables that belong to your schema


Now I have to give cross Schema access. User 1 wants to see User 2's schema tables.

User 1 tables shows up as user1.table1 and user 2 tables show up as user2.table2


Question is: Instead of listing ALL the tables, differentiated by prefix, is there a way to show them like windows folders.

View Complete Post

More Related Resource Links

merging multiple tables in a single dataset to single table


 i have a stored procedure which returns three tables to a dataset ..... now i need to merge all three tables to a single table from d same dataset 

like dataset1 has table1 table2 and table3 .... i want all the three tabels to be merged into dataset1 itself .... instead of three diffrent tables so that i can show all three table data in a single datagrid  as a compact data and combination of 3 tables from d single dataset.....

can some1 help me please.....

SQL database display in visual studio 2008 express?

I jsut installed SQL server and management studio on my PC. For management studio, I created a database with tables. However, When I have data connection for SQL server in visual studio express, I couldn' t see the database I created. Any recommendations?   Xinguo  


the database result is as follows DATE     code   class1 class2  class3 1/8/10     M1     10       20     30     3/8/10     V2      20       30     10      1/8/10      H1      1           2      3         7/8/10     ! ! 8/8/10     !M2    5      5      5       3/8/10     B2      4      4     4       1/8/10     V1      3      7     3       THE OUTPUT SHOULD BE AS FOLLOWS:- DATE           M1                          M2           

Missing Database Node using SSMS 2008 Express

Hello,It works perfectly the first time I install SSMS 2008 Express and I can access my remote database. But, after I restart my machine and open an instance of SSMS the database node is missing.Before:After: I tried refreshing the database folder but still nothing. I even uninstall but it's still the same.Thank You for your help,-imperialx

Missing Database Node in SSMS 2008 Express

Hello, It works perfectly the first time I install SSMS 2008 Express and I can access my remote database. But, after I restart my machine and open an instance of SSMS and login back, the database node is missing. I have asked this question over at asp.net forums with images (http://forums.asp.net/t/1600718.aspx).   Thanks, -imperialx

Database diagram failur - Invalid class string SSMS 2008

Hi There -  Help needed In SSMS 2008 (not express) the Database Diagram  cast the exeption "Invalid Class String" (MS Visual Database Tools). Why is this happening. I have used the diagram designer before succesfully My OS W7 - SqlServer 2008 - every thing updated  - every service pack installed I have tryed reinstall seceral times - not positiv What is going on - It had been working (1 month ago) Please help Freddy

how to display multiple calendar list data in single calendar view

Hi, Normally, we can used to extend the ListViewWebPart's ViewType property to display a particular calendar list items in Calendar View in our custom webpart. Is it any way to display multiple calendar list data in a single calendar view ?? or please provide some pointers related to this issue. Any help is much appreciated.    

Error while connecting to Database Engine within SSMS 2008

Error text is as below:- any suggestions ?   ===================================   Cannot connect to TEJ-PC.   ===================================   A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)   ------------------------------ For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476   ------------------------------ Error Number: 2 Severity: 20 State: 0     ------------------------------ Program Location:      at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)    at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject)    at System.Data.SqlClient.SqlInternalC

SQL Management Studio 2008, does not display tables with specific permissions


Prev Reference Question: http://social.msdn.microsoft.com/Forums/en-US/sqltools/thread/a6166b82-1e1a-4771-952d-a7b54e0b0f23?prof=required

I see the same problem with SQL 2008 Management Studio. I have different schema defined in my database, all the schema permissions work just fine in SQL 2005 but when viewed from SQL 2008. I cannot see tables for which i have given inidividual permissions. I have given SELECT permissions for those tables.

for example.

schema: dbo, schema1, schema2 ....

user: user1 (schema1 owner), user2 (schema2 owner), user3 ...

now i have given SELECT on schema1.table1 to user2

this works fine and i m able to see the schema1.table1 when login as user2 in SQL2005. I have tried your solution for giving "View Definition" permission as well. But this doesnt work in my case.

Seems to be some default permission settings with SQL 2008 ??

Any help/Suggestion will be appreciated

SQL Server 2008: When creating database with filestream group pc hangs


I am facing this STRANGE problem with sql server 2008. When I try to create a new database with filestream group my system hangs. When I restart pc by direct power off and then on, I cannot see the new database but at the given location I could see that database files and filestream group has been created. 

Solutions Tried.
Uninstall, download new version then reinstall but to no use.
Set maximum permissions to current user (according to my knowledge).
Using Mix mode authentication.

PC configuraion:
XP Home Edition SP2,
Intel Dual Core 2.0 GHZ Processor
4GB Ram,
SQL Server express SP1 installed on NTFS Partition
Plenty of Disk Space
Comodo Firewall pro, Avast Antivirus ( Already tried to stop firewall and antivirus still no use)

Any help would be appreciated.

How to return looped procedure results so that they display as multiple rows of a single output inst


I understand that the below fragment will return a separate 1-row results set for each successful loop (also unnecessarily repeating the column header each time). How can I alter my procedure so that each value returned by the loop is appended underneath the previous value as multiple rows of a single results set? Do I have to store each return value in a temp table or someother storage object? It would be nice to just be able to spit them out row by row as each loop returned. Possible? Easy? Hard? I really appreciate the help I've received here so far.

SELECT (whatever)

OPEN techCursor;
FETCH NEXT FROM techCursor INTO @techNumLoop;
EXECUTE pr_FindExpenses4Tech @techNumLoop, @itemCount OUTPUT
SELECT @itemCount Item_Count

Insert/Update data to multiple tables on a single button click


Hi experts,

I need to insert/update data to 3 or more tables on a single button click.What is best method for achieving this?I am using mysql as my DB.

Thanks for your valuable reply in advance.

Microsoft SQL Server Management Studio 2008 does not list all tables in database

When logging into SSMS 2008 to a SQL2008 database when I expand the tables in a database I only see a few tables listed.  I can login to the same instance with SSMS 2005 and all of the tables are there.  Is there a reason why this is this way?

I can do a select * from in a query window for any of the tables in the database via SSMS 2008 as well and it work fine.  It just does not display the tables.

Choosing Between SQL 2008 R2 on single-partition or multiple-partition SAN Storage



I'm trying to design a storage plan for a new SQL Server 2008 R2 Data Warehouse under Hyper-V, initially at least I'm having to use an existing SAN that wasn't built with SQL in mind and (for now) can't be reconfigured.  I'm going to be getting 2TB of storage that's carved out of one single giant array of disks on the SAN (not sure of the RAID level but again, we can't change that), the space would be carved-up on the SAN and presented to the host as separate logical drives (i.e. not VHDs). 

Unfortunately this means that I can't do the usual thing of isolating TempDB, Transaction Logs and Data Files on physically separate spindles.  My plan (roughly speaking) was going to be to separate as follows:

  • TempDB: 32GB
  • Staging Area: 96GB (text files and some databases)
  • Transaction Logs: 256GB
  • User DB Partition 1: 512GB
  • User DB Partition 2: 512GB
  • User DB Partition 3: 512GB

Thus, my question is - in this scenario is there any benefit in separating the files at all?  Given that the data could be sourced from the same spindles there's not a great deal I can do about it from a performance level. 

Also, on a side note - even if there aren't any performance benefits, would this be a suitable storage plan to use if I were to later migrate to a different SAN?&n

read 3 Three tables and display correspond value on a single grid


I have 3 tables in single database with different strctures,3 tables have unique column(partno or Jobno) , on web form search button input control(textbox) and grid view.I am pulling the data based on column jobno from single table on to grid view using following code

 VB.Net Code

Protected Sub btnSearch_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnSearch.Click
            Dim connectionString As String = "Database=Job;" & "Data Source=localhost;" & "User Id=root;Password=XXX"
            Dim query As String = "SELECT * FROM ship where PacklistNo='" + txtSearch.Text + "'"
            Dim connection As New MySqlConnection(connectionString)
            Dim da As New MySqlDataAdapter(query, connection)
            Dim ds As New DataSet()
            If da.Fill(ds) Then
                dgResults.DataSource = ds.Tables(0)
            End If
        Catch ex As Exception
        End Try
    End Sub
If user types Jobno-123 click on search button it should read all the 3 tables in a database and display corresponding value on grid 

Can't SSRS 2008 handle stored procedures which return multiple tables?


I tried it and it only returns the first table.

Any suggestion?

Thank you,


T-SQL for database size and space available (like on Database Properties page on SQL 2008 SSMS)


How can i (using T-SQL) get the database size and free space like the database properties page of SQL 2008 SSMS shows? I want to be able to display that information in our software.


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend