Room Availability

Nov 23, 2005

My problem is trying to calcuate whether a room is booked during a date
period.

I have a table with two columns (Start and End date).

I need some SQL code to calculate whether a room is booked during a date
range.

e.g.

The booking entry is:

Start
21/11/2005

End
25/11/2005

Any help on this would be appreciated.

The End Date indicates the last night of the stay.

Regards,

Steven



*** Sent via Developersdex http://www.developersdex.com ***

View 5 Replies


ADVERTISEMENT

Database Design-room Availability

Jan 24, 2008

Hi,

I am developing a .Net application for a Guest house for my final year project. I'm using C# and SQL Server. I want a way to look up if a room is available or not on a particular date.

First I came up with...
Room: Room_id(PK), Room_type, Room_rate_pp, Room_availability

but how can I distinguish whether a room is available on a particular date? I think Room_availability is useless in this table because it can't do this. Do I need some sort of calendar table or something?

Your help with this would be greatly appreciated. it's annoying me so much, and I can't move on with the project until I have my database finalised :eek:

Thanks,

Sean

View 1 Replies View Related

Select Records From A Room

Aug 22, 2005

i need a script that:
select all records from a room, if the records in that room have a recordcount less then 100 records continue with next room until
we have 100 records, the next time i run this script, i must give me other rooms (random)

View 9 Replies View Related

DBCC DBREINDEX Running Out Of Room

May 16, 2000

I am trying to reindex a large table, and cannot because there isn't enough room on the the primary filegroup. the database consistes of one physical file in the primary filegroup. the table is over 50% of the size of the database. When the table is less than 50% of the size of the database, I do not see this problem.

BTW, the only index on the table is the primary key which consists of two columns, one is an integer and the other datetime.

It seems as if SQL server needs 1x the current size of the table to be free in order to reindex? Is this the case?

It is not an option for me to allow the database to autogrow. Is there anything else I can do?

Thanks for your help!

View 3 Replies View Related

Not Enough Room On C: When I Try To Install SQL Eval 2005 (Help)

Feb 7, 2006

I downloaded the 800 mb file (32bit) on my XP (SP2) box and it comes up with a message that I do not have enough disk space on c: drive. Well I have 180GB of space, so that cant be it. Is it because it requires an NTSF drive ad not a FAT32 drive?



View 1 Replies View Related

C Part Running Out Of Room, Large MDF, LDF Files

Sep 20, 2005

Hi my data files sit in the default directories and I think they are causing my partition to run out of space. I mainly use one db that I created but don't use the others (ie master, model, tempdb, etc). Yet I see their MDF and LDF files are growing. What can I do to shrink them down or perhaps move them off to a larger partition after shrinking?

View 6 Replies View Related

Using Triggers For Email Address And Room Booking

Nov 30, 2006

this is what i am looking for,

A client with an email address that does not end in uk cannot make a room booking

Any ideas

View 9 Replies View Related

Want 2 Store Multiple Room Numbers Of A Hotel In A Single Column Using SQL Server2k.

Jan 15, 2004

Hi!
Want 2 store Multiple room numbers of a hotel in a single column using SQL Server2k.

Can anybody tell me how to do it??

Thanx.

View 2 Replies View Related

Recovery :: Migrating Existing Availability Group To New Datacenter Availability Group

Nov 20, 2015

need to migrate a cluster with an AG dtabases to new data center cluster with AG.

I was wondering if is possible to do mirroring on top of the AG configuration? or what other options could be to migrate a cluster that has 3 nodes and setup the ag databases to a new datacenter.

View 17 Replies View Related

Testing For NT And SQL Availability

Apr 13, 2001

I want to run remote procs from a local - central proc, but don't want to crash my proc if the remote NT Server or SQL Server is not available.
So, I want to test for NT and SQL availability first.

Here's my code.
====================
DECLARE
@DBName varchar(22),
@QueryString NVARCHAR(130),
@Resultsint,
@ResultsTxtvarchar(31)

/* I find the server-dbasename name in a lookup table, and then build dynamic script */
SELECT @DBName = "<SRVRNAME~DBASENAME>"
SELECT @QueryString = N'master..xp_cmdshell "ECHO >'
+ SUBSTRING(@DBName, 1,6)
+ 'pipesqlquery", no_output'
EXEC @Results = sp_executesql @QueryString

SELECT @Results /* <-- testing here.... */

=====================

