Showing posts with label instances. Show all posts
Showing posts with label instances. Show all posts

Friday, March 30, 2012

More problems attaching a database

Hi Mike,

I've had a look at the white paper on use instances and also stopped using Management Studio, as you suggested. The problem is that I can run my application from VWD quite happily, until for no reason the application can't connect to the database. This happens ramdomly and is very frustrating. I have worked out a way to correct this problem with the following method (I don't know if this is correct but it's the only work around I know.

1) I close down VWD and open Management Studio,

2) I right click to attach a database, and then navigate to the .mdf file for the database, and click to attach it. I then delete the existing icon for that database (which I can't acess anyway, it only shows me the main icon but not the tables)

3) I rename the new instance of the database to the correct name (minus path info etc)

4) I create an SQL script as follows:

EXEC sp_grantlogin 'jon\ASPNET'

(This line executes correctly),

Then I enter these lines:

USE BalloonShop \*name of database \*

EXEC sp_grantdbaccess 'jon\ASPNET'

(At this stage when I execute the query, Management Studio informs me that this name already exists in the database and so doesn't execute)

5) I now close out of Management Studio and re-open VWD, and I can now run my application correctly.

I know I've got some configuration settings wrong somewhere but I find the whole user instance thing confusing. For the record I'm running the appllication through VWD's built in web server, I did originally have it through IIS but I moved it (this will explain the confusion of locations from my first post, I gave you the original location, sorry about that).

Any advice you can give would be gratefully recieved, ie is there an easy way to reconfigure my settings to make everything work as expected or have I got to start the database again from scratch (not a pleasent thought). Also is there an idiots guide to SQL Server Express anywhere that I can read.

Jon

ps I've just realised that I get the 'can't connect to database problem when running the application after I've made a change to the database from VWD ie adding a new stored proceedure, Don't know if this helps, but better you get the full picture.

I havn't read your first post.... what is the summary of what you are trying to acheive.

I have used SQL Express with VWD for a while now and have had no problems moving the database from my VWD environment to a production system. The first thing is that when using the VWD the Databases are created in the APP_Data directory and the connection string used inside the web.config file has a parameter that attaches the database at runtine to the Database Engine it also configures the security so only the Windows Account that has attached the Database can access the Database Files (User Instances). When moving to production systems or attaching it to an existing Engine the first step I would do is to take all of the files (MDF and LDF) for the database and put them in another directory, away from the ASP_Data directory in the root of your web application. Normally this would be the default data directories for the Database server that you are going to use. Next inside the management studio attach the database files and set up the security for the user that you are going to be using.

In my case here I normally create an application pool for the Web site to use in IIS and set the app pool to run under a user, I would then configure this user to have the access needed to run the database system ie Stored Procs and Table access. The last stage is to change the connection string in the web.config file for your application to reflect the new server. Making sure that the attach Database parameters are removed.

Hope this helps.

Monday, March 19, 2012

monitoring sql error log for keywords

Hello,
We have Patrol monitoring running on our SQL Server 2000/2005 instances.
One of the alerts for Patrol is ErrorLogUpdates.
This sends out an alert when a particular keyword is found in the error log.
There are two parameters I can specify, INCLUDE keywords and EXCLUDE keywords.
I have been taking a look at quiet a few of our error logs and not making
any headway so far.
Does anyone have any suggestions as to what I can put in INCLUDE list and
EXCLUDE list of keywords to look for in SQL error log.
Thanks in advance.
Cheers.
Kunal.
Hi
Products like MOM come with preconfigured scripts, therefore I would expect
the software vendor to supply this.
John
"kunalap" wrote:

> Hello,
> We have Patrol monitoring running on our SQL Server 2000/2005 instances.
> One of the alerts for Patrol is ErrorLogUpdates.
> This sends out an alert when a particular keyword is found in the error log.
> There are two parameters I can specify, INCLUDE keywords and EXCLUDE keywords.
> I have been taking a look at quiet a few of our error logs and not making
> any headway so far.
> Does anyone have any suggestions as to what I can put in INCLUDE list and
> EXCLUDE list of keywords to look for in SQL error log.
> Thanks in advance.
> Cheers.
> Kunal.
|||First, you really have to determine what you want to be alerted on. For
instance, we monitor all the SQL errors with severity 17 or higher, backup
failure, port binding failure, restarts, and so on. Each of rthese error
types has a certain patterns that you can use. Unfortunately, MS has not been
very good at keeping the error messages consistent on many dimensions, making
life somewhat difficult.
Anyway, for port binding failure for instance, you can look for the
following text string; "SuperSocket Info: Bind failed on TCP port", and for
severe SQL errors, you may want to enumerate all the patterns like "Severity:
17", replacing 17 with 18, 19, 20, and so on. Patrol has a perl like language
and should be very easy to specific a regular expression pattern here.
Linchi
"kunalap" wrote:

