Showing posts with label setting. Show all posts
Showing posts with label setting. Show all posts

Monday, March 26, 2012

Rights needed to restore DB

I have an SQL 2005 box in an academic setting. Students log-in using SQL
server authentication. They can create, modify and backup their DBs'
When using the restore wizard and specifying a file location where the
backup is located they get an error.
c:\ProgramFiles\...\...\...\Backup
Cannot access the specified path or file on the server. Verify that you have
the necessary security privileges and that the path or file exists
If you know that the service account can access a specific file, type in the
full path for the file in the File Name control in the Locate dialog box.
The back-ups are being created and can be restored by the Instructor (with
full system rights)
What am I missing here? students can write but not read there own files.
Any help is appreciated.
Todd>I have an SQL 2005 box in an academic setting. Students log-in using SQL
> server authentication. They can create, modify and backup their DBs'
> When using the restore wizard and specifying a file location where the
> backup is located they get an error.
> c:\ProgramFiles\...\...\...\Backup
> Cannot access the specified path or file on the server. Verify that you
> have
> the necessary security privileges and that the path or file exists
> If you know that the service account can access a specific file, type in
> the
> full path for the file in the File Name control in the Locate dialog box.
> The back-ups are being created and can be restored by the Instructor (with
> full system rights)
> What am I missing here? students can write but not read there own files.
BACKUP DATABASE permission is not enough for restoring. If the database
being restored does not exist, the user must have CREATE DATABASE
permissions to be able to execute RESTORE. If the database exists, RESTORE
permissions default to members of the sysadmin and dbcreator fixed server
roles and the owner (dbo) of the database.
Dejan Sarka, SQL Server MVP
Mentor, www.SolidQualityLearning.com
Anything written in this message represents solely the point of view of the
sender.
This message does not imply endorsement from Solid Quality Learning, and it
does not represent the point of view of Solid Quality Learning or any other
person, company or institution mentioned in this message|||The users are a part of the dbcreator fixed role. Do they need spcific right
s
to the folder where the backups are stored or does a sytem account manage
that piece.
If so which account?
"Dejan Sarka" wrote:

> BACKUP DATABASE permission is not enough for restoring. If the database
> being restored does not exist, the user must have CREATE DATABASE
> permissions to be able to execute RESTORE. If the database exists, RESTORE
> permissions default to members of the sysadmin and dbcreator fixed server
> roles and the owner (dbo) of the database.
> --
> Dejan Sarka, SQL Server MVP
> Mentor, www.SolidQualityLearning.com
> Anything written in this message represents solely the point of view of th
e
> sender.
> This message does not imply endorsement from Solid Quality Learning, and i
t
> does not represent the point of view of Solid Quality Learning or any othe
r
> person, company or institution mentioned in this message
>
>|||> The users are a part of the dbcreator fixed role. Do they need spcific
> rights
> to the folder where the backups are stored or does a sytem account manage
> that piece.
> If so which account?
If you are using T-SQL Restore command from SSMS, then it is SQL Server
account. Check whether it can reach the folder. For example, you could use a
mapped drive, and the SQL Server account does not know anything about the
mapping you do under your user account. In addition, LocalSystem account, if
your server uses it, can not go beyond local computer - it can not reach
shared folders on the network. Try to login with servers account and read
the backup files.
Dejan Sarka, SQL Server MVP
Mentor, www.SolidQualityLearning.com
Anything written in this message represents solely the point of view of the
sender.
This message does not imply endorsement from Solid Quality Learning, and it
does not represent the point of view of Solid Quality Learning or any other
person, company or institution mentioned in this message|||Dejan,
We are using the backup/ restore wizard and trying to reach the default
SQL back-up folder on the local drive. The Administrator and Instructor
accounts can reach the folder and restore a file, but they have sysadmin
role. Students with dbcreator role can backup but not restore.
The SQLUser account in widows has full control rights to the folder.
"Dejan Sarka" wrote:

