Showing posts with label setup. Show all posts
Showing posts with label setup. Show all posts

Friday, March 30, 2012

One format can connect to Sql Server but others cannot

I have setup a SQL Server 2000 database on a remote machine. In the SQL's Enterprise manager I can connect remotely to the database and perform operations. In Visual Studio 2005 I can create a new data connection only using ODBC to connect. Also I can ISQL to the remote machine with no problems.

But when I try to connect using the driver Microsoft SQL Server (SQL connect) as the underlying connection platform in VS Studio, it cannot create a data connection that way, nor can I programmatically connect to the database using the .Net data driver. They timeout....

Setups

Windows Authentication used.
On remote Windows 2003/IIS6 I have local admin privlidges (domain/username) .
My remote account (domain/username) is an admin in the database
Remote has local copy account, same name/ password for impersonation.
Web service (see error #2) impersonates as my client account. (Anonymous access (true) -> my domain account/password and Autenticated access: Integrated Windows authentication set to true)

Error Messages

Direct from code (console app calling .Net data provider) to assembly doing the DB work.

System.Data.SqlClient.SqlException : Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.


Direct From Web Service to assembly doing the DB work

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.


Visual studio 2005 timesout in trying to make connection using Microsoft SQL Server (SQL connect) but can connect via ODBC>

Please advise / advTHANKSance

have you confirmed that Sql Native Client is installed correctly on the server?

In a nutshell, SQL Native Client is a stand alone data access Application Programming Interface (API) that is used for both OLE DB and ODBC. It combines the SQL OLE DB provider and the SQL ODBC driver into one native dynamic link library (DLL) while also providing new functionality above and beyond that supplied by the Microsoft Data Access Components (MDAC). SQL Native Client can be used to create new applications or enhance existing applications that need to take advantage of new SQL Server 2005 features such as Multiple Active Result Sets (MARS), User-Defined Types (UDT), and XML data type support.

Derek

|||Even though the error message hints at 2005, the sql server is a 2000 server. Does SNC still apply?|||

i was/am assuming this is in the context of a SQL Server Project? Meaning you can only target SQL Servers 2005+ and by default the connection manager uses SQLNCLI.

Derek

sql

Wednesday, March 28, 2012

One database to rule them all

How can I setup the dbs in sql server so that when I change the data in one table the changes will cascade down to the tables in my other dbs. Therefore, one database would hold a primary key table. If I had 15 other dbs, then I could somehow link them so the data changed in the primary key table of the 1st database would cascade down to the other dbs.

Thanks

You would have to write a whole lot of TRIGGERS.

That 'could' be a substaintial performance penalty.

(And most likely a very unwieldy design.)

Let us know what you are attempting to accomplish, and perhaps we can guide you to a solution that will work AND be efficient.

|||I am attempting to update all the IDs throughout all of my databases. For example, imagine you had several databases for different applications. Maybe one application is for health information, another application is penitentary clients, and a third application is for penitentary client rehabilitation. A penitentary client would be assigned a unique number and the client shows up in the penitentary client program. If the client receives health or rehabilitation services, then their unique number is used in the other applications so you don't need to duplicate information such as their name. However, for some reason the clients number has to be changed. I want to be able to change the information in the penitentary clients db and have it automatically change in the other databases. If for some reason the ID changes at 3:00 PM, then it would be nice to have all the data updated in real time without having to wait to run a job that updates all of the data. If I get a list of new client IDs to be updated, then I would like a better way to update the tables in a database rather than running an update statement against several tables in different dbs. If a table gets added to a db, I don't want to have to remember to go and add another update statement to some job.

One database to rule them all

How can I setup the dbs in sql server so that when I change the data in one table the changes will cascade down to the tables in my other dbs. Therefore, one database would hold a primary key table. If I had 15 other dbs, then I could somehow link them so the data changed in the primary key table of the 1st database would cascade down to the other dbs.

Thanks

You would have to write a whole lot of TRIGGERS.

That 'could' be a substaintial performance penalty.

(And most likely a very unwieldy design.)

Let us know what you are attempting to accomplish, and perhaps we can guide you to a solution that will work AND be efficient.

|||I am attempting to update all the IDs throughout all of my databases. For example, imagine you had several databases for different applications. Maybe one application is for health information, another application is penitentary clients, and a third application is for penitentary client rehabilitation. A penitentary client would be assigned a unique number and the client shows up in the penitentary client program. If the client receives health or rehabilitation services, then their unique number is used in the other applications so you don't need to duplicate information such as their name. However, for some reason the clients number has to be changed. I want to be able to change the information in the penitentary clients db and have it automatically change in the other databases. If for some reason the ID changes at 3:00 PM, then it would be nice to have all the data updated in real time without having to wait to run a job that updates all of the data. If I get a list of new client IDs to be updated, then I would like a better way to update the tables in a database rather than running an update statement against several tables in different dbs. If a table gets added to a db, I don't want to have to remember to go and add another update statement to some job.
sql

Friday, March 9, 2012

OLE DB Source using table name variable

I have a package-level variable [User::viewName], type = string, containing a view name. I want to setup an OLE DB source to use this variable value as the source, so Data access mode = "Table name or view name variable". The Variable name dropdown contains [User:viewName], so I select it. When I click OK to leave the edit dialog I get the error:

The variable User::viewName is required to be of type "VT_BSTR".

Only variables of type String occur in the Variable name dropdown; if I try changing it to a type other than string it doesn't occur in the dropdown. What is VT_BSTR and how can I change the variable type to it?

I've never seen VT_BSTR in my life, that isn't a data type that I know of. Something is awry here - I wonder if it could be package corruption. Does the same happen when you try a differrent string variable?

-Jamie

|||I'm copying and pasting a package in Solution Explorer, then playing with the copy to see what works, then going back to the original. The package this problem is occurring in is a copy; might that be the problem? This seems like such an ordinary thing to do (get the table or view name from a variable) that I'm really surprised it's happening. Are there known problems with copying packages?|||

I don't know of any - but it does sound as though some corruption has occurred somewhere. Can you share the contents of the .dtsx file? (i.e. open it in notepad and copy the contents to here)?

-Jamie

|||

mruniqueid wrote:

I'm copying and pasting a package in Solution Explorer, then playing with the copy to see what works, then going back to the original. The package this problem is occurring in is a copy; might that be the problem? This seems like such an ordinary thing to do (get the table or view name from a variable) that I'm really surprised it's happening. Are there known problems with copying packages?

Can't think it matters, but be sure you generate a new GUID on the copied package. Control-flow background: right click, properties. Select the drop down in the ID field and generate a new GUID.|||

In my original package Data Flow I had an OLE DB Source with Data access mode = "Table or view". When I try to set Data access mode = "Table name or view name variable" in the original package I run into this trouble.

I tried creating a new package from scratch and realized I've got a knowledge gap. If you create an OLE DB Source and set Data access mode = "Table name or view name variable" right from the start, then how do you define the source output columns since there's no table to derive them from? I have several views with the same structure; in my original package I picked one of these as "Name of the table or the view" which of course defined output columns for the source, then tried to change Data access mode to a variable as described above.

Can I start with Data access mode = variable? If I try that I get the error "A destination table name has not been provided". I created an OLE DB Destination and connected it to the OLE DB Source but the error persists. What is the proper sequence of steps and settings to use a variable name for Data Access Mode in an OLE DB Source?

|||

mruniqueid wrote:

In my original package Data Flow I had an OLE DB Source with Data access mode = "Table or view". When I try to set Data access mode = "Table name or view name variable" in the original package I run into this trouble.

I tried creating a new package from scratch and realized I've got a knowledge gap. If you create an OLE DB Source and set Data access mode = "Table name or view name variable" right from the start, then how do you define the source output columns since there's no table to derive them from?

The name of the table needs to be stored in the variable.

mruniqueid wrote:

I have several views with the same structure; in my original package I picked one of these as "Name of the table or the view" which of course defined output columns for the source, then tried to change Data access mode to a variable as described above.

Can I start with Data access mode = variable? If I try that I get the error "A destination table name has not been provided". I created an OLE DB Destination and connected it to the OLE DB Source but the error persists. What is the proper sequence of steps and settings to use a variable name for Data Access Mode in an OLE DB Source?

1. Create the variable of type string

2. Add the table name into teh variable

3. Create your OLE DB Source and select the variable that you have just chosen.

-Jamie

|||

I didn't realize the variable value was evaluated at design time, since it's set at runtime. Makes sense though - thanks a lot!

- Dana

Wednesday, March 7, 2012

OLE DB Provider

How do you set up an OLE DB Provider on a client machine.
Is there a similar setup procedure as ODBC?
Thanks,
StephIf you have MDAC installed on your client PC, you will have all major OLE DB
providers. MDAC gets installed along with some applications. You can also
get it from Microsoft site at: http://www.microsoft.com/data
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
What hardware is your SQL Server running on?
http://vyaskn.tripod.com/poll.htm
"steph" <stephaniebeling@.hotmail.com> wrote in message
news:393a01c3559d$91c59f60$a001280a@.phx.gbl...
How do you set up an OLE DB Provider on a client machine.
Is there a similar setup procedure as ODBC?
Thanks,
Steph

Saturday, February 25, 2012

OLE DB Connectivity

Do users need to be setup with the Client Connectivity
only for an application that uses OLE DB to access MS SQL
Standard Edition?
Thanks,
AnjelinaNo, Users you need to have the MDAC installed.
If you send your queries DSN-less in your Apps, they even don´t have
maintain a connection info and their computers (like DSNs)
HTH, Jens Süßmeyer.
"anjelina" <ajturner@.canada.com> schrieb im Newsbeitrag
news:023d01c37b5c$0de07f50$a001280a@.phx.gbl...
> Do users need to be setup with the Client Connectivity
> only for an application that uses OLE DB to access MS SQL
> Standard Edition?
> Thanks,
> Anjelina|||Sorry, my english sounded like this from a drunk, so
the corrected version (just for my ego :)
--
No, you only have the MDAC to be installed on the clients.
If you send your queries in your Apps DSN-less, you
even don´t have to maintain a connection info on the
clients (like DSNs)
--
"anjelina" <ajtuener@.canada.com> schrieb im Newsbeitrag
news:068701c37b67$61096740$a101280a@.phx.gbl...
Thanks a million!!!
Anjelina
>--Original Message--
>No, Users you need to have the MDAC installed.
>If you send your queries DSN-less in your Apps, they
even don´t have
>maintain a connection info and their computers (like
DSNs)
>HTH, Jens Süßmeyer.
>"anjelina" <ajturner@.canada.com> schrieb im Newsbeitrag
>news:023d01c37b5c$0de07f50$a001280a@.phx.gbl...
>> Do users need to be setup with the Client Connectivity
>> only for an application that uses OLE DB to access MS
SQL
>> Standard Edition?
>> Thanks,
>> Anjelina
>
>.
>

Monday, February 20, 2012

Old machines works better than the higher-end new machine

Hi all,
My setup is : SQL Server 2000 SP3 on Windows 2000.
I used the profiler to run an sql script with 33,000 commands (mostly
inserts). I ran it on 4 setups and the results were strange. Lower-end
machines ran twice as fast as higher-end machines. I also ran out system
and not the script on all machines and got the same results.
Lower-end ? Motorola Pentium III 500. with 256 MB memory, one slow disk and
.
High-end machines had 1 Xeon processor, 1GB RAM, 3 fast disks.
Any help is greatly appreciated.
AviAssuming each insert is in a separate transaction, a likely cause of the
performance difference is that write caching is enabled on the older
machines but not on the high-end boxes. A synchronous log write is
required for each transaction so you'll need to wait for the i/o to
physically complete.
Write caching improve performance but the controller must guarantee that
data will eventually get written to disk with non-volatile (e.g. battery
backup) memory. Loss of log data may result in a corrupt database.
--
Hope this helps.
Dan Guzman
SQL Server MVP
--
SQL FAQ links (courtesy Neil Pike):
http://www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
http://www.sqlserverfaq.com
http://www.mssqlserver.com/faq
--
"Avi" <rememberoti@.yahoo.com> wrote in message
news:uAoQT02rDHA.4092@.tk2msftngp13.phx.gbl...
> Hi all,
>
> My setup is : SQL Server 2000 SP3 on Windows 2000.
>
> I used the profiler to run an sql script with 33,000 commands (mostly
> inserts). I ran it on 4 setups and the results were strange.
Lower-end
> machines ran twice as fast as higher-end machines. I also ran out
system
> and not the script on all machines and got the same results.
>
> Lower-end - Motorola Pentium III 500. with 256 MB memory, one slow
disk and
> .
> High-end machines had 1 Xeon processor, 1GB RAM, 3 fast disks.
>
> Any help is greatly appreciated.
> Avi
>|||Hi,
Thanks for the reply. It is enabled on both machines..
"Dan Guzman" <danguzman@.nospam-earthlink.net> wrote in message
news:eMdns82rDHA.2260@.TK2MSFTNGP09.phx.gbl...
> Assuming each insert is in a separate transaction, a likely cause of the
> performance difference is that write caching is enabled on the older
> machines but not on the high-end boxes. A synchronous log write is
> required for each transaction so you'll need to wait for the i/o to
> physically complete.
> Write caching improve performance but the controller must guarantee that
> data will eventually get written to disk with non-volatile (e.g. battery
> backup) memory. Loss of log data may result in a corrupt database.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> --
> SQL FAQ links (courtesy Neil Pike):
> http://www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
> http://www.sqlserverfaq.com
> http://www.mssqlserver.com/faq
> --
> "Avi" <rememberoti@.yahoo.com> wrote in message
> news:uAoQT02rDHA.4092@.tk2msftngp13.phx.gbl...
> > Hi all,
> >
> >
> >
> > My setup is : SQL Server 2000 SP3 on Windows 2000.
> >
> >
> >
> > I used the profiler to run an sql script with 33,000 commands (mostly
> > inserts). I ran it on 4 setups and the results were strange.
> Lower-end
> > machines ran twice as fast as higher-end machines. I also ran out
> system
> > and not the script on all machines and got the same results.
> >
> >
> >
> > Lower-end - Motorola Pentium III 500. with 256 MB memory, one slow
> disk and
> > .
> >
> > High-end machines had 1 Xeon processor, 1GB RAM, 3 fast disks.
> >
> >
> >
> > Any help is greatly appreciated.
> >
> > Avi
> >
> >
>|||Different RAID levels?
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Avi" <rememberoti@.yahoo.com> wrote in message news:uh6ZtM5rDHA.2400@.tk2msftngp13.phx.gbl...
> Hi,
> Thanks for the reply. It is enabled on both machines..
> "Dan Guzman" <danguzman@.nospam-earthlink.net> wrote in message
> news:eMdns82rDHA.2260@.TK2MSFTNGP09.phx.gbl...
> > Assuming each insert is in a separate transaction, a likely cause of the
> > performance difference is that write caching is enabled on the older
> > machines but not on the high-end boxes. A synchronous log write is
> > required for each transaction so you'll need to wait for the i/o to
> > physically complete.
> >
> > Write caching improve performance but the controller must guarantee that
> > data will eventually get written to disk with non-volatile (e.g. battery
> > backup) memory. Loss of log data may result in a corrupt database.
> >
> > --
> > Hope this helps.
> >
> > Dan Guzman
> > SQL Server MVP
> >
> > --
> > SQL FAQ links (courtesy Neil Pike):
> >
> > http://www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
> > http://www.sqlserverfaq.com
> > http://www.mssqlserver.com/faq
> > --
> >
> > "Avi" <rememberoti@.yahoo.com> wrote in message
> > news:uAoQT02rDHA.4092@.tk2msftngp13.phx.gbl...
> > > Hi all,
> > >
> > >
> > >
> > > My setup is : SQL Server 2000 SP3 on Windows 2000.
> > >
> > >
> > >
> > > I used the profiler to run an sql script with 33,000 commands (mostly
> > > inserts). I ran it on 4 setups and the results were strange.
> > Lower-end
> > > machines ran twice as fast as higher-end machines. I also ran out
> > system
> > > and not the script on all machines and got the same results.
> > >
> > >
> > >
> > > Lower-end - Motorola Pentium III 500. with 256 MB memory, one slow
> > disk and
> > > .
> > >
> > > High-end machines had 1 Xeon processor, 1GB RAM, 3 fast disks.
> > >
> > >
> > >
> > > Any help is greatly appreciated.
> > >
> > > Avi
> > >
> > >
> >
> >
>|||Thanks for the reply!
On both machines the Write Caching is enabled.
Any other ideas?
"Dan Guzman" <danguzman@.nospam-earthlink.net> wrote in message
news:eMdns82rDHA.2260@.TK2MSFTNGP09.phx.gbl...
> Assuming each insert is in a separate transaction, a likely cause of the
> performance difference is that write caching is enabled on the older
> machines but not on the high-end boxes. A synchronous log write is
> required for each transaction so you'll need to wait for the i/o to
> physically complete.
> Write caching improve performance but the controller must guarantee that
> data will eventually get written to disk with non-volatile (e.g. battery
> backup) memory. Loss of log data may result in a corrupt database.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> --
> SQL FAQ links (courtesy Neil Pike):
> http://www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
> http://www.sqlserverfaq.com
> http://www.mssqlserver.com/faq
> --
> "Avi" <rememberoti@.yahoo.com> wrote in message
> news:uAoQT02rDHA.4092@.tk2msftngp13.phx.gbl...
> > Hi all,
> >
> >
> >
> > My setup is : SQL Server 2000 SP3 on Windows 2000.
> >
> >
> >
> > I used the profiler to run an sql script with 33,000 commands (mostly
> > inserts). I ran it on 4 setups and the results were strange.
> Lower-end
> > machines ran twice as fast as higher-end machines. I also ran out
> system
> > and not the script on all machines and got the same results.
> >
> >
> >
> > Lower-end - Motorola Pentium III 500. with 256 MB memory, one slow
> disk and
> > .
> >
> > High-end machines had 1 Xeon processor, 1GB RAM, 3 fast disks.
> >
> >
> >
> > Any help is greatly appreciated.
> >
> > Avi
> >
> >
>|||Thanks for the reply,
The disks are not RAID configured. I even disabled two of them just to make
sure of that. I still get bad response.
Any other ideas are welocme!
"Tibor Karaszi" <tibor.please_reply_to_public_forum.karaszi@.cornerstone.se>
wrote in message news:u0G$Bo6rDHA.3436@.tk2msftngp13.phx.gbl...
> Different RAID levels?
> --
> Tibor Karaszi, SQL Server MVP
> Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
>
> "Avi" <rememberoti@.yahoo.com> wrote in message
news:uh6ZtM5rDHA.2400@.tk2msftngp13.phx.gbl...
> > Hi,
> >
> > Thanks for the reply. It is enabled on both machines..
> >
> > "Dan Guzman" <danguzman@.nospam-earthlink.net> wrote in message
> > news:eMdns82rDHA.2260@.TK2MSFTNGP09.phx.gbl...
> > > Assuming each insert is in a separate transaction, a likely cause of
the
> > > performance difference is that write caching is enabled on the older
> > > machines but not on the high-end boxes. A synchronous log write is
> > > required for each transaction so you'll need to wait for the i/o to
> > > physically complete.
> > >
> > > Write caching improve performance but the controller must guarantee
that
> > > data will eventually get written to disk with non-volatile (e.g.
battery
> > > backup) memory. Loss of log data may result in a corrupt database.
> > >
> > > --
> > > Hope this helps.
> > >
> > > Dan Guzman
> > > SQL Server MVP
> > >
> > > --
> > > SQL FAQ links (courtesy Neil Pike):
> > >
> > > http://www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
> > > http://www.sqlserverfaq.com
> > > http://www.mssqlserver.com/faq
> > > --
> > >
> > > "Avi" <rememberoti@.yahoo.com> wrote in message
> > > news:uAoQT02rDHA.4092@.tk2msftngp13.phx.gbl...
> > > > Hi all,
> > > >
> > > >
> > > >
> > > > My setup is : SQL Server 2000 SP3 on Windows 2000.
> > > >
> > > >
> > > >
> > > > I used the profiler to run an sql script with 33,000 commands
(mostly
> > > > inserts). I ran it on 4 setups and the results were strange.
> > > Lower-end
> > > > machines ran twice as fast as higher-end machines. I also ran out
> > > system
> > > > and not the script on all machines and got the same results.
> > > >
> > > >
> > > >
> > > > Lower-end - Motorola Pentium III 500. with 256 MB memory, one slow
> > > disk and
> > > > .
> > > >
> > > > High-end machines had 1 Xeon processor, 1GB RAM, 3 fast disks.
> > > >
> > > >
> > > >
> > > > Any help is greatly appreciated.
> > > >
> > > > Avi
> > > >
> > > >
> > >
> > >
> >
> >
>|||Avi wrote:
> Hi all,
> My setup is : SQL Server 2000 SP3 on Windows 2000.
> I used the profiler to run an sql script with 33,000 commands (mostly
> inserts). I ran it on 4 setups and the results were strange. Lower-end
> machines ran twice as fast as higher-end machines. I also ran out system
> and not the script on all machines and got the same results.
> Lower-end ? Motorola Pentium III 500. with 256 MB memory, one slow disk and
> High-end machines had 1 Xeon processor, 1GB RAM, 3 fast disks.
> Any help is greatly appreciated.
> Avi
Remember that Google is your friend. You are not alone in having this
kind of problem:
http://www.google.com/groups?as_q=new+machine+slower&num=10&as_scoring=r&hl=en&ie=UTF-8&oe=UTF-8&btnG=Google+Search&as_epq=&as_oq=&as_eq=&as_ugroup=microsoft.public.sqlserver.*&as_usubject=&as_uauthors=&as_umsgid=&lr=&as_drrb=q&as_qdr=&as_mind=12&as_minm=5&as_miny=1981&as_maxd=23&as_maxm=11&as_maxy=2003&safe=images
HARDWARE:
Ensure that there are no undetected hardware differences affecting your
benchmarks, e.g., that all memory is available to the processors, that
the hardware and network component interfaces to the systems are
equivalent, that you have exclusive use of the network while testing
(don't let Joe the Programmer download MP3s from your server during
tests). Once you have eliminated possible hardware variations then
reconsider the software element.
FILE I/O:
Test the machines on non-SQL I/O processing, i.e., file I/O. Perhaps the
"fast disks" aren't as fast as claimed. There are some posts here that
might be relevant:
http://www.google.com/groups?as_q=disk+formatting&num=10&as_scoring=r&hl=en&ie=UTF-8&oe=UTF-8&btnG=Google+Search&as_epq=&as_oq=&as_eq=&as_ugroup=microsoft.public.sqlserver.*&as_usubject=&as_uauthors=&as_umsgid=&lr=&as_drrb=q&as_qdr=&as_mind=12&as_minm=5&as_miny=1981&as_maxd=23&as_maxm=11&as_maxy=2003&safe=images
Good Luck,
Michael D. Kersey

Old backup are not delete

I have setup a maintenance plan to do a daily backup of my 10 SQL BD. The
backups are running perfectly.
I also checked in the database maintenance plan to the "Remove files older
than: 1 day"
But if I check in the directory were my backups reside, I still see the last
5 daily backup?
Is there something that I forgot?
Thanks
JPJP
Have you checked that an account under SQL Server Agent runs has appropriate
permissions to delete these files?
"JP Breton" <jpbreton@.videotron.ca> wrote in message
news:%23CcnHHZSFHA.3088@.TK2MSFTNGP15.phx.gbl...
> I have setup a maintenance plan to do a daily backup of my 10 SQL BD. The
> backups are running perfectly.
> I also checked in the database maintenance plan to the "Remove files older
> than: 1 day"
> But if I check in the directory were my backups reside, I still see the
last
> 5 daily backup?
> Is there something that I forgot?
> Thanks
> JP
>
>|||Below KB might help:
http://support.microsoft.com/defaul...2&Product=sql2k
Also, check out below great troubleshooting suggestions from Bill H at MS:
-- Log files don't delete --
This is likely to be either a permissions problem or a sharing violation
problem. The maintenance plan is run as a job, and jobs are run by the
SQLServerAgent service.
Permissions:
1. Determine the startup account for the SQLServerAgent service
(Start|Programs|Administrative tools|Services|SQLServerAgent|Startup). This
account is the security context for jobs, and thus the maintenance plan.
2. If SQLServerAgent is started using LocalSystem (as opposed to a domain
account) then skip step 3.
3. On that box, log onto NT as that account. Using Explorer, attempt to
delete an expired backup. If that succeeds then go to Sharing Violation
section.
4. Log onto NT with an account that is an administrator and use Explorer to
look at the Properties|Security of the folder (where the backups reside)
and ensure the SQLServerAgent startup account has Full Control. If the
SQLServerAgent startup account is LocalSystem, then the account to consider
is SYSTEM.
5. In NT, if an account is a member of an NT group, and if that group has
Access is Denied, then that account will have Access is Denied, even if
that account is also a member of the Administrators group. Thus you may
need to check group permissions (if the Startup Account is a member of a
group).
6. Keep in mind that permissions (by default) are inherited from a parent
folder. Thus, if the backups are stored in C:\bak, and if someone had
denied permission to the SQLServerAgent startup account for C:\, then
C:\bak will inherit access is denied.
Sharing violation:
This is likely to be rooted in a timing issue, with the most likely cause
being another scheduled process (such as NT Backup or Anti-Virus software)
having the backup file open at the time when the SQLServerAgent (i.e., the
maintenance plan job) tried to delete it.
1. Download filemon and handle from www.sysinternals.com.
2. I am not sure whether filemon can be scheduled, or you might be able to
use NT scheduling services to start filemon just before the maintenance
plan job is started, but the filemon log can become very large, so it would
be best to start it some short time before the maintenance plan starts.
3. Inspect the filemon log for another process that has that backup file
open (if your lucky enough to have started filemon before this other
process grabs the backup folder), and inspect the log for the results when
the SQLServerAgent agent attempts to open that same file.
4. Schedule the job or that other process to do their work at different
times.
5. You can use the handle utility if you are around at the time when the
job is scheduled to run.
If the backup files are going to a \\share or a mapped drive (as opposed to
local drive), then you will need to modify the above (with respect to where
the tests and utilities are run).
Finally, inspection of the maintenance plan's history report might be
useful.
Thanks,
Bill Hollinshead
Microsoft, SQL Server
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"JP Breton" <jpbreton@.videotron.ca> wrote in message news:%23CcnHHZSFHA.3088@.TK2MSFTNGP15.ph
x.gbl...
>I have setup a maintenance plan to do a daily backup of my 10 SQL BD. The
backups are running
>perfectly.
> I also checked in the database maintenance plan to the "Remove files older
than: 1 day"
> But if I check in the directory were my backups reside, I still see the la
st 5 daily backup?
> Is there something that I forgot?
> Thanks
> JP
>
>|||Thanks Uri, thanks Tibor,
The SQL agent is ruuning with domain admin rights (I know it should not be
that way)
But I will still verify to make sure that the account can delete files.
Regards
JP
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23fxRENZSFHA.3336@.TK2MSFTNGP10.phx.gbl...
> Below KB might help:
> l]
>
> Also, check out below great troubleshooting suggestions from Bill H at MS:
>
> -- Log files don't delete --
> This is likely to be either a permissions problem or a sharing violation
> problem. The maintenance plan is run as a job, and jobs are run by the
> SQLServerAgent service.
> Permissions:
> 1. Determine the startup account for the SQLServerAgent service
> (Start|Programs|Administrative tools|Services|SQLServerAgent|Startup).
> This
> account is the security context for jobs, and thus the maintenance plan.
> 2. If SQLServerAgent is started using LocalSystem (as opposed to a domain
> account) then skip step 3.
> 3. On that box, log onto NT as that account. Using Explorer, attempt to
> delete an expired backup. If that succeeds then go to Sharing Violation
> section.
> 4. Log onto NT with an account that is an administrator and use Explorer
> to
> look at the Properties|Security of the folder (where the backups reside)
> and ensure the SQLServerAgent startup account has Full Control. If the
> SQLServerAgent startup account is LocalSystem, then the account to
> consider
> is SYSTEM.
> 5. In NT, if an account is a member of an NT group, and if that group has
> Access is Denied, then that account will have Access is Denied, even if
> that account is also a member of the Administrators group. Thus you may
> need to check group permissions (if the Startup Account is a member of a
> group).
> 6. Keep in mind that permissions (by default) are inherited from a parent
> folder. Thus, if the backups are stored in C:\bak, and if someone had
> denied permission to the SQLServerAgent startup account for C:\, then
> C:\bak will inherit access is denied.
> Sharing violation:
> This is likely to be rooted in a timing issue, with the most likely cause
> being another scheduled process (such as NT Backup or Anti-Virus software)
> having the backup file open at the time when the SQLServerAgent (i.e., the
> maintenance plan job) tried to delete it.
> 1. Download filemon and handle from [url]www.sysinternals.com." target="_blank">http://support.microsoft.com/defaul...sinternals.com.
> 2. I am not sure whether filemon can be scheduled, or you might be able to
> use NT scheduling services to start filemon just before the maintenance
> plan job is started, but the filemon log can become very large, so it
> would
> be best to start it some short time before the maintenance plan starts.
> 3. Inspect the filemon log for another process that has that backup file
> open (if your lucky enough to have started filemon before this other
> process grabs the backup folder), and inspect the log for the results when
> the SQLServerAgent agent attempts to open that same file.
> 4. Schedule the job or that other process to do their work at different
> times.
> 5. You can use the handle utility if you are around at the time when the
> job is scheduled to run.
> If the backup files are going to a \\share or a mapped drive (as opposed
> to
> local drive), then you will need to modify the above (with respect to
> where
> the tests and utilities are run).
> Finally, inspection of the maintenance plan's history report might be
> useful.
> Thanks,
> Bill Hollinshead
> Microsoft, SQL Server
>
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "JP Breton" <jpbreton@.videotron.ca> wrote in message
> news:%23CcnHHZSFHA.3088@.TK2MSFTNGP15.phx.gbl...
>

Old backup are not delete

I have setup a maintenance plan to do a daily backup of my 10 SQL BD. The
backups are running perfectly.
I also checked in the database maintenance plan to the "Remove files older
than: 1 day"
But if I check in the directory were my backups reside, I still see the last
5 daily backup?
Is there something that I forgot?
Thanks
JP
JP
Have you checked that an account under SQL Server Agent runs has appropriate
permissions to delete these files?
"JP Breton" <jpbreton@.videotron.ca> wrote in message
news:%23CcnHHZSFHA.3088@.TK2MSFTNGP15.phx.gbl...
> I have setup a maintenance plan to do a daily backup of my 10 SQL BD. The
> backups are running perfectly.
> I also checked in the database maintenance plan to the "Remove files older
> than: 1 day"
> But if I check in the directory were my backups reside, I still see the
last
> 5 daily backup?
> Is there something that I forgot?
> Thanks
> JP
>
>
|||Below KB might help:
http://support.microsoft.com/default...&Product=sql2k
Also, check out below great troubleshooting suggestions from Bill H at MS:
-- Log files don't delete --
This is likely to be either a permissions problem or a sharing violation
problem. The maintenance plan is run as a job, and jobs are run by the
SQLServerAgent service.
Permissions:
1. Determine the startup account for the SQLServerAgent service
(Start|Programs|Administrative tools|Services|SQLServerAgent|Startup). This
account is the security context for jobs, and thus the maintenance plan.
2. If SQLServerAgent is started using LocalSystem (as opposed to a domain
account) then skip step 3.
3. On that box, log onto NT as that account. Using Explorer, attempt to
delete an expired backup. If that succeeds then go to Sharing Violation
section.
4. Log onto NT with an account that is an administrator and use Explorer to
look at the Properties|Security of the folder (where the backups reside)
and ensure the SQLServerAgent startup account has Full Control. If the
SQLServerAgent startup account is LocalSystem, then the account to consider
is SYSTEM.
5. In NT, if an account is a member of an NT group, and if that group has
Access is Denied, then that account will have Access is Denied, even if
that account is also a member of the Administrators group. Thus you may
need to check group permissions (if the Startup Account is a member of a
group).
6. Keep in mind that permissions (by default) are inherited from a parent
folder. Thus, if the backups are stored in C:\bak, and if someone had
denied permission to the SQLServerAgent startup account for C:\, then
C:\bak will inherit access is denied.
Sharing violation:
This is likely to be rooted in a timing issue, with the most likely cause
being another scheduled process (such as NT Backup or Anti-Virus software)
having the backup file open at the time when the SQLServerAgent (i.e., the
maintenance plan job) tried to delete it.
1. Download filemon and handle from www.sysinternals.com.
2. I am not sure whether filemon can be scheduled, or you might be able to
use NT scheduling services to start filemon just before the maintenance
plan job is started, but the filemon log can become very large, so it would
be best to start it some short time before the maintenance plan starts.
3. Inspect the filemon log for another process that has that backup file
open (if your lucky enough to have started filemon before this other
process grabs the backup folder), and inspect the log for the results when
the SQLServerAgent agent attempts to open that same file.
4. Schedule the job or that other process to do their work at different
times.
5. You can use the handle utility if you are around at the time when the
job is scheduled to run.
If the backup files are going to a \\share or a mapped drive (as opposed to
local drive), then you will need to modify the above (with respect to where
the tests and utilities are run).
Finally, inspection of the maintenance plan's history report might be
useful.
Thanks,
Bill Hollinshead
Microsoft, SQL Server
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"JP Breton" <jpbreton@.videotron.ca> wrote in message news:%23CcnHHZSFHA.3088@.TK2MSFTNGP15.phx.gbl...
>I have setup a maintenance plan to do a daily backup of my 10 SQL BD. The backups are running
>perfectly.
> I also checked in the database maintenance plan to the "Remove files older than: 1 day"
> But if I check in the directory were my backups reside, I still see the last 5 daily backup?
> Is there something that I forgot?
> Thanks
> JP
>
>
|||Thanks Uri, thanks Tibor,
The SQL agent is ruuning with domain admin rights (I know it should not be
that way)
But I will still verify to make sure that the account can delete files.
Regards
JP
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23fxRENZSFHA.3336@.TK2MSFTNGP10.phx.gbl...
> Below KB might help:
> http://support.microsoft.com/default...&Product=sql2k
>
> Also, check out below great troubleshooting suggestions from Bill H at MS:
>
> -- Log files don't delete --
> This is likely to be either a permissions problem or a sharing violation
> problem. The maintenance plan is run as a job, and jobs are run by the
> SQLServerAgent service.
> Permissions:
> 1. Determine the startup account for the SQLServerAgent service
> (Start|Programs|Administrative tools|Services|SQLServerAgent|Startup).
> This
> account is the security context for jobs, and thus the maintenance plan.
> 2. If SQLServerAgent is started using LocalSystem (as opposed to a domain
> account) then skip step 3.
> 3. On that box, log onto NT as that account. Using Explorer, attempt to
> delete an expired backup. If that succeeds then go to Sharing Violation
> section.
> 4. Log onto NT with an account that is an administrator and use Explorer
> to
> look at the Properties|Security of the folder (where the backups reside)
> and ensure the SQLServerAgent startup account has Full Control. If the
> SQLServerAgent startup account is LocalSystem, then the account to
> consider
> is SYSTEM.
> 5. In NT, if an account is a member of an NT group, and if that group has
> Access is Denied, then that account will have Access is Denied, even if
> that account is also a member of the Administrators group. Thus you may
> need to check group permissions (if the Startup Account is a member of a
> group).
> 6. Keep in mind that permissions (by default) are inherited from a parent
> folder. Thus, if the backups are stored in C:\bak, and if someone had
> denied permission to the SQLServerAgent startup account for C:\, then
> C:\bak will inherit access is denied.
> Sharing violation:
> This is likely to be rooted in a timing issue, with the most likely cause
> being another scheduled process (such as NT Backup or Anti-Virus software)
> having the backup file open at the time when the SQLServerAgent (i.e., the
> maintenance plan job) tried to delete it.
> 1. Download filemon and handle from www.sysinternals.com.
> 2. I am not sure whether filemon can be scheduled, or you might be able to
> use NT scheduling services to start filemon just before the maintenance
> plan job is started, but the filemon log can become very large, so it
> would
> be best to start it some short time before the maintenance plan starts.
> 3. Inspect the filemon log for another process that has that backup file
> open (if your lucky enough to have started filemon before this other
> process grabs the backup folder), and inspect the log for the results when
> the SQLServerAgent agent attempts to open that same file.
> 4. Schedule the job or that other process to do their work at different
> times.
> 5. You can use the handle utility if you are around at the time when the
> job is scheduled to run.
> If the backup files are going to a \\share or a mapped drive (as opposed
> to
> local drive), then you will need to modify the above (with respect to
> where
> the tests and utilities are run).
> Finally, inspection of the maintenance plan's history report might be
> useful.
> Thanks,
> Bill Hollinshead
> Microsoft, SQL Server
>
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "JP Breton" <jpbreton@.videotron.ca> wrote in message
> news:%23CcnHHZSFHA.3088@.TK2MSFTNGP15.phx.gbl...
>