> Hello,
> We have Patrol monitoring running on our SQL Server 2000/2005 instances.
> One of the alerts for Patrol is ErrorLogUpdates.
> This sends out an alert when a particular keyword is found in the error log.
> There are two parameters I can specify, INCLUDE keywords and EXCLUDE keywords.
> I have been taking a look at quiet a few of our error logs and not making
> any headway so far.
> Does anyone have any suggestions as to what I can put in INCLUDE list and
> EXCLUDE list of keywords to look for in SQL error log.
> Thanks in advance.
> Cheers.
> Kunal.

monitoring sql error log for keywords

Hello,
We have Patrol monitoring running on our SQL Server 2000/2005 instances.
One of the alerts for Patrol is ErrorLogUpdates.
This sends out an alert when a particular keyword is found in the error log.
There are two parameters I can specify, INCLUDE keywords and EXCLUDE keywords.
I have been taking a look at quiet a few of our error logs and not making
any headway so far.
Does anyone have any suggestions as to what I can put in INCLUDE list and
EXCLUDE list of keywords to look for in SQL error log.
Thanks in advance.
Cheers.
Kunal.Hi
Products like MOM come with preconfigured scripts, therefore I would expect
the software vendor to supply this.
John
"kunalap" wrote:
> Hello,
> We have Patrol monitoring running on our SQL Server 2000/2005 instances.
> One of the alerts for Patrol is ErrorLogUpdates.
> This sends out an alert when a particular keyword is found in the error log.
> There are two parameters I can specify, INCLUDE keywords and EXCLUDE keywords.
> I have been taking a look at quiet a few of our error logs and not making
> any headway so far.
> Does anyone have any suggestions as to what I can put in INCLUDE list and
> EXCLUDE list of keywords to look for in SQL error log.
> Thanks in advance.
> Cheers.
> Kunal.|||First, you really have to determine what you want to be alerted on. For
instance, we monitor all the SQL errors with severity 17 or higher, backup
failure, port binding failure, restarts, and so on. Each of rthese error
types has a certain patterns that you can use. Unfortunately, MS has not been
very good at keeping the error messages consistent on many dimensions, making
life somewhat difficult.
Anyway, for port binding failure for instance, you can look for the
following text string; "SuperSocket Info: Bind failed on TCP port", and for
severe SQL errors, you may want to enumerate all the patterns like "Severity:
17", replacing 17 with 18, 19, 20, and so on. Patrol has a perl like language
and should be very easy to specific a regular expression pattern here.
Linchi
"kunalap" wrote:
> Hello,
> We have Patrol monitoring running on our SQL Server 2000/2005 instances.
> One of the alerts for Patrol is ErrorLogUpdates.
> This sends out an alert when a particular keyword is found in the error log.
> There are two parameters I can specify, INCLUDE keywords and EXCLUDE keywords.
> I have been taking a look at quiet a few of our error logs and not making
> any headway so far.
> Does anyone have any suggestions as to what I can put in INCLUDE list and
> EXCLUDE list of keywords to look for in SQL error log.
> Thanks in advance.
> Cheers.
> Kunal.

Monday, March 12, 2012

Monitoring Production Instances.

We will soon have 200 + production instances. In an effort to be more
pro active, I am looking for a way to monitor jobs, both failed and
long running, Disk space, and other such things like CPU load etc.
I would appreicate any suggestions you might have on accomplishing
this. For instance, is there anything in reporting services that might
help accomplish this ? Most of the instances are 2k, but we also have
some 2k5.
Best Regards
SGB(sgbergkam@.gmail.com) writes:
> We will soon have 200 + production instances. In an effort to be more
> pro active, I am looking for a way to monitor jobs, both failed and
> long running, Disk space, and other such things like CPU load etc.
> I would appreicate any suggestions you might have on accomplishing
> this. For instance, is there anything in reporting services that might
> help accomplish this ? Most of the instances are 2k, but we also have
> some 2k5.

I think you should look at MOM, Microsoft Operations Manager.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx