Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MS SQL Server & have generously sponsored dedicated servers and web hosting to ensure a reliable and scalable dedicated hosting solution for

Hide Database Names From Unauthroized Users In SSMS

If a user is not authorized to see a database canI exclude that database from even appearing inManagement Studio for that user



View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
Hide Database Structure From Users And Competitors

Is there any way to hide the database structure in SQL Server 2000, diagrams etc from my customers and potential competitors ?


View Replies !   View Related
Hide Users In DB2 From DB1 DBO
In a multi DB environment we have a desire to hide users from other DB dbo's.

ie. Marketing dbo is Mark
Sales dbo is Sally

When Sally uses EM, she sees Marks (marketing) logins. That means that if persistent she could guess Marks login's Passwords by brute force.

I want to simply disallow her from seeing other users not in her database.
I really want to hide the other DB's from her too!
She should only be seeing her DB on my Server! Not everyone elses.

Any suggestions. (Need to stick with SQL 7 for now.)


View Replies !   View Related
Copy Table Column Names From SSMS Object Browser To Use In A Query
I thought I saw this done once before. So today I hunted around inBooks OnLine and did a Google search. So far I have found nothingclose. So if you know how to do it, please tell me or if cannot bedone, I'd appreciate know that too.Thanks in advance,IanO

View Replies !   View Related
DTS Data Transform Task: How To Hide DB And Schema Names?
Hi All,

I'm stuck up with a strange problem.
When i try to setup a Transform Data task in DTS, the table drop down shows fully qualified table name.

i.e. <database name>.<schema name>.<table name>

as you can see in the attached screenshot. With this I cant see the full table name and am not able to make the correct selection.

Where can i change the properties so that it displays only the table name?


View Replies !   View Related
How Do I Hide Databases From External Users?
I am going to give user rights for an external user to connect to my SQL Server via Client Network Utility.

Atlough I have given user permissions to only access one database and not the whole list, how do I make sure that they cannot see all the other databases on my SQL Server?

I have 20 instances of databases on my SQL Server and ideally I would like to give 20 different people access - but each of them when they enter my SQL Server, should not even know that the other databases exist.


View Replies !   View Related
Hide System Tables From Users?
How can I hide the system tables (sys and INFORMATION_SCHEMA) from users? I am not talking about Management Studio. We have users who access the database with ODBC and I do not want them to see all these system tables.

I have created a Hide_System_Tables role and added users to it. I have tried denying all the permissions to this role, but they still see it. Oddly enough, in the INFORMATION_SCHEMA permissions, it shows access from grantors of INFORMATION_SCHEMA and dbo. I cannot deny permission for the entries with dbo as grantor.

Does anyone have any suggestions on where I have to go to remove all the places that give users access to these tables?


View Replies !   View Related
Hide System Tables From Users


Can someone help me to hide all system views/tables from users?
I do not want the users to seeall systemtables/views, so they can have a clear view for onlyuser tables in their schema.



View Replies !   View Related
Hide Fields Based On Users AD Member Ship
If I wanted to make a report that shows different fields, one being cost, but I only wanted certain people to see cost based on their AD groups, is there a way to hide this information?

Basically, domain/user1 belongs to AD purchasing group purchasing, he can see item, description and cost, where domain/user2 belongs to sales so he can only see item and description?

View Replies !   View Related
Setting Up Read-only Users. How To Hide Sys. Tables. SQL SERVER 2005
I need to set up1 new user in SQL Server 2005 to be able to read specific tables ina db (db1).

The user will connect from MS access using odbc links (SQL Native client ot SQL Server driver)

I've tried to set up one and once logged on from the user workstation, I can only see sys. tables and INFORMATION_SCHEMA tables.
None of the requireddb1 tables appear.

under Security/Logins I've created User1:
SQL Server auth. with password
default db = db1
server_roles = none
user mapping = map, db1, user1,dbo
securables = none
status = grant, enabled

on the access db, the odbc link was set up with default db = db1

Why can't I see any of the db1 tables?

How can I restrict access to the sys. tables?

Thank you

View Replies !   View Related
Retrieve Names Of Users From Sql Server
how to retrieve names of the users between start time and end time using stored procedure in sql server??

i have a table which stores user names along with other details.
can anybody tell me how to get the names of the users between start time and end time??