If the NT / SQL is running, "@Results" should = 0 (success on the ECHO to the PIPE)
If the NT / SQL is NOT running, "@Results" should = 1 (error on the ECHO to the PIPE)

If I test in QA, I get the expected "@Results" values.

If I run the proc, I get "@Results" = 0 for both events, and them my proc fails on the remote proc call if the NT / SQL is NOT running.

I don't know how to write DMO in TSQL to try that.
I have also tried using 'odbcping' too.

HINTS? Better way to test remote NT / SQL is NOT running?

Thanks in advance.

View 1 Replies View Related

High-Availability

Mar 2, 2004

Hello everybody,
We are starting new project
Customer validation with minimum wait time.
How to insure High-Availability?
We have 2 standard servers and in past used custom log shipping.

Log shipping still requre manual intervention ,while goal to switch
between servers automaticly.

Clustering is a last possible solution.

Could someone recomend any other soluion or products?

Thank you

Alex

View 1 Replies View Related

Hi Availability && DR For Large No. Of DBs

Feb 11, 2005

Hi,

I want some help for this particular scenario.

I have more than 350 Databases growing on an average of 5 Databases per month.

I am concernd about the DR Strategy to be adopted.

Can any one help me

View 1 Replies View Related

Checking For Availability

May 22, 2007

i'm not fluent with sql and i have a question to ask..

if i want to check whether a product is available between two dates, how can i do so? for example, i want to check whether it's available between 5/23/2007 to 5/25/2007..

thanks

View 11 Replies View Related

Server Availability

Jan 20, 2006

I am in the process of setting up server replication using the Central Publisher Model. We are doing this for application availability. The application is a .NET app and this application uses the SQL Server name in the connection string. As far as I know we can€™t have two severs on the same domain with the same name. So if our primary server (server A) goes down and that server name is in the connection string how does the application get redirected to our backup server (server B). Thanks for the help.

View 1 Replies View Related

Carer Availability

Nov 17, 2007

Carer and patients.
Carer should be at work with patient
each carer gives his shedule day by day exple:

carer1

monday
from 02/01/2000 15:30 to 03/01/2000 15:30
tuesday
from 03/01/2000 15:30 Ã 04/01/2000 15:30

wednesday
off

thursday
from 05/01/2000 10:00 to 05/01/2000 12:00
thursday again 05/01/2000 14:00 to 05/01/2000 16:00
and so on...for staff2 and staff3...

Question : witch staff is available for patient x who need a carer from 02/01/2000 15:30 to 04/01/2000 15:30

Note : carer mast be available all long of the duration of help
Thanks
structure table(id,start,finish,idstaff)

View 1 Replies View Related

Availability During ETL Processing

Dec 5, 2006

Hi,

I am in the midst of designing a new Data Warehouse system. As we get further into the design of the system, the more we are realising how complex our ETL is going to be and that the amount of time it will take to run could be significant i.e. a few days! My question is obviously I don't want to have a down time in my relational system for this long and prevent my users from accessing the data for days at a time each month. So what functionality should I be looking at to allow me to maintain a working copy of the data that users can query whilst I perform database updates and then perform a quick promotion of the updated data to users for querying?

If you can point me in the direction of the right functionality in SQL Server 2005 and possible some relevant white papers that cover this sort of scenario I would be grateful.

regards

Colin

View 1 Replies View Related

Database Availability Issue

Oct 24, 2007

I have a large db that goes through regular maintenance
every week. The problem seems to be that while the db is re-indexing some of my
key tables I get time out errors.   Are there any suggestions on how I can combat
this problem.  Management has tasked me
with having 24 hour access to the db because if people aren’t completing there
transactions we don’t get paid.  I have
also noticed the timeout issue when we are running in files that create new
records.  Is this a basic problem with
the way the db is structured?  Are they
any tools that I can use to change our process so that we can maintain the 24
hour access to the db.  How are other
companies maintaining 24 hour access to there db?

 

 

Thanks in advance.

 

 

Don

View 1 Replies View Related

High Availability On MS SQL SERVER2000

Jan 19, 2003

Hi,
I am new in SQL SERVER.I wanted to setup high availability database.It would be great if any one could answers my questions please.
-What are the options availability for HA except clustering?
-How to set up log shipping HA ?
-How to monitor log shipping?
-Is standby DB and log shipping same ?
-Can I setup log shipping without backup/restore method.Like I have to create db1 on server A and create db1 on server B and then configure log shipping?
-Is it necessary to ship log for master database or only user Database?
Thx
-Blace

