Showing posts with label office. Show all posts
Showing posts with label office. Show all posts

Sunday, March 25, 2012

database files locked out by SQL?

I have a SQL2005 SP2 server hosting several databases for different
applications. Recently i stood up a virtual server with Office
Communications Sever 2007 using my existing physical SQL 2005.
Everytime a reboot is required on the SQL server, the databases for OCS get
locked out. It took me a while to figure out what was going on, at first i
thought they were getting corrupted. After using SysInternals Process
explorer, I was able to determine that it is SQL itself that is locking the
database files and logs out, but apparently it isn't communicating that with
itself because when I try to bring them online, i get an error stating that
the files are in use or the disk is full.
Has anyone seen this before? I'm not an SQL expert by any means, so please
bear with me.
Cheers
Joe> Everytime a reboot is required on the SQL server, the databases for OCS get
> locked out.
I don't understand exactly what is meant here. The database files are indeed
locked by the SQL Server process, and that is expected. The files are not
supposed to be accessed by anything other than SQL Server. What error
messages are getting? What are you trying to accomplish that is prevented by
the files being locked?
Linchi
"Josef Hanning" wrote:
> I have a SQL2005 SP2 server hosting several databases for different
> applications. Recently i stood up a virtual server with Office
> Communications Sever 2007 using my existing physical SQL 2005.
> Everytime a reboot is required on the SQL server, the databases for OCS get
> locked out. It took me a while to figure out what was going on, at first i
> thought they were getting corrupted. After using SysInternals Process
> explorer, I was able to determine that it is SQL itself that is locking the
> database files and logs out, but apparently it isn't communicating that with
> itself because when I try to bring them online, i get an error stating that
> the files are in use or the disk is full.
> Has anyone seen this before? I'm not an SQL expert by any means, so please
> bear with me.
> Cheers
> Joe|||Sorry, guess I should have been more clear with the issue. After the reboot,
the databases will not come online properly. OCS gets application connection
errors, and you can't actually expand the database folder within SQL manager.
If I try and take the databases offline and then online again, I get a file
in use access error. I've managed to get the databases online by stopping
all SQL services and restarting but I shouldn't have to do this after a
reboot.
"Linchi Shea" wrote:
> > Everytime a reboot is required on the SQL server, the databases for OCS get
> > locked out.
> I don't understand exactly what is meant here. The database files are indeed
> locked by the SQL Server process, and that is expected. The files are not
> supposed to be accessed by anything other than SQL Server. What error
> messages are getting? What are you trying to accomplish that is prevented by
> the files being locked?
> Linchi
> "Josef Hanning" wrote:
> > I have a SQL2005 SP2 server hosting several databases for different
> > applications. Recently i stood up a virtual server with Office
> > Communications Sever 2007 using my existing physical SQL 2005.
> >
> > Everytime a reboot is required on the SQL server, the databases for OCS get
> > locked out. It took me a while to figure out what was going on, at first i
> > thought they were getting corrupted. After using SysInternals Process
> > explorer, I was able to determine that it is SQL itself that is locking the
> > database files and logs out, but apparently it isn't communicating that with
> > itself because when I try to bring them online, i get an error stating that
> > the files are in use or the disk is full.
> >
> > Has anyone seen this before? I'm not an SQL expert by any means, so please
> > bear with me.
> >
> > Cheers
> >
> > Joe|||"Josef Hanning" <JosefHanning@.discussions.microsoft.com> wrote in message
news:BEC23679-2F5F-448E-BBC4-5ECA8C8E6C70@.microsoft.com...
> Sorry, guess I should have been more clear with the issue. After the
> reboot,
> the databases will not come online properly. OCS gets application
> connection
> errors, and you can't actually expand the database folder within SQL
> manager.
> If I try and take the databases offline and then online again, I get a
> file
> in use access error. I've managed to get the databases online by stopping
> all SQL services and restarting but I shouldn't have to do this after a
> reboot.
Sounds to me like something is competing for the files - first one wins and
locks the other(s) out. Do you have multiple instances of sql server
installed - each of which is configured to use the same user database(s)?|||Scott,
Thanks for the reply. There looks to be 3 instances of SQL running on the
box, the default, the RTC instance created by the OCS installation, and an
OCS instance installed using SQL setup by a co-worker. The OCS instance has
never been used to my knowledge and I have not done any database
configuration to any of the other instances myself.
From your question I gather that I need to somehow configure my RTC
databases for OCS to be used by only one of these instances of SQL?
thanks!
-Joe
"Scott Morris" wrote:
> "Josef Hanning" <JosefHanning@.discussions.microsoft.com> wrote in message
> news:BEC23679-2F5F-448E-BBC4-5ECA8C8E6C70@.microsoft.com...
> > Sorry, guess I should have been more clear with the issue. After the
> > reboot,
> > the databases will not come online properly. OCS gets application
> > connection
> > errors, and you can't actually expand the database folder within SQL
> > manager.
> > If I try and take the databases offline and then online again, I get a
> > file
> > in use access error. I've managed to get the databases online by stopping
> > all SQL services and restarting but I shouldn't have to do this after a
> > reboot.
> Sounds to me like something is competing for the files - first one wins and
> locks the other(s) out. Do you have multiple instances of sql server
> installed - each of which is configured to use the same user database(s)?
>
>|||"Josef Hanning" <JosefHanning@.discussions.microsoft.com> wrote in message
news:84729A32-1E6D-4CED-9343-A1FE3EC35E02@.microsoft.com...
> Scott,
> Thanks for the reply. There looks to be 3 instances of SQL running on the
> box, the default, the RTC instance created by the OCS installation, and an
> OCS instance installed using SQL setup by a co-worker. The OCS instance
> has
> never been used to my knowledge and I have not done any database
> configuration to any of the other instances myself.
> From your question I gather that I need to somehow configure my RTC
> databases for OCS to be used by only one of these instances of SQL?
What you need to do I cannot answer. I can only say that the set of
phsyical files that comprise a database should only be used within a single
instance. Multiple instances cannot "share" a database. It sounds like
you may need to get additional expertise to help with this situation.

Saturday, February 25, 2012

Database design question

I have a database that allows a client to have many addresses some are examples would be Home, Office, Vacation Home, etc... If we are mailing to a home address we would not want to the company name or title fields to be included, oh yah all files are exported to Excel for merging. I would like to put the company name and title fields in the address table so if we are mailing to a business or office the company name and title go with it, and if it is an address other than a business or office the company name and title are blank.

Does this really break any kind of rules, if we look at it as I have stated here?

Thanks for any thoughts,Yes. It is definitely breaking rules, the rules or normalization, and my guess is that you realize this or you would not be asking this question.

And sooner or later, making a bad design choice like this will come back to haunt you.

Have an Address table, and a Person table, and a Company table, and a PersonType table, and set the attributes accordningly. The query to get the data will be a bit more complex, but you'll reap the benefits of increased data integrity for a long time...|||So if I have a design like the following, how would you suggest that I exclude the companyName and ClientTitle if I'm mailing to a home address and the client has a home and company address in the address table? Thanks for your thoughts again.

tblClients
ClientID
ClientType = Indivudal or Company, etc...
CompanyName
ClientTitle

tblAddresses
AddressID
ClientID

tblClientTypeLookup = Individual, Company, etc...