View Replies !   View Related
SQL 2005 LOGS Display Only Group Names How To Track Individual Users?
Trying to track the users who are logged in and making changes to my database. I have granted permission through the Windows Groups and the log displays the group names and not the user names. Is there something to set to display the user and the group?


View Replies !   View Related
Why Out Of The Blue Would VPN Users Be Unable To Connect To Database And Local Users Are Unaffected?
I have had this issue just pop up. I have local users who can connect fine, but my users that require connection by VPN cannot connect. I get the server not available or access denied error. I did confirm that the VPN'ers are connected to the network correctly and can see that their shares and mappings are correct. Any ideas? Thanking you all in advance!!

View Replies !   View Related
SSMS Error - Database Has No Owner
For unknown reason one of ourserver(SQL 2000 EE SP3) had database without owner. As a result SP_HELPDB gives error:

Msg 515, Level 16, State 2, Procedure sp_helpdb, Line 53Cannot insert the value NULL into column 'owner', table 'tempdb.dbo.#spdbdesc___________________________________________________________________________________________________________000100000018'; column does not allow nulls.

And when I tried to check options for this database in SSMS I received this error message:

TITLE: Microsoft SQL Server Management Studio
Cannot show requested dialog.
Cannot show requested dialog. (SqlMgmt)
Property Owner is not available for Database '[CPR]'. This property may not exist for this object, or may not be retrievable due to insufficient access rights. (Microsoft.SqlServer.Smo)

For help, click:

The situation can be reproduced by this script:

use master

select * from sysdatabases where name like 'Northwind'

exec sp_configure 'allow updates',1




update sysdatabases set sid= 0x10 where name like 'Northwind'

--Allow updates to the system tables

exec sp_configure 'allow updates',0





And fixed

Use Northwind

sp_changedbowner 'sa'

Just be advised and check that all databases at server has an owner:

select as [NoOwnerDatabase]

from sysdatabases DS FULL JOIN syslogins SL on DS.sid=SL.sid

where is not null and SL.SID is null

View Replies !   View Related
Database At 9.0.3152 But SSMS At 9.0.3042 - Problem?
I've got a SQL 2K5 installation that I have upgraded to 9.0.3152. In SSMS, I see the SQL Server instance showing with the correct version - 9.0.3152. But SSMS (Help->About) shows a version of 9.00.3042. Is this expected or should "Cumulative hotfix package (build 3152) for SQL Server 2005 Service Pack 2 is available" ( have upgraded all these to 3152, as well?


Microsoft SQL Server Management Studio9.00.3042.00
Microsoft Analysis Services Client Tools2005.090.3042.00
Microsoft Data Access Components (MDAC)2000.086.1830.00 (srv03_sp1_rtm.050324-1447)
Microsoft MSXML2.6 3.0 6.0
Microsoft Internet Explorer7.0.5730.11
Microsoft .NET Framework2.0.50727.42
Operating System5.2.3790

View Replies !   View Related
Hide Database Design

I wanted to see if Microsoft was going to address this problem

We as developers want to hide our database design (SQL Express DB)

We dont want to rely on the user rights settings to secure the design

Most of our clients have admin access which means that they can see the db design

We are happy for the design to be available on the server as change control should be given only on the server

I am perplexed how this hasnt been addressed

Your reply is appreciated


View Replies !   View Related
How Can I Hide Mssql Server System Database?
Dear All,

I m using mssql server 2005, wheni create a user account for mssql and thenuse this account to login via management studio. Itwill show all the systemdatabases and other client databases. How can i hide those databases and allowthe client to see theirown databases.



View Replies !   View Related
Restore Of Database Backup To Another Database Makes Users DBO
Anybody figure a way around this:

In a development server you take a backup and you want to move the entire database to a production server. The production server does not contain the database, users, or logins in master.

When you restore the backup to production in 7.0, the users get moved to DBO because the logins do not exist and then you cannot delete them.

We are having to drop the users from the database on development, back up the database and restore it to production, then recreate the users on production.

This is bogus and did not happen in 6.5 because of the aliases.

Anybody come up with a better way?

View Replies !   View Related
Sql Database Names?
just starting with sql server, thru the sql express edition, before i get to far wondering if it is ok to use the same database names, specifically the ASPNetDB.mdf in different web applications, or will this cause problems down the line,

ie will have different web site applications running on IIS and want to use the aspnet_regsl wizard,

also wondering if this has any implicaitons when publishing web application to web servers, are any of the local sql express server settings passed on to the web host provider, read about machine.config and if i understand i should put all the settings in the web.config file via the VS20005 ide.

also will it cause any problem inside the sql express magement console,

View Replies !   View Related
Spaces In SQL 7 Database Names
Hey all,

Hope I can get some help here.

Have a view that has to reference a table in another database on the same server. This isn't the problem. I am just using Databasename..tablename in the from statement. Get the results required in testing.

The problem is that in production the table name has a space character. i.e. 'accounting info' would be the table name. I have not been able to figure out the proper syntax to capture this properly to reference in the from statement.

I have tried enclosing the name in ' ', " ", [], (), {} and just about every combination I can come up with.

Any help in this would be great, and changing the databse name isn't an option at this time.


View Replies !   View Related
How To Get All Database Names Using A Sql Statment?

Which view I can use to get all database names in a sql server 2005 instance?


View Replies !   View Related
How To Get All Table Names From A Database?
I have two questions:

1. Which system table (data dictionary) I can select to get all table names in one database?

2. What sql command can I use to get a definition about a table?


View Replies !   View Related
After Replicating A Database, SP's In The Same Database Are Not Able To Modify By Other Users.
hi there,

After replicating a database, the stored procedures in that same database are not able to edit by other users than service account (sys admin users), When the normal users try to edit any of the stored procedures, sql server 2005 is throwing the following error...

Msg 21050, Level 16, State 1, Procedure sp_MSmerge_ddldispatcher, Line 12Only members of the sysadmin fixed server role or db_owner fixed database role can perform this operation. Contact an administrator with sufficient permissions to perform this operation.

any suggessions are most welcome.


View Replies !   View Related
Are Duplicate Instance Names A Problem If Physical Server Names Are Different?
If I restore the master database from ServerA to ServerB and start the SQL Server services on ServerA and ServerB, the master databases will be identical and running sp_helpserver and @@ServerName will indicate the SQL Server instance for both instances is ServerA. Is this ok considering the physical server names are different?

If this is ok, how does SQL Server advertise on the network who it is? Does it append the physical server name to the SQL Server instance name during network communications?

Thanks, Dave

View Replies !   View Related
Getting Table Names From AdventureWorks Database
I have ran into a problem when i'm getting table names in c#.
I have tried the sql command:
select name from sysobjects where type='U' order by name
So it returns the names without a problem. But when I try to access to some tables using their names (to retrieve the columns) I sometimes get the error "Invalid object name" following by the name of the table.
So I realized the if the table was not under dbo user then i would get this error.
for example: "select name from ContactCreditCard"
 gives me error because in database management tool it is shown like this: Sales.ContactCreditCard
How can i fix this problem? How to get that prefix of the tables?
Thank you,

View Replies !   View Related
Returning The Database Column Names
Hello, { Merry xmas to all few hours early but hey !! }

I'm trynig to create an application that will connect to any database that i specify and return the colums names within any table that i specify.

I have done the code that establishes the connection but im a bit stumped on how to get the colum names from a tabel and was wondering if anybody had any sourse code for this in VB.



ps: have a good new year !!

View Replies !   View Related
Non Hard Coding Of Database Names
Can anyone suggest a good way of setting database names within Stored Procs without hard coding them.

I have looked at two methods as follows:
Building / running dynamic SQL to get the DB name from a lookup table
Using Views for everything, just changing the DB name in the view

Both have shortfalls - any comments / advice?

View Replies !   View Related
Purging Deleted Database Names
When connecting to an SQL Server (v7 in this case) the log file shows that old and deleted databases are still being opened as part of the process. Further, these db names are now reserved and cannot be reused, even thought I've deleted them.

Is there any way I can purge all traces of these deleted db names?

You might have guessed, I'm a newbie, which is why there are a few dozen deleted DBs.

Thanks for any help

View Replies !   View Related
Returning Database Object Names
hey everyone, need some help

I have a query return all the names of the table in my database via this code:

SELECT MSysObjects.Name
FROM MSysObjects
WHERE (((Left([Name],4))<>"MSYS"));

I need to further refine the search fitting in the critera LIKE 'qry_tbl%' I dont know how to fit this in .. i tried fitting it in to the end, but nothing comes up.. I also tried querying the results of this query with another query :-P but that didnt work either .. any ideas?

In essence i need all the table names in my DB that start with 'qry_tbl' to be in a list for me..


This gives me all the names

View Replies !   View Related
Database Tables And User Names
We have recently copied a database from one machine to another. On the old machine, when we access the tables we do not need to use the username.tablename convention to query them. On the new box we do.

For example, to query a table called Page we would nee to do this on the new box.


unfortunately all the code is written, without the username prefix. Is there a way to not use the username prefix?

Thank you for your help...sorry for the newbie type question.

View Replies !   View Related
User Can View All Database Names
I create a user then I create a database and assign my newly created user as owner

When I login as this new user everything works fine BUT my newly created user can still see other database names even though he is not allowed to use them.

How can I prevent him from seeing other database names.

P.S. I use the GUI

Thank you

View Replies !   View Related
Restore Database To Different File Names
Hi SQL server experts,
I'm trying to restore from a backup file.
I need to restore the datafile and logfile to different names.
I modified the options page, changed the 'Restored As' file name.
I clicked on the General page and Clicked on the Options page again, the old values came back.
How do I handle this?
Thanks in advance.

View Replies !   View Related
How To Get The Database Names From The Sql Server 2005

ho w do i get all the database names from my local machine which are present in the sql sevrer 2005
i also need how do i get the names of all the tables,views,stored procedure names
in the particular database

View Replies !   View Related
Determine Table Names And Column Names At Runtime?

I was wondering if anyone has an idea of how we could find the table names and column names of the tables in our Sql server database at runtime/dynamically given our connection string? Please let me know.


View Replies !   View Related
Error With Names Like Georgia's Way While Inserting Into A Database
Hello All,i am trying to insert some values into a table in sql database. i keep getting error saying incorrect syntax near 'S'. i fired up my debugger and found that one of the row contains name like Georgia's way. i am getting error at the "S" in georgia's way. how can i fix that. here is my code for inserting the values in to the table SqlConnection mysqlcon = new SqlConnection(ConfigurationManager.ConnectionStrings["ImportexcelConnectionString"].ConnectionString); mysqlcon.Open(); foreach (DataRow dr1 in objDataSet.Tables[0].Rows) { String sqlinsert = String.Format("insert into Det values('{0}','{1}','{2}','{3}','{4}','{5}','{6}',{7},{8},'{9}','{10}','{11}','{12}')"
, dr1[0].ToString()
, dr1[1].ToString()
, dr1[2].ToString()
, dr1[3].ToString() -- this is the column where georgia's way is
, dr1[4].ToString()
, dr1[5].ToString()
, dr1[6].ToString()
, Convert.ToDecimal(dr1[7].ToString())
, Convert.ToDecimal(dr1[8].ToString())
, dr1[9].ToString()
, dr1[10].ToString()
, dr1[11].ToString()
, dr1[12].ToString());

new SqlCommand(sqlinsert, mysqlcon).ExecuteNonQuery(); LabelImport.Text = " Row Inserted"; } mysqlcon.Close();  can some please help me out.Thanks a lot 

View Replies !   View Related
Where Paramerter Names(data) Will Be Stored In Database MS SQL
 In Ms SQL server if we create a user defined stored procedure it will be stored in the SysObjects table.
 simillarly the paramerter are stored in other table which is that table.

View Replies !   View Related
Getting English Column Names Into A German Database
I'm currently implementing a German ERP system and I'm having aterrible time writing reports/SQL statements. The database is MS SQLServer 2000. I want to set permanant aliases for the columns that Ican use in SQL statements. Is this even possible? All of the researchI've done implies that you can only alias column names in the output ofa SQL statement.

View Replies !   View Related
Scheduled Report For Database Names And Sizes
Does anyone has a script which gives all databases names and thereallocated, used sizes in SQLserver2k. I want to schedule this to create adaily report.Thanks,Nasir

View Replies !   View Related
How Can I Find All Table Names Defined In A Database?
I have a database and I want to retrieve informations about all tables
defined in this database. In other words I need the table list defined in
database. Can you help me?

Thank you.

View Replies !   View Related
Compare Column Names From Two Tables In Same Database
I'm not a full-time DBA, so excuse my style of expressing my question.I have a database which has 2 tables in SQL 2005. Both these tables have similar column names, EXCEPT for new extra columns in FY2007_DATA. I can visually see the difference in columns in Database Diagrams. My goal is to :- I want to compare FY2007 tbl column names to FY2006 column names and display only those columns as results that do not match.Tbl 1 :- FY2006_DATA Tbl 2:-


With online reading and help I have managed to get this script to do exactly opposite of what i want. Below is the query