View 1 Replies View Related

Clustering For Availability And Performance

Aug 19, 2007

Hi,
I'm a businessperson, not a software engineer, so please bear with me if my questions seem simple.

We are about to migrate from MS SQL Server 2000 to 2005. In our 2000 deployment, we have a primary server, with real-time replication to a backup. If we have a hardware failure, we do a manual failover to the backup server. This has served us well for years, with decent performance and no data loss. The SQL server is accessed by a pair of IIS servers, which use network load balancing to split the load between them.

As part of the forthcoming migration to SQL 2005, we are going to a hardware platform with 2 SQL servers sharing a single storage array. We would like to get the performance benefit of utilizing both of the SQL servers to handle requests simultaneously, and not just have the second server as a backup. Ideally, the two IIS servers would dish requests to both SQL servers, either randomly or in some sort of load-balanced manner.

So here is my question: how can we have both SQL servers active and handling requests simultaneously, achieving both high perfromance and high uptime?

If it is not supported natively in SQL Server 2005, is there a third-party software solution that can achieve this?

Finally, where else should I go to do further research on this subject?

Thanks in advance for any help you can offer.

View 4 Replies View Related

High Availability On Particular Layers

Oct 27, 2013

I have to describe Microsoft SQL High Availability options in the following layers: infrastructure, middleware and application. I know there are following options available: failover clustering, replication, mirroring and AlwaysOn but I am not sure in which layer each of them are.

View 1 Replies View Related

High Availability With Log Shipping

May 17, 2004

I have implemented log shipping between 2 databases, the transaction log size normally between 10mb - 50mb every 15 minutes during normal working hours, but it grows to 9GB when we run database optimization job and that makes it hard and long to transfer and apply the transaction log on the other database. Does anybody encountered a situation like this and is there a way to minimize the size of the Trans log after the optimization job?

Thanx

View 1 Replies View Related

Join For Testing Availability

Jun 12, 2007

hi all,

how do i left join some table just to check the availabilty of the data.. say... if id in tblA exists in tblB, how do i just select say flag='Y' without joining the data in tblB that could have more than 1 record ?

tblA
a1
a2

tblB
a1
a1
a1

i dont want to select what i join in tblB, just to check the availability... so in this case :-
a1 ----> Y
a2 ----> N

~~~Focus on problem, not solution ¯(º_o)/¯ ~~~

View 13 Replies View Related

What Is The Best Availability And Backup Solution?

Feb 21, 2007

Hi Everyone,I'm working on a site that is running MS SQL 2000. They performregular backups of databases and log files and in the event of adisaster they have a second backup server.At present they regularly copy the backup up files from the productionserver to the standby server. The plan, in the event of a disaster, isto restore these backups onto the standby server and change the dnsrecords so that client machines will point to the standby server.Is there a better way?Thanks for any advice,Danny

View 2 Replies View Related

Sql Server Availability From SSIS

Jul 11, 2007

Hi Guys,



I'm in need of your help. Before running my dataflow task i want to check sql server availability on the network.

If not found then i want to stop the processing of the package.

My last post also has the same question but it wasn't answered yet so......... just check the 2nd last post and the last post:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1834575&SiteID=1

Is there are way to check from SSIS package?



Thank you



Gemma

View 2 Replies View Related

How Can I Verify The Availability Of An SQL Server

Nov 18, 2006

Hello everyone,

I have an ASP application mainly connected to one SQL database that works great but now I am trying to add some functionality that requires to connect to another remote SQL server. Till now all is fine except that the remote SQL server is not always online and of course when this happens my ASP application stops with the following error:

Error Type:
Microsoft OLE DB Provider for SQL Server (0x80004005)
[DBNETLIB][ConnectionOpen (Connect()).]Specified SQL server not found.


in my Global.asa I setup my session variables for DSN connections and in my pages I call my SQL connection as follow:

Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open Session("MySQL")

SQL = "my SQL statement here;"
Set RS = Conn.Execute(SQL)

Every time the page hits the Conn.Open line I get the error if the remote SQL is not online!!!

Is there a way I can check a sort of returned error code holding the connection status before getting to the Conn.Open line???

Any help would be greatly appreciated.

Thx in advance





View 6 Replies View Related

High Availability And Scalability ...

Jul 12, 2006