Old backup are not delete

I have setup a maintenance plan to do a daily backup of my 10 SQL BD. The
backups are running perfectly.
I also checked in the database maintenance plan to the "Remove files older
than: 1 day"
But if I check in the directory were my backups reside, I still see the last
5 daily backup?
Is there something that I forgot?
Thanks
JPJP
Have you checked that an account under SQL Server Agent runs has appropriate
permissions to delete these files?
"JP Breton" <jpbreton@.videotron.ca> wrote in message
news:%23CcnHHZSFHA.3088@.TK2MSFTNGP15.phx.gbl...
> I have setup a maintenance plan to do a daily backup of my 10 SQL BD. The
> backups are running perfectly.
> I also checked in the database maintenance plan to the "Remove files older
> than: 1 day"
> But if I check in the directory were my backups reside, I still see the
last
> 5 daily backup?
> Is there something that I forgot?
> Thanks
> JP
>
>|||Below KB might help:
http://support.microsoft.com/default.aspx?scid=kb;en-us;303292&Product=sql2k
Also, check out below great troubleshooting suggestions from Bill H at MS:
-- Log files don't delete --
This is likely to be either a permissions problem or a sharing violation
problem. The maintenance plan is run as a job, and jobs are run by the
SQLServerAgent service.
Permissions:
1. Determine the startup account for the SQLServerAgent service
(Start|Programs|Administrative tools|Services|SQLServerAgent|Startup). This
account is the security context for jobs, and thus the maintenance plan.
2. If SQLServerAgent is started using LocalSystem (as opposed to a domain
account) then skip step 3.
3. On that box, log onto NT as that account. Using Explorer, attempt to
delete an expired backup. If that succeeds then go to Sharing Violation
section.
4. Log onto NT with an account that is an administrator and use Explorer to
look at the Properties|Security of the folder (where the backups reside)
and ensure the SQLServerAgent startup account has Full Control. If the
SQLServerAgent startup account is LocalSystem, then the account to consider
is SYSTEM.
5. In NT, if an account is a member of an NT group, and if that group has
Access is Denied, then that account will have Access is Denied, even if
that account is also a member of the Administrators group. Thus you may
need to check group permissions (if the Startup Account is a member of a
group).
6. Keep in mind that permissions (by default) are inherited from a parent
folder. Thus, if the backups are stored in C:\bak, and if someone had
denied permission to the SQLServerAgent startup account for C:\, then
C:\bak will inherit access is denied.
Sharing violation:
This is likely to be rooted in a timing issue, with the most likely cause
being another scheduled process (such as NT Backup or Anti-Virus software)
having the backup file open at the time when the SQLServerAgent (i.e., the
maintenance plan job) tried to delete it.
1. Download filemon and handle from www.sysinternals.com.
2. I am not sure whether filemon can be scheduled, or you might be able to
use NT scheduling services to start filemon just before the maintenance
plan job is started, but the filemon log can become very large, so it would
be best to start it some short time before the maintenance plan starts.
3. Inspect the filemon log for another process that has that backup file
open (if your lucky enough to have started filemon before this other
process grabs the backup folder), and inspect the log for the results when
the SQLServerAgent agent attempts to open that same file.
4. Schedule the job or that other process to do their work at different
times.
5. You can use the handle utility if you are around at the time when the
job is scheduled to run.
If the backup files are going to a \\share or a mapped drive (as opposed to
local drive), then you will need to modify the above (with respect to where
the tests and utilities are run).
Finally, inspection of the maintenance plan's history report might be
useful.
Thanks,
Bill Hollinshead
Microsoft, SQL Server
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"JP Breton" <jpbreton@.videotron.ca> wrote in message news:%23CcnHHZSFHA.3088@.TK2MSFTNGP15.phx.gbl...
>I have setup a maintenance plan to do a daily backup of my 10 SQL BD. The backups are running
>perfectly.
> I also checked in the database maintenance plan to the "Remove files older than: 1 day"
> But if I check in the directory were my backups reside, I still see the last 5 daily backup?
> Is there something that I forgot?
> Thanks
> JP
>
>|||Thanks Uri, thanks Tibor,
The SQL agent is ruuning with domain admin rights (I know it should not be
that way)
But I will still verify to make sure that the account can delete files.
Regards
JP
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23fxRENZSFHA.3336@.TK2MSFTNGP10.phx.gbl...
> Below KB might help:
> http://support.microsoft.com/default.aspx?scid=kb;en-us;303292&Product=sql2k
>
> Also, check out below great troubleshooting suggestions from Bill H at MS:
>
> -- Log files don't delete --
> This is likely to be either a permissions problem or a sharing violation
> problem. The maintenance plan is run as a job, and jobs are run by the
> SQLServerAgent service.
> Permissions:
> 1. Determine the startup account for the SQLServerAgent service
> (Start|Programs|Administrative tools|Services|SQLServerAgent|Startup).
> This
> account is the security context for jobs, and thus the maintenance plan.
> 2. If SQLServerAgent is started using LocalSystem (as opposed to a domain
> account) then skip step 3.
> 3. On that box, log onto NT as that account. Using Explorer, attempt to
> delete an expired backup. If that succeeds then go to Sharing Violation
> section.
> 4. Log onto NT with an account that is an administrator and use Explorer
> to
> look at the Properties|Security of the folder (where the backups reside)
> and ensure the SQLServerAgent startup account has Full Control. If the
> SQLServerAgent startup account is LocalSystem, then the account to
> consider
> is SYSTEM.
> 5. In NT, if an account is a member of an NT group, and if that group has
> Access is Denied, then that account will have Access is Denied, even if
> that account is also a member of the Administrators group. Thus you may
> need to check group permissions (if the Startup Account is a member of a
> group).
> 6. Keep in mind that permissions (by default) are inherited from a parent
> folder. Thus, if the backups are stored in C:\bak, and if someone had
> denied permission to the SQLServerAgent startup account for C:\, then
> C:\bak will inherit access is denied.
> Sharing violation:
> This is likely to be rooted in a timing issue, with the most likely cause
> being another scheduled process (such as NT Backup or Anti-Virus software)
> having the backup file open at the time when the SQLServerAgent (i.e., the
> maintenance plan job) tried to delete it.
> 1. Download filemon and handle from www.sysinternals.com.
> 2. I am not sure whether filemon can be scheduled, or you might be able to
> use NT scheduling services to start filemon just before the maintenance
> plan job is started, but the filemon log can become very large, so it
> would
> be best to start it some short time before the maintenance plan starts.
> 3. Inspect the filemon log for another process that has that backup file
> open (if your lucky enough to have started filemon before this other
> process grabs the backup folder), and inspect the log for the results when
> the SQLServerAgent agent attempts to open that same file.
> 4. Schedule the job or that other process to do their work at different
> times.
> 5. You can use the handle utility if you are around at the time when the
> job is scheduled to run.
> If the backup files are going to a \\share or a mapped drive (as opposed
> to
> local drive), then you will need to modify the above (with respect to
> where
> the tests and utilities are run).
> Finally, inspection of the maintenance plan's history report might be
> useful.
> Thanks,
> Bill Hollinshead
> Microsoft, SQL Server
>
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "JP Breton" <jpbreton@.videotron.ca> wrote in message
> news:%23CcnHHZSFHA.3088@.TK2MSFTNGP15.phx.gbl...
>>I have setup a maintenance plan to do a daily backup of my 10 SQL BD. The
>>backups are running perfectly.
>> I also checked in the database maintenance plan to the "Remove files
>> older than: 1 day"
>> But if I check in the directory were my backups reside, I still see the
>> last 5 daily backup?
>> Is there something that I forgot?
>> Thanks
>> JP
>>
>