/* This query compares the column names from two tables and displays the ones that have an exact match. It does not care for case-sensitiveness */

Selecta.Table_Name, a.Column_Name, (b.Table_Name), (b.column_name)
From[2006-2011].INFORMATION_SCHEMA.Columns AS a
Join [2006-2011].INFORMATION_SCHEMA.Columns AS b on a.Column_Name = b.Column_Name
Where a.TABLE_NAME = 'FY2006_DATA'
And b.TABLE_NAME = 'FY2007_DATA'
AND a.Column_NameIN
(Select Column_Name = LEFT(c.column_name, 20) FROM
[H1B_2006-2011].INFORMATION_SCHEMA.Columns AS c WHERE c.TABLE_NAME = 'FY2007_DATA' )

When I change "AND a.Column_NameIN.." to "AND a.Column_NameNOT IN.." so that the results will (should) display the extra columns in FY2007, in fact I do not see any results, but query executes perfect.

How can I achieve my goal.?

Thank you

View Replies !   View Related
How To Get The List Of Table Names In A SQL2005 Database
How to get the list of table names in a SQL2005 database?

View Replies !   View Related
List Table Names In A Database Having A Particular Column.
Can anybody tell me how to find out whether a particular column exists in any of the tables of a database and if it does, display the table names?


View Replies !   View Related
SQL 2005 Database Design (Table Names)
In the past, we had table names such as:

Now with SQL 2005, you can use schema namespaces, so it could become:

So essentially you can use exactly the SAME table names, in different schemas.

So... would you recommend to change to the last model, or just stay with the old way?
What is best practice?

One of the reasons why I ask this question is that I looked at the AdventureWorks sample database included with SQL Server 2005, and Microsoft is using:


Why not:


View Replies !   View Related
Users Database
how can i create a users database to store users infos (names pictures...) ??
thx for taking time to read this

View Replies !   View Related
Difference Between &&"Database -- &&> Users&&" And &&"Security --&&> Users&&"
Hi Team,

In SQL Enterprise Manager, when we expand "Database -->Users", we see the

users there. When we expand "Security --> logins" we see the same users there.

Can you differentiate these two.



View Replies !   View Related
DB Mirroring: Different Server Names With Same Instance Names
I'm going to be setting up DB mirroring between two SQL Server 2005 boxes. Since these are on two different servers, can the instance names be the same? Is there any reason NOT to do so if the mirror server is going to be used exclusively for DB mirroring?

For example: if the my primary DB is located on SERVER1INSTANCE1, can the mirror be SERVER2INSTANCE1 or do the instance names have to be different even though they're on different boxes.


View Replies !   View Related
When To Use Fully Qualified Names ([database].[schema].object)
I wihsh to discuss whether to use fully qualified names:[database].[schema].objectof objects to operate (create, query..) on is good or not?If someone change order of sql code blocks in my script - this may causelose of it's context (like: use master / use <mydb>..). I wish to have mysript independed on changes like this and always produce correct result.Does using full name make use of 'use <db>' statement unnecessary?

View Replies !   View Related
Giving A Proc Database And Table Names As Parameters
Hello!Is it possible to pass a stored procedure a parameter, say @table anduse it as a table in the sql command?Finally i want a proc to copy tables from a database to another database.THERE IS MY CODE:CREATE PROCEDURE [user].[copytable]@dbSRC varchar(100),@dbTRGT varchar(100),@table varchar(100)ASBEGIN TRANSACTION FreeAndCopyTableTRUNCATE TABLE [@dbTRGT].admin.[@table]INSERT INTO [@dbTRGT].admin.[@table]SELECT *FROM [@dbSRC].admin.[@table]COMMIT TRANSACTION FreeAndCopyTableIF @@error <0 GOTO E_Copy_FailE_Copy_Fail:ROLLBACK TRANSACTION FreeAndCopyTableGOthanks in advance,muh

View Replies !   View Related
Create List Of Table Names And Size For A Database
Hi there,

I am trying to create a list of all the tables in one database and then list the size of each table. So for example I want to create a table with the table name and table size for one DB


Table1 1111KB
Table2 123300MB
Table3 120448KB

etc for all the tables in a particukar DB

I know there is a stored procedure to list the sizes: 'sp_spaceused' but not sure how to script all this together.

can anyone help please!!



View Replies !   View Related

Copyright 2005-08, All rights reserved