Is It Possible To Prevent Databases From Being Copied?

Mar 16, 2007

Hi,

We have a point of sale application (C# .NET 2.0) and a Sql Server 2005 database back end.

Our customers are concerned that employees could create a backup of the SQL Server database (or even of the MDF file) and use it to steel customer data.

Very often, the application is running on a single PC in a shop using Sql Server Express Edition 2005 under Windows XP. The users usually log on as local administrator. It's hard for us to force our customers to change their local security policies.

Ideally, I would like some form of security mechanism that prevents a backup from being restored on to another PC without either a password or some other form of authentication.

Is this possible?

Regards,



Sigol.

View 4 Replies


ADVERTISEMENT

How To Prevent Displaying All Names Of Databases?

May 15, 2004

I get an issue, that is: Once i expand databases from SQL Enterprise Manager, it takes a long time to wait displaying all names of databases. How should i do to prevent displaying all names of databases?

View 7 Replies View Related

How To Prevent Domain Admin Users From Accessing SQL 2000 Databases?

Mar 6, 2008

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 5 Replies View Related

Different Results Same Query Between Original And Copied Db

Sep 29, 2005

Hi all,

I restored a backup of a database running SQL Server in W2K to my own laptop (Windows XP) for report testing pourposes. The restore worked perfectly, but when I ran the store procedure that returns my "report" set I noticed that several of the fields within the result set are different, the number of rows and customers are a perfect match to the production report. The fields that are different are calculated fields that invoque a user defined function, which again are exactly the same on both databases. I tried dropping the stored procedure and the 4 functions and recreating them again but I get the same results, the number of rows, the customers and all "non" function calculated fields are perfect, only the fields calculated with the functions are wrong.

Has anybody seen this behavior?

Thanks for your help

Luis Torres

View 4 Replies View Related

Attach Db File Copied Previously

Jul 20, 2005

I got a mdf file from my co-workerwho just stopped SQL server and delete ldf fileand give me a mdf file.if it was detached, it would work finebut it was just copied.Is there any way to attach this mdf file?I tried sp_attach_db and sp_attach_single_file_dband both failed.thanks,

View 4 Replies View Related

Copied Database Maintains Original Name In Backups

Mar 27, 2007

I made a copy of a database "sac_prod" and named the new copy "vgs_prod". Now, when I do a backup of the new database, it still shows the name of the original. Is there any way to change this so it will be the same as the new database name?Here is the BACKUP script:BACKUPdatabase vgs_prod TODISK='\sac-srvr1data$TechnicalSharedProductionSQLBackup LasVegasvgs_prod_CopyOnly.BAK' with COPY_ONLYHere is the messages I received from this BACKUP:Processed 1752 pages for database 'vgs_prod', file 'sac_prod' on file 1.Processed 6 pages for database 'vgs_prod', file 'sac_prod_log' on file 1.BACKUP DATABASE successfully processed 1758 pages in 0.412 seconds (34.955 MB/sec). I would like to change the file 'sac_prod' to be 'vgs_prod' in lines 1 and 2 just above. Thanks,

View 2 Replies View Related

One Table Is Ultra Slow At Being Copied, Others Are Fine

Jun 10, 2007

This is a really really odd problem.

Here's the situation. I've got a DB with several tables. Let's pick out two of those tables from the bunch.. they both have approx 2500 rows in them. I take one and duplicate it (right click, All Tasks->Export Data, copy tables, etc) and it duplicates just fine into another DB.

Now, the second table.. takes FOREVER. Yet it has the same amount of rows in it! And this is a flat table export.. I'm not including dependent objects or anything like that.

Not to mention this is slow, but when I use Red-Gate SQL Data Compare, it gets stuck when it hits this specific table.

Anyone have any idea what would cause this?

View 3 Replies View Related

SSIS Error With Duplicate IDs Of Copied Packages

Nov 30, 2006

Hi,

I recently encountered an error when I created several copies of one package.

It's always nearly the same package with small modifications. I call this packages from a parent package which is part of our datawarehouseing-framework.

The problem is, when copying a packages or using a packages as template the packages' IDs and Task's-IDs are the same. And this isn't only an issue concerning logging!! :

When the parent package calls one of the copied packages the first task is executed in every package parallely. Furthermore ... when I for example set a breakpoint on a data transformation task in one of the packages, the breakpoint is set in all packages on the same task! This is resulting in strange errors because the tasks-states and variable values seem to get mixed up.

Unfortunately there is only a possibility to change the package's ID, but the IDs of tasks are readonly!

One solution is, to create a new package and copy all the tasks to the new package which creates new IDs, but doing so, I have to manually recreate a long list of variables, all the configurations, all the connection-managers once again. Furthermore I loose the layout of tasks.

I found some posts about it here

http://groups.google.de/group/microsoft.public.sqlserver.dts/browse_thread/thread/6f85a31ea190608a/0eae312aa8440cf8?lnk=gst&q=pitfall&rnum=1&hl=de#0eae312aa8440cf8 or

http://groups.google.de/group/microsoft.public.sqlserver.dts/browse_thread/thread/760093d58bf6ccb5/32ced2f2020ef3f7?lnk=st&q=data+flow+task+id+copy&rnum=2&hl=de#32ced2f2020ef3f7

saying the issue will be fixed by SP2, but now I don't see any comment on it in the CTP of Service Pack 2.

Is there any solution to this problem or official roadmap about a fix from Microsoft??

Greetings Monte

View 11 Replies View Related

Backup Files In Append Mode To Be Copied.

Oct 18, 2007



Hi,

I have a database on sqlserver 2005.I usually take a full db backup and sequential transaction log backups and append each of the backups it to a backup file.Now if i want to copy my second transaction log file to a specific folder on my server.Do we have any procedure to do it.

Regards
Arvind L

View 3 Replies View Related

SQL 2012 :: Can See Last Copied Files In Log Shipping Monitor Reports As Well In Proc

Jan 30, 2015

At one of our client side a wired log shipping issues has come up.while monitoring those two server i noticed that although log-shipping report says both server are in sync, report displays information related to both backup and restore , it doesn't shows information related to copy that is when was last file copied and last file copy column is showed blank. Same is when i execute proc "sp_help_log_shipping_monitor" . I get same result ...

When i expand copy job history to analyse its what i found is although job has executed successfully , but in depth reading each steps says that no .trn file was copied .

My copy directory is at secondary server itself where .trn files are placed.And from this location itself files are begin restored.

SQL server and agent on both servers are run by same domain account ....

View 5 Replies View Related

Identity Field Settings Not Copied By Import Wizard (2005)

Feb 26, 2006

It appears that when you use the import/export wizard from within Microsoft SQL Server Managment Studio, the identity attributes of the table being copied are not transferred. For example, say the source table has a column

[ref] [int] IDENTITY ( 1 , 1 ) NOT NULL,

When the import wizard is done the destination table will have a column named ref, but will not be an identity column. The column definition will be

[ref] [int] NOT NULL,

instead. Is there a way to change this behavior somewhere in the gui? When doing the import, the only options seems to be 'Enable Identity Insert', but checking this does not affect the definition of the column.

-Eric

View 7 Replies View Related

SQLEXPRESS Backup File Losing NETWORK SERVICE User When Copied

Mar 11, 2008

I'm using the methods of the Microsoft.SqlServer.Management.Smo namespace within a .NET application to create a backup file from a SQLEXPRESS database. I can then restore the database from that backup device using methods in the same namespace. Here is a snippet from the restore code:


srv = New Server("MYPCSQLEXPRESS")

db = srv.Databases("washmaster")

Dim bdi As New BackupDeviceItem(BackupFileName, DeviceType.File)

Dim recoverymod As RecoveryModel

recoverymod = db.DatabaseOptions.RecoveryModel

rs.NoRecovery = False

rs.Devices.Add(bdi)

rs.Database = "washmaster"

rs.ReplaceDatabase = True

srv.KillAllProcesses("washmaster")

rs.SqlRestore(srv)


This works great as long as I used one of the backup files that I created directly on the disk. However, my application has a utility that allows the user to copy the backup files onto another drive, such as a CD or a thumb drive and when I try to restore from the copy of the backup, I get the following exception:

....Cannot open backup device..[filename]...Operating system error 5(Access is denied.)

The reason I get this error is that the "NETWORK SERVICE" account was removed from the file permissions when the file was copied.

How can I copy a backup to another drive and preserve the "NETWORK SERVICE" account? If I can't do that, is it wise to try to add the account back to the file before using it to restore or is there a better way?

Thanks,
SJonesy

View 3 Replies View Related

Integration Services :: SSIS Data Transfer Says Rows Copied But Count On Table Is Less?

Sep 18, 2015

I've a SSIS 2008  parent/child package solution to manage data transfers between two different data sources, so we can copy multiple tables and capture how many rows were transferred and duration for each transfer.  This solution was working fine up until last week, when I made some changes to allow the package to perform a source count using standard SQL determined by an expression, or SQL provided from configuration tables, I also changed the package to Truncate or not the destination table, again controlled by configuration settings in a table. The child packages which perform the data flows have not changed!

The day after the controlling package promotion to live, I saw the bizarre behaviour of the Package log stating all rows transferred, but the actual table counts were not what the log stated, see attached file. The package solution works ok on other servers and was ok in DEV, but there were less tables and rows transferred.Re-running the package gave the same errors, but on some of the same tables and some different ones. 

As it is the child packages doing the transfers and nothing has changed in them. I cannot see how the log would be able to say all rows are transferred and yet not all of the rows are actually moved?

Process output - where you can see counts and log Table transfer controller (as txt not dtsx)

An example of the data transfer child packages (as txt not dtsx)When I set the ExecuteOutOfProcess = True the package worked fine, unfortunately, this is not a good solution as SSIS 2008 does not tidy up the Dtshost.exe processes it starts and I'd be left with a memory issue after a very short time, we transfer hundreds of tables each day. ( I could write a .net script in the controlling package to kill the child processes, but that would still have hundreds of processes running before I could end them, as we have three parallel streams to allow a bit better performance.

View 6 Replies View Related

SQL Injection - How To Prevent It?

Jan 21, 2007

I am building my first ASP.Net app from scratch and while working on the DAL I came across the problem of SQL Injection. I searched on the web and read different articles but I am still unsure about the answer. My question is should I add
 
db.AddInParameter(dbCommand, "AvatarImageID", DbType.Int32, avatarImageID);
 
Add in Parameters to my C# code to avoid SQL Injection. What is the best practice. I am unclear if the stored procedure already helps me avoid SQl Injection or if I need the add in parameters in the C# methods to make it work. I need some help. Thanks, Newbie
 
My C# update method in the DAL (still working on the code)
 
private static bool Update(AvatarImageInfo avatarImage)
        {
            //Invoke a SQL command and return true if the update was successful.
            db.ExecuteNonQuery("syl_AvatarImageUpdate",
                avatarImage.AvatarImageID,
                avatarImage.DateAdded,
                avatarImage.ImageName,
                avatarImage.ImagePath,
                avatarImage.IsApproved);
 
            return true;
        }
 
 
I am using stored procedures to access the data in the database.
 
My update stored proc
 
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
 
ALTER PROCEDURE [dbo].[syl_AvatarImageUpdate]
      @AvatarImageID          int, 
      @DateAdded              datetime,  
      @ImageName              nvarchar(64),    
      @ImagePath              nvarchar(64),    
      @IsApproved             bit
AS
BEGIN
      -- SET NOCOUNT ON added to prevent extra result sets from
      -- interfering with SELECT statements.
      SET NOCOUNT ON;
      BEGIN TRY
            UPDATE      [syl_AvatarImages]
            SET
                        [DateAdded]       = @DateAdded,
                        [ImageName]       = @ImageName,
                        [ImagePath]       = @ImagePath,
                        [IsApproved]      = @IsApproved
            WHERE [AvatarImageID] = @AvatarImageID
            RETURN
      END TRY
      BEGIN CATCH
            --Execute LogError SP  
            EXECUTE [dbo].[syl_LogError];
            --Being in a Catch Block indicates failure.
            --Force RETURN to -1 for consistency (other return values are generated, such as -6).
            RETURN -1
      END CATCH
END

View 2 Replies View Related

Prevent Sql Job Failure.

May 21, 2008

Have a job that calls a DTS package, DTS is an Export & Import wizard to copy tables. Someone deleted a table from source and my job failed last night. Inputs appreaciated.

View 12 Replies View Related

Best Way To Prevent Deadlocks

May 29, 2008

I'm going thru my application log, and just seeing what errors are popping up. I have a relatively intense search feature, thats causing alot of deadlocks.

Exception type: SqlException
Exception message: Transaction (Process ID 105) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

In general, what's the best way to resolve this ?

Should I see if I can apply "WITH (NOLOCK)" to my data ?

Any suggestions are greatly appreciated !


thanks again!
mike123

View 4 Replies View Related

How To Prevent Db Deletion

Nov 22, 2006

Hi

I want to try and protect myself from my own stupidity. I have a number of sql databases, but one is LIVE. It is easy to drop tables but I want to set something (e.g. a password) which will help prevent me from dropping tables on the live database.

Any help/direction here would be appreciated.

View 8 Replies View Related

Prevent SP Compilation

Jul 20, 2005

Hi,I'm using SQL Server 2000 MSDE on a laptop running Windows XP.I have a couple of SP's that that quite some time to compile. So I waswondering: is there any way to have the database *not* recompile them everytime after a reboot?BOL says: "As a database is changed by such actions as adding indexes orchanging data in indexed columns, the original query plans used to accessits tables should be optimized again by recompiling them. This optimizationhappens automatically the first time a stored procedure is run afterMicrosoft® SQL ServerT 2000 is restarted."Now the SQL Server is restarted a lot, because laptops don't have endlessbatteries <g>Cheers,Bas

View 3 Replies View Related

Linking Tables From Different Databases Or Querying From Multiple Databases

Dec 10, 2007

Dear Readers,Is it possible, like in Access, to link to tables in other SQL databases that are on the same server? I have a query that I originally had in Access that queered from multiply databases. It did this by having those other tables in the other databases linked to the database that had the query. 
 

View 3 Replies View Related

Prevent Duplication On UPDATE

Apr 15, 2007

Hello
I noticed a spelling mistake in the data in a column of several tables, I used the following syntax to alter the spelling:
UPDATE [dbo].[Prod_Cat]     SET  [ProdName]=N'merseyside'    WHERE ProdName = 'mmserseyside'
The above code correctly updated the spelling error, but it also inserted a new row with the corrected data. 
So I found myself with two Identical rows containing the corrected information. I had to manually delete the extra row. Because if I had put in a DELETE statement, I would have then lost both rows.
What do I need to do to prevent this happening next time.  As I find that I need to update the names of some products, but I don't want to duplicate them.
Thanks
Lynn

View 3 Replies View Related

Prevent Duplicate Insert

Oct 18, 2007

How can I prevent duplicate inserts or entries to a table?
Thank you.
Note: I am using SQL Server and coding ASP.net pages in VB.

View 7 Replies View Related

What Are Sql Injection Attacks And How To Prevent?

Jan 24, 2004

this is a question I put in the sql community in microsoft, but havent be answered in full

------------

I am using dynamic sql to do a query with differents 'order' sentences and/or 'where' sentences depending on a variable I pass to the sp

ex:

create proc ex
@orden varchar(100)
@criterio varchar(100)

as
declare consulta varchar(4000)

set consulta=N'select pais from paises where '+@criterio' order by '+@orden

------------

I'd like to know it it uses 2 sp in the cache, as I read, the main sp and the query inside the variable of the dynamic sql. if so, as I imagine, then I suppose I have to do the main sp without any 'if' sentence to be the same sp, and so taking it from the cache and not recompile the sp

now, I have various 'if' sentences in the main sp (the caller of the dynamic sql) but I plan to remove them and do the 'if' by program -it is in asp.net-, so I suppose it is better because in this way the main sp is took from the cache, supposing this uses the cache different that the dynamic sql in the variable

what do u think? does the dynamic sql use 2 caches? if so, u think it is better to try to do the main sp same in all uses (no 'if' statements)?


-----

They told me this coding is not good (dynamic sql) because it can give control to the user?

I ask, how does it give control to use? what ar sql injection attack and how to prevent them?

I use dynamis sql because I have 150 queries to do, and thought dynamic sql is good

is it true that dynamic sql have to be recompiled in each execution? I suppose so only if the sql variable is different, right?

can u help me?

View 4 Replies View Related

How To Prevent SQL Injection Attacks

Apr 8, 2004

Hi,

On my site I have a simple textbox which is a keyword search, people type a keyword and then that looks in 3 colums of an SQL database and returns any matches

The code is basic i.e. SELECT * FROM Table WHERE Column1 LIKE %searcg%

There is no validation of what goes into the text box and I am worried about SQL injection, what can I do to minimize the risk

I have just tried the site and put in two single quotes as the search term, this crashed the script so I know I am vunerable.

Can anyone help, perhaps point me in the direction of furthur resources on the subject?

Thanks

Ben

View 3 Replies View Related

Prevent Duplicate Records

Jun 10, 2004

I have a web form that I use to insert data into a sql database. I want to know how to prevent inserting duplicate records into the database. Thanks.

View 6 Replies View Related

How Do I: Prevent Race Condition?

Mar 22, 2006

I want to be able to read and update a value in the database without entering a race condition.
For example:
User #1 reads a row from the database, changes a value then writes the value back.
User #2 reads the same row AFTER user #1 has read it, but BEFORE user #1 writes it back. User #2 then changes the value and writes it back, overwriting the value that user #1 wrote.
I thought I could do this with transactions, but it just makes user #2 wait until user #1 is done writing before user #2 can write. It doesn't stop user #2 from reading while user #1 has it out.
Does that make sense?

View 2 Replies View Related

How To Prevent Doublicate Name Entry

Feb 23, 2001

hi I have a table I need to have a process which prevent a user from entering a name value( company Name ) in a field. how can I do that .

Ahmed

View 2 Replies View Related

Prevent ODBC By USER/APP

Jun 20, 2003

Is there a way to monitor all ODBC connections to a MSSQL server and prevent a username/ODBC combination. My problem is that we have many frontends for viewing reports, but we managed them all and users are not allow to make their own connections. Some users now uses MSAccess over ODBC to draw their own reports - they have all the permissions as neededd by the other apps.

thanx

View 4 Replies View Related

Trigger To Prevent Duplicates

Aug 21, 2001

Hi all,

I'm writing a trigger to prevent duplicates. I know that this can be done through primary key or unique constraints but in the real world my uniqueness is defined by 8 columns which is too a big an index to maintain on the primary / unique key.

If I create a table with 2 columns

CREATE TABLE Table1
(CentreCHAR(10),
Month CHAR(3)
)


Then create a trigger to prevent duplicates

CREATE TRIGGER trigger_Check_Duplicates
ON Table1
FOR INSERT, UPDATE
AS
-- This trigger has been created to check that duplicate rows are not inserted into AudioVisual table.
DECLARE @IsDuplicate INTEGER
-- Check if row exists
SELECT @IsDuplicate = 1
FROM Inserted i, Table1 t
WHERE t.Centre = i.Centre
AND t.Month = i.Month
IF (@IsDuplicate = 1)
-- Display Error and then Rollback transaction
BEGIN
RAISERROR ('This row already exists in the table', 16, 1)
ROLLBACK TRANSACTION
END

Then insert a row into the new table (no other data is in there)

INSERT Table1
VALUES('0691040176','AUG')

I get the Trigger error message that the row already exists. Why is this the case? I though that Table 1 (target table) would show no entries as it has no data - it should be a before image of the table and the inserted table should be an after image.


Please help!!!


Thanks

Neill

View 1 Replies View Related

Prevent Trigger From Firing

Jan 13, 2004

Hi,

I have an update tigger on one of my tables.
I want to fire an Update SQL but somehow prevent trigger from firing.

Any Ideas..

View 5 Replies View Related

How To Prevent Displaying Names Of DB?

May 18, 2004

I get an issue, that is: Once i expand databases from SQL Enterprise Manager, it takes a long time to wait displaying all names of databases. How should i do to prevent displaying all names of databases?

View 1 Replies View Related

How To Prevent My Co-Workers From Accessing My SQL

May 17, 2008

Hi all

In our office we have simple Network (LAN) and for some reason in each workgroup Computer in this network we have installed SQL-Server 2000.

So far everything was ok but recently i noticed that my co-workers can easily access my Sql Server Instance through their Enterprise manager installed on their computers and then they can open my tables,view...and manipulate other objects.

for better illustration i have created a Flash Movie from this process , please check the following Link :

http://www.Parsisoftco.com/movie/Sql/Sql.htm

How can i prevent others from doing so?
Any help greatly Appreciated.
Kind Regards.

View 3 Replies View Related

Prevent From Copying Database ?

Jun 24, 2008

Hi,

How can prevent from stoping sql-server sevice and copying database,
note user has a access right to pc/server.

Kind Regards,
sasan.

View 4 Replies View Related

Trigger To Prevent Update If No Changes?

Jul 10, 2013

Is it possible to create a trigger to prevent update of a row if no signifiant colums are updated

Example : I need to allow the update only if colums a,b or c have changes ?

how it should works to keep or discard the update according to condition ?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved