Prevent Other Users From Changing Data Of A Table
hi..
How do i prevent other users from changing the data of my tables? Means one can change data using only my login rest others cannot even DBA or also from server administrator
View Complete Forum Thread with Replies
Related Forum Messages:
How To Prevent Domain Admin Users From Accessing SQL 2000 Databases?
Based on our database infrastructure, we need to secure our SQL databases. The security issue concerns on allowing a limited number of Domain Admin users to access the SQL databases. We tried certain ways, based on the documents in the Microsoft web site, but we couldn€™t reach to the point of preventing the Domain Admin users accessing the SQL databases. Thanks in advance.
View Replies !
How To Prevent Users From Logging To DB During Its &"maintenance&"
I am really a DB admin beginner, so hopefully it'll be easy for you to answer my simple question: How can I temporarily prevent users (except "sa") from logging to database(s) or better to DB Server while there are applied scripts on them ? I have already tried TCP/IP port changing, hiding server, running a single user mode but the reult was very poor. Please note that "sa" has to be able to connect to DB Server from a third party application but other users not. Any idea and/or a known solution ? Thanx in advance for your hints BTW - MS SQL 2000 SP3a
View Replies !
How To Fire A Trigger Without Changing Table Data
I have tables that I want to fire either an update or insert trigger on.I could write a script containing a long list of inserts but I'm looking forsomething simpler. Would isql work? Any special conditions to get it towork?I've tried tricks like 'update x set col = col' or 'update x set col = col +'' 'All the alternatives seem to have problems. Any ideas?----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups----= East and West-Coast Server Farms - Total Privacy via Encryption =----
View Replies !
Changing From Users To Roles
Guys, I have 2 users emp_rw (read write) and emp_ro in the database through which application accesses the database. Now I would like to replace this users with roles and assign emp_rw, emp_ro to roles. Which roles should be created - database roles or application roles what is the difference between application and database roles. currently I execute the below statement to grant rights on database objects to emp and emp_ro users, can this be changed to grant rights to role instead of user. grant execute on <function name, procedure name> to emp_ro Any suggestions and inputs would help. Thanks
View Replies !
Archive Data Instead Of Deleting It To Prevent 4GB Data Limit
We are running SQL Server 2005 express on Windows 2003. The database server gets significant amounts of data. Because of the 4GB data limit we have a daily cron task which goes through and deletes data older then 90 days. We would like a way to archive this data instead of deleting it. Is there any way to take data and compress it and store it in a different way, so that if needed, customers can query directly out from the compressed data? Cleary querying from compressed would be slower but that is ok. Any other solutions that would allow us to archive data instead of deleting it? Thanks.
View Replies !
Prevent Duplicate Entries In A Table
I have an ASP.Net Web appplication with a Back-End SQL DB. There are 3 Tables; Users, Groups, and GroupMember. The GroupMember table is used to link Users to Groups and consists of just two fields; userID and GroupID. Here is a sample of some data: User1 Group1 User1 Group2 User2 Group2 User3 Group1 User3 Group3 Users can belong to multiple Groups. However, you shouldn't be able to have the same user and group comobination more than once. for example: User1 Group1 User2 Group2 User1 Group1 I can stop this kind of duplicate data entry by doing a lookup first (using asp.net) to see if the entry already exists but this seems cumbersome. Is there a simpler way to prevent duplicate entries in a table using sql? Thanks a lot, Chris
View Replies !
How To Prevent Doublicate Entry To A Table
hi, If I have a table which contains customer names. I want to have some kind of process to validate any new insert record into the customer table. so if the inserted new customer already exist in the table I will get a message that say " Sorry , this customer name is already in the system " .... how can I do that, I am using sql server 2000. thanks Ali
View Replies !
Prevent Data Being Inserted Twice
I have a table with 3 columns: ID, Status, DateTime. I created a stored procedure to insert a staus value for each ID. This will run every hour. The DateTime stores the time, date when the Status was inserted. If the procedure was to be run a second time in hour window I do not want any Status to be inserted. Note: that I cannot rely on the procedure being run at exactly the right time - if it was scheduled to run on the hour (i.e at 1:00, 2:00, 3 :00 etc) but didn't run until 1:20 it sould still be able to run at 2:00. Does anyone know if there is anyway I can gaurd against this?
View Replies !
How Can I Prevent From Inserting Duplicate Data?
I have a table storing only 2 FKs, let's say PID, MID Is there any way that I can check distinct data before row is added to this table? For example, current data is PID MID------------100 2001100 2005101 3002102 1009102 7523102 2449 If my query is about to insert PID 100, MID 2001, since it's existing data, i don't want to add it. Can I use trigger to solve this issue? Thanks.
View Replies !
How To Prevent Table-locking With Multiple Queue Readers
In a situation where messages are coming in faster than they can be processed, at what point will service broker start up another queue_reader? Also, how do you prevent table locking if part of the processing of that message involves inserting or updating data in a table? We are experiencing this problem because of the high number of messages coming through, and I'm not sure what the best solution is - does service broker have some built-in support for preventing contention on a table when multiple readers are running? Or maybe a pattern that can be used to get around it?
View Replies !
How To Prevent DBA From Getting Confidential Data Stored In SQL Server?
Suppose I have a database storing some confidential information, such as legal information, medical or financial records, etc., and a Web site with a membership system so that only authorized users can view the information. I understand I can encrypt the information, and the user's passwords, so that if the database is compromised it still shouldn't be possible for an outsider to view the confidential information. However, what about people who have legitimate access to the database, such as the DBA, Web developer, etc., but who should not be able to view the confidential information? For example, even though the user's password was encrypted, what would stop the DBA from replacing the user's password with his own (encrypted) password, then logging in and viewing the user's info, then copying back the original encrypted password? Or, adding a new user for himself with whatever permissions he chooses?
View Replies !
Does Db_denydatawriter Prevent Procs From Updating Data?
If a user is a member of a role which would allow him to execute a proc which updates a table, and he is then granted db_denydatawriter , can he still update the table through the proc? SS2000 SP4. Thanks, michael Since posting this I tested the scenario and YES! The user was still able to execute an update proc even though the user excuting the proc was granted db_denydatawriter.
View Replies !
Stored Procs: How To Prevent Return Of Uneccesary Data?
Hi, I have a stored procedure that looks like this:...WHILE @@FETCH_STATUS = 0BEGINDECLARE @MyCount int ; EXEC spLoanQuestionnaireCriteria @AuditSelectedLoanID, @Criteria, @MyCount OUTPUTEND ...SELECT * FROM #Categories... Executing this stored procedure will return me 1 table for each time the EXEC statement is called that only has on column (MyCount)I really don't need this data to be returned, it is only used for some internal calculations in the stored procedureThe stored procedure should only return the results from SELECT * FROM #Categories in 1 table.Is there a Keyword I can use to exclude the EXEC results being returned to the dataset? Thanks in advance,Andre
View Replies !
How To Prevent System Form Locking A Table In Case Of Large Insertion
Hi, I found out that executing the procedure SP_INDEXOPTION and setting 'AllowRowLocks' to false i can prevent the sql server from locking rows in a table and 'AllowPageLocks' prevents from pages being locked. I need to preform same operation in case of tables. I need to perform insertion operations concurrently and acquire required locks manually. Is there a way to stop sqlserver from acquiring locks on the table. I need to disable all the locks (row, page and table). Thank you in advance.
View Replies !
How To Prevent System Administrator To View And Edit A Database Structure And Data
I represent a software development house and we have developed a client server system based on SQL Server. Most of our customers have already purchased Enterprise License of SQL Server, therefore they own the SA Login and Password. We are bound to attach our Database with their Server on their machine. My question is how can we stop a System Administrator of SQL Server to view our Database Structure, Queries, Data installed on their SQL Server on their machine. Our database structure is a trade secret and we cant reveal the structure to the client. please answer this question by email to me at farhandotcom@gmail.com Thanks & Regards Farhan
View Replies !
Changing Data Source Programatically Does Not Transfer Data
I have created a SSIS package that transfer data from a Foxpro database to an instance of SQL Server 2005 Express. I used the wizard to create the package but I load and execute the package within a custom application that I have written in C#. The way the custom application is intended to work is that the user can have the database in any location on the computer and all he has to do is specify the location then the application programatically changes the location of the source on the package that it has loaded and then execute it. When I initially run the package the first time (using the original path), it works fine and transfers the data. However, every subsequent time I run the application and specify a different path, the database on the SQL Server side gets created as expected but the data is not transfered! Where am I going wrong? Do I need to save the package after I modify the source then reload and run it again or do i need to change something else in the Data Flow to make this work?
View Replies !
Data Unexpectedly Changing In Data Flow Task
I have a fairly simple data flow task that loads data from one table (OLE DB Source) into another table (OLE DB Destination). The data type for one of the pairs of columns is nVarChar(120) and it contains version information that looks like a decimal. When I run the export, the destination has a trailing zero added after the decimal point as if it were a numeric column which invalidates our comparisons (string 1.0 is not the same as string 1.00). There is no cast or convert done to this column, it is a straight copy. Any ideas what could be causing this or how to fix?
View Replies !
Locking Users Out Of Table
SQL Server 2000, MSDE 2000I have a procedure in my application that I would like only one user at atime to be able to run. Is there a TSQL command I can run that willesentially lock a set of tables so others cannot access the table until theuser is done with the procedure or until the user disconnects from thatsession (in case of a hung app, I would like to lock released)TIA--Tim Morrison--------------------------------------------------------------------------------Vehicle Web Studio - The easiest way to create and maintain your vehiclerelated website.http://www.vehiclewebstudio.com
View Replies !
Log Users Querying Table
We have been asked to keep a log of users querying a particular table. User's can query any odbc compliant tool, not just one application. Can we do this w/ sql server 7?
View Replies !
Changing SP With The Changes In The Table
Hi All, If the column names are changed , is there are a easy way to change the referred columns in the SP's. What I am doing is going into each SP and replace the old name with the new name. Thank you for any help on this. Necessity is the mother of all inventions!
View Replies !
Many Users...all With Different Data
Just started looking at SQL Server Replication today. Just need to be shoved in the right direction...I have a 1000 users, and each need to have only their personal data replicated to them....So, is this possible, do I create a 1000 "articles" or do I create one article and somehow pass in a parameter?
View Replies !
Updating A Users Table In SQL Server
Hello all, I am relatively new to this platform and am trying to update a table of user information and passwords through a series of SQL commands. We import a new file of users every two hours and I would like to have three SQL statements: - One to add new users not currently in Users table - One to delete users no longer in our source file - One to update every field (but one or two) for already existing users. Any help on creating the SQL (as well as where to store it and how to automate it) is greatly appreciated! Thanks!
View Replies !
How To Store Users Logs In A Table
Hello, In my co-operation we have a database.What I am trying to do is; I want to store all the logs of the users.For example, if a user makes a change on the database I want to store what kind of change does he/she makes.Is it possible to store log infos of users?How can I do that? Thanks, Bugra KORKMAZ
View Replies !
Referencing A Users Table For History
I've recently finished an application for a small company with perhaps two hundred employees. Each employee was set up in a Users table in the database, against which application logins were processed. For just about every other table in the database, other than pure lookup tables, we created columns to indicate the user who created the entry, and the user who last modified the entry. This was done using FK references back to the Users table. Each table contains two references back to the Users table, and there are over 150 tables now that follow this scheme. At first I was not concerned, other than the fact that it makes a visual picture of the data model look very confusing (almost every table has a pair of links back to the Users table), until I encountered an issue where I could no longer delete from the Users table. Upon surpassing 253 FK references to Users, I can no longer delete users, as the Query Optimizer can't complete the query. Now, all of that so far is really not a big deal. Deleting users was never my intent anyway. The only real question I have is whether this is the standard way of maintaining history for table records. Have others used this method? Is there a better way?
View Replies !
How To Create A Script For Table Changes For Users
We are converting our application to SQL Server and have multiple installations. As we send updates to our users in the future, what is the best way to update their SQL Table structures without them losing data? Is there a recommended utility I can use to generate the necessary scripts automatically? Any references to walkthroughs,papers, utilities or examples are appreciated!
View Replies !
Changing Table Owner
Hi- apologies for asking a stupid newbie question, but I'm really stuck atthe moment. I need to change table ownership.I've got an asp script which is looking for a table owned by the dbo role,however the table was created under a different ownership. I understand theproblem, and almost understand the solution, but I can't seem to get all theway.THE PROBLEM (using [server].[database].[owner].[table])[mgbsvr1].[dnn].[dnnadmin].[aspsearch]needs to be[mgbsvr1].[dnn].[dbo].[aspsearch]I looked up the books online and found this syntax:sp_changeobjectowner [ @objname = ] 'object' , [ @newowner = ] 'owner'But I can't see how to use it, nor more importantly, where I should use it.It won't work in the query tool in Enterprise Manager. If I need to create ascript (which I've never done before), how do I execute the script?All help deeply appreciatedManning, Sydney
View Replies !
Changing Column Name On A Table
Hi All,I am trying to change column name on an existing table. I am using SQLServer 7.As the table is quite big, it is taking quite long time to do it.By the way I could change the column name only through the EnterprizeManager.Is it possible to change the column name using SQL script?Why the change of column name will depend on the size of the table?Thanks for your answer.-Mokles
View Replies !
Changing Table Format
Hi there, Its probably easier to draw this problem than describe it, so here goes: I have a sales forecast table (A,B,C are products [PRODUCT], the dates refer to the month for which the forecast is [FORECAST_DATE], and the integer is the forecast sales qty [FORECAST_QTY]) A 01/03/2004 30 B 01/03/2004 28 C 01/03/2004 24 A 01/04/2004 11 B 01/04/2004 09 C 01/04/2004 41 I need to convert the table into a more sensible format, like this: (NB ...Dots are just there to help with formatting - basically I'm talking about a field for FORECAST_03_2004, FORECAST_04_2004 etc etc) ........ 01/03/2004....01/04/2004 A..........30..................11 B..........28..................09 C..........24..................41 I'm really no t-SQL guru, and I can't seem to get any joy out of BOL. It must only be a tiny bit of code. Can anyone help? Thanks very much Sam
View Replies !
Changing Table Filegroups
I want to change the filegroup of a table. While we can do this in enterprise mgr, I would like to accomplish this in transact sql. We have a new configuration where the filegroups are located on different disks and to take advantage of that, I want to move the heavily accessed tables onto different groups. Example: table emp needs to be moved from filegroup Primary to file group Secondary. please help...
View Replies !
Changing Table Selections
Hello, I created a package using the import/export wizard in SSIS, that loads data from one database to the other. I am trying to find out how I can add and remove the tables that were originally selected when the package was created. I opened the package in BIDS, and I could not find that particular option. I know you can do this in 2000/DTS... Any help would be appreciated... Thank you, David
View Replies !
Allocating Rows In A Table To Multiple Users
Dear all In our organization there is a call center where operators entry call details and custormer qruery in a table using front end application. For these queries there are multiple no of executive who will reply the query using a front end application. using the application the exectives retrive specific no of records from call center table(if there are unreplied call exists) and reply them. When a excutive retrives specfic no of rows, i want to update a flag in that rows, so that others do not get them. I use the following procedure which is creating dead lock when multiple users execute it simultaneously create procedure get_from_maintab @cnt int as declare @slno int,@curcnt int select @curcnt=1 set rowcount 1 while @curcnt<=@cnt begin begin tran select @slno=serial_no from maintab where getflag='' if @@rowcount=0 begin rollback return end update maintab set getflag='Y' where serial_no=@slno and getflag='' if @@rowcount = 0 begin rollback return end insert into detab select fld1,fld2,fld3 from maintab where serial_no=@slno if @@rowcount = 0 begin rollback return end commit tran select @curcnt=@curcnt+1 end set rowcount 0 return
View Replies !
How To Send Email Automatically To Users From Table?
Hi, First of all I want to apologize if I am in the wrong forum. I am new to SQL Server. I have a table with a field containing email address from user input. Is there a build-in function or script in SQL Server 2005 that I can send a template of a email message to users? If not in what way can I acheive this? Thanks for all your reply.
View Replies !
How To Handle Users Hits To Single Table
Hello friends I am new to SQL database design.I am having a table name customerletter_master in which all details of customer letters are saved.At a time i.e in single second around 200- 400 entry are made in customerletter_master table. Hits to customerletter_master table are more. Following fields are used in customerletter_master – CID (autogen number), letterno(primary key),consignee, consignor, letterstatus1, letterstatus2, letterstatus3, POD, and some more fields. When letter passes to different stages letterstatus1 is filled to yes and then letterstatus2 and letterstatus3 are filled according to passage of letter. And at same time many user can accesses the customerletter_master table to search any letter according to letterno. Therefore customerletter_master is used to enter data and to search data at same time and there can be more than 200-400 users doing add and search records to and from customerletter_master how should i design this table. What should i use to enter and search record and minimize the table hits made by the user at same time. Should i use store procedures or any other method to add and search record. Plz help me out by giving some example.
View Replies !
Changing Data In SQL
First of all I am not familiar with SQL so bear with me.I have a field called stock_code, the data in that field, looks likethis000000851. I need to replace only the first two charachters '00' with'DR'.If I use the replace function, it will of course replace everyoccurance of 00 which I dont want.Apart from exporting the data out to excel and changing it thereThanksAlan
View Replies !
Changing Column Order In A Table
This subject has been posted several times, but I haven't seen a goodanswer.Problem:I want to change the order of the columns in a table using T-SQL only.Explanation:After running your code, I want to see the following table...CREATE TABLE [dbo].[TableName] ([First_Column] [int] NULL ,[Second_Column] [varchar] (20) NULL) ON [PRIMARY]look like this...CREATE TABLE [dbo].[TableName] ([Second_Column] [varchar] (20) NULL ,[First_Column] [int] NULL) ON [PRIMARY]Limitations:Don't post if your post would fall in the following categories:1. If you don't think it can be done2. If you think Enterprise Manager is the only way to do this3. If you think I should just change the order of my Selectstatements4. If you want to state that order column doesn't matter in arelational database5. If you want to ask me why I want to do thisWish:Hopefully the answer WON'T involve creating a brand new table, movingthe data from old to new, dropping the old table, then renaming thenew table to the old name. Yes, I can do that. The table I'm workingwith is extremely huge -- I don't want to do the data juggling.Thanks in advance!
View Replies !
|