We have a multi-lingual website (English, Spanish and German). We have a table called Posts that is potentially getting really big.

We are in the initial design phase of the database and would like to know what the experts are suggesting to keep our database mean and lean in the long run.

We have been talking about splitting the database up into 3 separate databases, one for English, one for Spanish and one for German. The language specific databases would also be hosted in countries where the language is spoken eg. the German database would be hosted in Germany.

Or maybe database partitioning by language???

Making changes to 3 databases once launched seems like a nightmare. It would be nice to have one main database and maybe 2 (Spanish and German) €œsatellite€? databases or something like that €“ any ideas???.

Any suggestions of how to deal with this problem the best way would be greatly appreciated. We are using SQL Server 2005.

Newbie!

View 4 Replies View Related

Balancing Scalability With Availability

Jun 16, 2006

We are beginning to design a new application with SQL Server 2005. Our current production environment is slated to be two SQL Server 2005 machines with the databases residing on an EMC SAN. We have requirements to both have automatic failover between servers for availability and also be able to balance the load over two hot servers for scalability.

Can anyone point me in the right direction for things I need to consider in order to be able to implement both of these requirements? Can I implement database mirroring (for failover) and transactional replication (for balancing) given the hardware configuration I'v mentioned? Is more information needed? Where should I turn next?

I am coming off a mainly Oracle background for the last ten or so years with a smattering of SQL Server mixed in. I've tried to hit the ground running on this project, but sometimes find myself hitting the wall running instead.

Thanks,

Larry

View 3 Replies View Related

Need Of Username Check Availability From Database

Jun 3, 2008

i want to check the new username check availability from database in a same page ,i did in normal coding
i need ajax or java scripts method because this page look and feel is not good
thanks,
@mbi

View 6 Replies View Related

Temp Table - Trying To Get Availability Between Two (2) T-SQl Steps

Oct 29, 2005

Good Evening!
First and foremost any help would be greatly appreciated!My question is how to use a temp table within two (2) seperate called stored procedures?
I am using MS ReEporting Services and I call a stored proc that creates a temp table and executes some summarization code - so the scenario is as follows:
1.     I select the first MS REporting services from a menu item - which creates the Temp Table (within a stored procedure) and the report is displayed
2.     Within option (1) (MSRE - I have defined a navigation link to call another report - which uses a stored procedure) which I would like to access the temp table created in step 1.I know that #Temp_Table will only be available for step 1 and I have tried to use##Temp_Table which should be available for my session -  which maybe I am not understanding correctly  in that I thought a ##Temp_Table would be available for my session until no other T-Sql scripts are trying to access or I sign off!I don't really want to create a table and have it "hang around" until someone selects the menu option again to select the program again which then the T-Sql will then Drop the table.Any insight or help is sincerely appreciated!Best regards

View 2 Replies View Related

Products To Monitor Database Availability

Nov 4, 2003

Are there any other products out there to monitor database availability
in SQL server 2000 beside Tivoli by IBM?

Thanks;
Lava

View 1 Replies View Related

Day Of Week Comparison For Contact Availability?

Sep 19, 2013

I am trying to figure out the availability of a contact by comparing their available flag to the current day of the week. IE, the contact has 7 BIT fields in the table,1 for each day of the week, being T or F depending on if they are available. I'm trying to figure out how to read the correct field based on the day of the week to see if their available (T) that day for a notification. Each field name in the table is as such: mon, tue, wed, etc. I can get the current DOW from sql and trim it to the same length and case of the field names to try and figure out which one I need to check whether that fields contents are true or not.

View 14 Replies View Related

Failover, Cluster, High Availability

May 18, 2004

Hello,
Does any one know, any software out there that can provide a solid failover / cluster / high availability solution for SQL Server 2000 Databases.
I have tried Incepto but it requires an extra column in every single table that involves in Replication and its not gonna work

So Please advise.

Thanks,
imransi.

View 2 Replies View Related

SQL Server In A High Availability Environment

May 26, 2004

I've been asked to look into the possibility of using SQL Server in a high availability environment. We have a few web based applications that use SQL Server back end DBs. What we are looking into is whether we can use multiple instances (on multiple physical servers) of SQL Server using some type of clustering/load balancing. I haven't worked with SQL Replication before, so I'm not even sure where to start in exploring the possible avenues we can explore.

Can anyone push me in the right direction? Any info would be greatly appreciated!

Thanks,

Bill

View 5 Replies View Related







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