> If you are using T-SQL Restore command from SSMS, then it is SQL Server
> account. Check whether it can reach the folder. For example, you could use
a
> mapped drive, and the SQL Server account does not know anything about the
> mapping you do under your user account. In addition, LocalSystem account,
if
> your server uses it, can not go beyond local computer - it can not reach
> shared folders on the network. Try to login with servers account and read
> the backup files.
> --
> Dejan Sarka, SQL Server MVP
> Mentor, www.SolidQualityLearning.com
> Anything written in this message represents solely the point of view of th
e
> sender.
> This message does not imply endorsement from Solid Quality Learning, and i
t
> does not represent the point of view of Solid Quality Learning or any othe
r
> person, company or institution mentioned in this message
>
>|||> We are using the backup/ restore wizard and trying to reach the default
> SQL back-up folder on the local drive. The Administrator and Instructor
> accounts can reach the folder and restore a file, but they have sysadmin
> role. Students with dbcreator role can backup but not restore.
So, what is the exact error message?
Dejan Sarka, SQL Server MVP
Mentor, www.SolidQualityLearning.com
Anything written in this message represents solely the point of view of the
sender.
This message does not imply endorsement from Solid Quality Learning, and it
does not represent the point of view of Solid Quality Learning or any other
person, company or institution mentioned in this message|||Here's the message:
"C:\Program Files\Microsoft SQL Server\MSSQL\Backup
Cannot access the specified path or file on the server. Verify that you have
the necessary security privileges and that the path or file exists.
If you know that the service account can access a specific file, type in the
full path for the file in the File Name control in the Locate Dialog box."
The File Name control is greyed out and doesn't allow students to type. Also
trying to Add a file path fails.
"Dejan Sarka" wrote:

> So, what is the exact error message?
> --
> Dejan Sarka, SQL Server MVP
> Mentor, www.SolidQualityLearning.com
> Anything written in this message represents solely the point of view of th
e
> sender.
> This message does not imply endorsement from Solid Quality Learning, and i
t
> does not represent the point of view of Solid Quality Learning or any othe
r
> person, company or institution mentioned in this message
>
>|||Have you tried to login with the service account and access the path? I know
it does not sound logical that SQL Server would not have access to its own
path, but anway...
In addition, could you script your student login / user / permissions, in
order I can check it?
Dejan Sarka, SQL Server MVP
Mentor, www.SolidQualityLearning.com
Anything written in this message represents solely the point of view of the
sender.
This message does not imply endorsement from Solid Quality Learning, and it
does not represent the point of view of Solid Quality Learning or any other
person, company or institution mentioned in this message
"TLuebke" <TLuebke@.discussions.microsoft.com> wrote in message
news:78358925-255D-4EB7-B5D5-8448256078E3@.microsoft.com...[vbcol=seagreen]
> Here's the message:
> "C:\Program Files\Microsoft SQL Server\MSSQL\Backup
> Cannot access the specified path or file on the server. Verify that you
> have
> the necessary security privileges and that the path or file exists.
> If you know that the service account can access a specific file, type in
> the
> full path for the file in the File Name control in the Locate Dialog box."
> The File Name control is greyed out and doesn't allow students to type.
> Also
> trying to Add a file path fails.
>
> "Dejan Sarka" wrote:
>

Friday, March 23, 2012

Right and Bottom Margins

Hi,
I have a doubt in margins.
Setting Left margin, Top Margin and Body Size would be enough. Then why
Right and Bottom Margins.
PonnurangamI need more specific information about your situation before I can comment.
Could you post a sample RDL that demonstrates the behavior?
If a datasource is required , please make sure it works with one of the
common sample databases: Northwind, Pubs, or Adventure Works.
--
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Ponnurangam" <ponnurangam@.trellisys.net> wrote in message
news:er4VCjQrEHA.1272@.TK2MSFTNGP09.phx.gbl...
> Hi,
> I have a doubt in margins.
> Setting Left margin, Top Margin and Body Size would be enough. Then why
> Right and Bottom Margins.
> Ponnurangam
>|||Hi Bruce,
I do not have any specific situation.
The reason why I posted this is, I have set Right and Bottom Margins to 0 to
all my reports.
Does this will affect my reports in any way.
I could not understand why we have to specify Right and Bottom Margins
because specifying Left, Top Margins and Body Size will provide you the
required layout.
Thanks
Ponnurangam
"Bruce Johnson [MSFT]" <brucejoh@.online.microsoft.com> wrote in message
news:Oe7PrvVrEHA.3396@.tk2msftngp13.phx.gbl...
> I need more specific information about your situation before I can
comment.
> Could you post a sample RDL that demonstrates the behavior?
> If a datasource is required , please make sure it works with one of the
> common sample databases: Northwind, Pubs, or Adventure Works.
> --
> Bruce Johnson [MSFT]
> Microsoft SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> "Ponnurangam" <ponnurangam@.trellisys.net> wrote in message
> news:er4VCjQrEHA.1272@.TK2MSFTNGP09.phx.gbl...
> > Hi,
> >
> > I have a doubt in margins.
> >
> > Setting Left margin, Top Margin and Body Size would be enough. Then why
> > Right and Bottom Margins.
> >
> > Ponnurangam
> >
> >
>sql

Wednesday, March 21, 2012

RI, Replication Conflicts and architecture

Hi there,
We're looking at setting up a database infrastructure to handle the
following.
2 Physical sites on an 85% uptime VPN Link
There are multiple (10+) IT systems for various businesses on both sides of
this link.
We need to store 1 shared client table and then each systemwill store
auxillary client data and other tables with RI to the this client table.
We have large amounts of data in this client table with about 15% bad data
(Dups etc)
A hot topic of debate at current is:
If I have DB X (on Side A of the link) that deletes a client record after
deleting all RI, what happens to the client record in DB Y (on Side B of the
link) that still has RI. How should we architect for this - Merge Repl?
Transactional? Web Services? could these sorts of conflicts be handled via a
custom resolver? This is complexed by the fact that we may need to merge the
RI from 2 dups and delete one of them. This needs to be replicated out to
the other side of the link until all (10+) databases are accurate. As near
to real time as possible is required.
Any help much appreciated
For transactional replication:
If you have a parent table with a child table and do cascading
deletes/updates, and do not maintain the DRI on the Subscriber or you do
maintain it, but uncheck the enforce relationship for replication option on
the Subscriber, and both tables are published DRI will be maintained on the
subscriber automatically.
So if you delete a parent record, the corresponding child records will be
deleted on the Publisher. The delete on the parent will be replicated to the
subscriber and the delete of the child records will also be replicated to
the Subscriber as part of the same transaction.
For merge replication:
You need to set the cascading updates and deletes option on the Publisher
and deselect the enforce relationship for replication. The problem here is
that the deletes on the parent table might arrive on the subscriber before
or after the delete on the child. If these deletes or updates happen
between a batch boundary you may run into problems. Microsoft's solution to
this problem is to increate the UploadGenerationsPerBatch and
DownloadGenerationsPerBatch to something large like 1000, to ensure that the
deletes or updates which are part of the same transaction occur in the same
batch.
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"Murray Foxcroft" <murray(UseADot)foxcroft@.ast.co.za> wrote in message
news:ejvjTnJdEHA.2520@.TK2MSFTNGP12.phx.gbl...
> Hi there,
> We're looking at setting up a database infrastructure to handle the
> following.
> 2 Physical sites on an 85% uptime VPN Link
> There are multiple (10+) IT systems for various businesses on both sides
of
> this link.
> We need to store 1 shared client table and then each systemwill store
> auxillary client data and other tables with RI to the this client table.
> We have large amounts of data in this client table with about 15% bad data
> (Dups etc)
> A hot topic of debate at current is:
> If I have DB X (on Side A of the link) that deletes a client record after
> deleting all RI, what happens to the client record in DB Y (on Side B of
the
> link) that still has RI. How should we architect for this - Merge Repl?
> Transactional? Web Services? could these sorts of conflicts be handled via
a
> custom resolver? This is complexed by the fact that we may need to merge
the
> RI from 2 dups and delete one of them. This needs to be replicated out to
> the other side of the link until all (10+) databases are accurate. As near
> to real time as possible is required.
> Any help much appreciated
>
>
>
|||Hi Hilary, thanks for the reply - our complexity comes in when we need to
de-dup on the databases involved in the replication.
So: We find a duplicate client record - now we need to move all the DRI
through all systems to one of the clients THEN delete the other once all DRI
is removed.
How and which replication would you use for this?
Thanks in advance
"Hilary Cotter" <hilaryk@.att.net> wrote in message
news:esY7v9JdEHA.3476@.tk2msftngp13.phx.gbl...
> For transactional replication:
> If you have a parent table with a child table and do cascading
> deletes/updates, and do not maintain the DRI on the Subscriber or you do
> maintain it, but uncheck the enforce relationship for replication option
> on
> the Subscriber, and both tables are published DRI will be maintained on
> the
> subscriber automatically.
> So if you delete a parent record, the corresponding child records will be
> deleted on the Publisher. The delete on the parent will be replicated to
> the
> subscriber and the delete of the child records will also be replicated to
> the Subscriber as part of the same transaction.
> For merge replication:
> You need to set the cascading updates and deletes option on the Publisher
> and deselect the enforce relationship for replication. The problem here is
> that the deletes on the parent table might arrive on the subscriber before
> or after the delete on the child. If these deletes or updates happen
> between a batch boundary you may run into problems. Microsoft's solution
> to
> this problem is to increate the UploadGenerationsPerBatch and
> DownloadGenerationsPerBatch to something large like 1000, to ensure that
> the
> deletes or updates which are part of the same transaction occur in the
> same
> batch.
> --
> Hilary Cotter
> Looking for a book on SQL Server replication?
> http://www.nwsu.com/0974973602.html
>
> "Murray Foxcroft" <murray(UseADot)foxcroft@.ast.co.za> wrote in message
> news:ejvjTnJdEHA.2520@.TK2MSFTNGP12.phx.gbl...
> of
> the
> a
> the
>
sql

RI vs Speed

Hello,

We are in the process of setting up RI (mostly foreign keys, some sp's) on our SQL Server 2000 DBs. One of the questions that has come into play is how bad the performance hit will be once the RI has been put into place. We are using VFP 7 and C# for our front ends, BTW.

I was just wondering if there was anyone out there who has seen any performance difference between an application with RI and one without. If so, how bad of a hit was it, and what type of RI did you use (FKs, SPs, triggers, etc...). If anyone has any advice on how to reduce the performance hit, that would be appreciated as well!

Thanks!

-Justinthe question should not be stated in terms of performance of RI versus performance of not having RI

the question should be performance of RI versus performance of doing the same RI actions in application code

the answer should be, let the database run the RI actions

if you are considering giving up RI, you are saying you are willing to forego having valid data, and i don't believe that's a performance question, but an integrity question

let's consider a (somewhat contrived) analogy -- what if your bank said to you "every time we transfer money from your checking account to your savings account, do you want us to make sure the money actually arrived in the savings account? or would you like to give up that assurance in order to get your card out of the ATM a few milliseconds sooner?"

rudy
http://rudy.ca/|||We recently converted all of our data to SQL Server - currently we have NO RI in place. Some of the RI we have planned to put in place is critical, and will go no matter what the impact - we just want to be prepared. Some of it is somewhat redundant and not as necessary, and the dreaded management wants to weigh the pros and cons of putting this RI into place. This why I am asking the performance question.|||i understand, and sympathize :)

having myself been a clueless pointy-haired boss in the past, i can understand where they're coming from

however, i think you still need to make the point about the purpose of RI, which is to ensure data integrity

now, granted, if it's an existing application which is being modified to use a new database, then you have an interesting situation

presumably the existing app already takes care of RI concerns itself (e.g. not inserting an order for a customer that doesn't exist) so adding RI in these circumstances seems rather pointless

in other words, there's little to be gained (in a bottom-line cost-benefit sense) from adding RI constraints to a database for an app that's already working

when framed in this context, i would suggest setting up the database without RI to start with, taking several volume test performance measures, applying RI, and running the performance tests again

i predict the RI overhead will not be noticeable, or at least no more than a 5% increase

your mileage may vary, since so much depends on the actual tables and relationships involved

rudy|||Thanks for your reply :)

The application was actually written in VFP 6/7 and was designed to use the native FoxPro tables. once some of the DBCs (there are about 30) started nearing the 2 GB limit, we had to 'tweak' (word used by mgmt, it was more like rewrite) the program to be SQL Server compliant. In the midst of all this our DBA ran screaming for the hills, so I recently got the position. The hired guns who did the data conversion neglected to convert the extensive VFP RI on the old DBs to SQL (along with other insignificant things like memos and field descriptions), and now I am stuck in cleanup mode. Since the RI has to be rebuilt from the ground up, mgmt is taking the oppurtunity to sacrifice data integrity for customer-visible speed.

I've been doing some testing on mass updates with RI hooked and then unhooked, and have noticed about a 7% hit for the essential RI. Not a big deal considering we got a 238% speed increase once we converted to SQL Server DBs (the application goes over a WAN). I haven't wriiten the SPs and triggers for the 'nonessential' portion yet, and mgmnt doesn't want me to until they are comfortable it would 'not be a waste of my' + underpaid + 'time.'