Showing posts with label system. Show all posts
Showing posts with label system. Show all posts

Tuesday, March 20, 2012

Compression feature, support for 64kb clusters?

Hi,

does the new (and future) compression feature included in katmai will support partitions formatted in 64kb?

the windows compression system required a 4kb cluster format and its not supported in other cluster size, this is a limitation when we use 64kb clusters for our database files.

Thanks.

Jerome.

The new compression feature will be done inside the SQL Server engine before data is written to disk, and is independent of the disk cluster size. So it will support 64kb formatted disk partitions.

Thanks,sqlsql

Friday, February 24, 2012

Complex dimension question

I have two dimension; 1 is a 'Users' dimension which has information about users of our system, the other is a self-referencing dimension containing industry hierarchies.

The Users dimension is linked to the Industry dimension by Industry ID.

I tried adding the Industry hierarchy to the Users dimension but when I go to browse the hierarchy all I see is IDs of the DimUser table, so I think that I did something wrong.

My goal is to add the industry hierarchy to the User dimension.
Can I do this with my current architecture?

Here are some examples of the two dimension:

DimUsers
- ID
- Name
- IndustryID (FK -> DimIndustry.ID)

DimIndustry
- ID
- IndustryName
- ParentID (FK -> DimIndustry.ID)

Thanks in advance.

Preston,

You should be able to do this using the following steps:

1.) Edit the User dimension

2.) In the "Data Source View" pane of the dimension editor, and select "Show Tables..."

3.) Add the DimIndustry table to the data source view pane

4.) Drag the "IndustryID" from your DimUsers table as a new attribute.

5.) Change the "NameColumn" property to pull the "IndustryName" column from the DimIndustry table.

6.) Create your hierarchy using the attributes you want and process.

HTH,

- Steve

Sunday, February 19, 2012

completed successfully, but not sending and no error.

hi, i have a message queue system using sql 2005 service broker.

the code and setup is the same on both dev and live database. but

soon after i restored a live backup to dev. the queue stopped

working on dev, live is ok thou. after some trouble shooting, i

found that the server is not sending the message at all, but it says

"Command(s) completed successfully" without any error messages.

setup:

--

create message type TestQueryMessage validation = none

create contract TestQueryContract (TestQueryMessage sent by initiator)

create queue TestSenderQueue

create service TestSenderService on queue TestSenderQueue

create queue TestQueueReceiver

create service TestServiceReceiver on queue TestQueueReceiver (TestQueryContract)

send message:

-

declare @.conversationhandle uniqueidentifier;

begin dialog @.conversationhandle

from service [TestSenderService]

to service 'TestServiceReceiver'

on contract [TestQueryContract]

with encryption = off;

send on conversation @.conversationhandle

message type [TestQueryMessage] ('blah blah blah');

result:

-

Command(s) completed successfully.

but when i do "select * from TestQueueReceiver", there's nothing. and i sure nothing else had picked up the messages.

please advise. thanks a lot.

Look in sys.transmission_queue on the sender's database. The transmission_status column should indicate the problem. Most likely the broker was not enabled back after the restore operation.

HTH,
~ Remus

Complete, Differential, Transaction Log -- More backup questions

Greetings all,
I am new to this Newsgroup, so forgive me if my question seems stupid.
We currently have a payroll system that runs on SQL Server 2000. We are
doing a full backup (to a local hard disk) every night of the main database,
which is about 55GB and then sending the SQL Backup off to tape. We can keep
2, maybe 3 days backup online, but space is getting tight.
I have suggested that we do 1 complete backup at the beginning of the
week, then a Differential backup every night, and a transaction log backup
every couple of hours during the day.
My question for you people. If I do the complete backup on Sunday
night, a differential on Monday and Tuesday night, and a couple of
Transaction Log backups on Wednesday, and the System crashes late Wednesday
do I have to restore both Mon and Tue differential and all the Wed
Transaction Logs and restoring the complete from Sun, or can I just restore
the Sun complete, the Tue night differential and the last Transaction Log
from Wed?
I think my actual question is: "Is the Differential backup all the
differences from the last complete or the last Differential, and does the
Transaction Log backup get everything from the last Differential?"
Thanks much
Raymond Fantasia
Fry''s Electronics
ISD DepartmentHi
answered in microsoft.public.sqlserver.newusers
Please do not multi-post as it is harder to know if the question has been
answered yet.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Ray Fantasia" <RayFantasia@.discussions.microsoft.com> wrote in message
news:A8241F2A-6630-4B96-A9A0-2CB30BEEA7E9@.microsoft.com...
> Greetings all,
> I am new to this Newsgroup, so forgive me if my question seems stupid.
> We currently have a payroll system that runs on SQL Server 2000. We are
> doing a full backup (to a local hard disk) every night of the main
> database,
> which is about 55GB and then sending the SQL Backup off to tape. We can
> keep
> 2, maybe 3 days backup online, but space is getting tight.
> I have suggested that we do 1 complete backup at the beginning of the
> week, then a Differential backup every night, and a transaction log backup
> every couple of hours during the day.
> My question for you people. If I do the complete backup on Sunday
> night, a differential on Monday and Tuesday night, and a couple of
> Transaction Log backups on Wednesday, and the System crashes late
> Wednesday
> do I have to restore both Mon and Tue differential and all the Wed
> Transaction Logs and restoring the complete from Sun, or can I just
> restore
> the Sun complete, the Tue night differential and the last Transaction Log
> from Wed?
> I think my actual question is: "Is the Differential backup all the
> differences from the last complete or the last Differential, and does the
> Transaction Log backup get everything from the last Differential?"
> Thanks much
> Raymond Fantasia
> Fry''s Electronics
> ISD Department

Complete, Differential, Transaction Log -- More backup questions

Greetings all,
I am new to this Newsgroup, so forgive me if my question seems stupid.
We currently have a payroll system that runs on SQL Server 2000. We are
doing a full backup (to a local hard disk) every night of the main database,
which is about 55GB and then sending the SQL Backup off to tape. We can kee
p
2, maybe 3 days backup online, but space is getting tight.
I have suggested that we do 1 complete backup at the beginning of the
week, then a Differential backup every night, and a transaction log backup
every couple of hours during the day.
My question for you people. If I do the complete backup on Sunday
night, a differential on Monday and Tuesday night, and a couple of
Transaction Log backups on Wednesday, and the System crashes late Wednesday
do I have to restore both Mon and Tue differential and all the Wed
Transaction Logs and restoring the complete from Sun, or can I just restore
the Sun complete, the Tue night differential and the last Transaction Log
from Wed?
I think my actual question is: "Is the Differential backup all the
differences from the last complete or the last Differential, and does the
Transaction Log backup get everything from the last Differential?"
Thanks much
Raymond Fantasia
Fry''s Electronics
ISD DepartmentHi
answered in microsoft.public.sqlserver.newusers
Please do not multi-post as it is harder to know if the question has been
answered yet.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Ray Fantasia" <RayFantasia@.discussions.microsoft.com> wrote in message
news:A8241F2A-6630-4B96-A9A0-2CB30BEEA7E9@.microsoft.com...
> Greetings all,
> I am new to this Newsgroup, so forgive me if my question seems stupid.
> We currently have a payroll system that runs on SQL Server 2000. We are
> doing a full backup (to a local hard disk) every night of the main
> database,
> which is about 55GB and then sending the SQL Backup off to tape. We can
> keep
> 2, maybe 3 days backup online, but space is getting tight.
> I have suggested that we do 1 complete backup at the beginning of the
> week, then a Differential backup every night, and a transaction log backup
> every couple of hours during the day.
> My question for you people. If I do the complete backup on Sunday
> night, a differential on Monday and Tuesday night, and a couple of
> Transaction Log backups on Wednesday, and the System crashes late
> Wednesday
> do I have to restore both Mon and Tue differential and all the Wed
> Transaction Logs and restoring the complete from Sun, or can I just
> restore
> the Sun complete, the Tue night differential and the last Transaction Log
> from Wed?
> I think my actual question is: "Is the Differential backup all the
> differences from the last complete or the last Differential, and does the
> Transaction Log backup get everything from the last Differential?"
> Thanks much
> Raymond Fantasia
> Fry''s Electronics
> ISD Department

Complete, Differential, Transaction Log -- More backup questions

Greetings all,
I am new to this Newsgroup, so forgive me if my question seems stupid.
We currently have a payroll system that runs on SQL Server 2000. We are
doing a full backup (to a local hard disk) every night of the main database,
which is about 55GB and then sending the SQL Backup off to tape. We can keep
2, maybe 3 days backup online, but space is getting tight.
I have suggested that we do 1 complete backup at the beginning of the
week, then a Differential backup every night, and a transaction log backup
every couple of hours during the day.
My question for you people. If I do the complete backup on Sunday
night, a differential on Monday and Tuesday night, and a couple of
Transaction Log backups on Wednesday, and the System crashes late Wednesday
do I have to restore both Mon and Tue differential and all the Wed
Transaction Logs and restoring the complete from Sun, or can I just restore
the Sun complete, the Tue night differential and the last Transaction Log
from Wed?
I think my actual question is: "Is the Differential backup all the
differences from the last complete or the last Differential, and does the
Transaction Log backup get everything from the last Differential?"
Thanks much
Raymond Fantasia
Fry''s Electronics
ISD Department
Hi
answered in microsoft.public.sqlserver.newusers
Please do not multi-post as it is harder to know if the question has been
answered yet.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Ray Fantasia" <RayFantasia@.discussions.microsoft.com> wrote in message
news:A8241F2A-6630-4B96-A9A0-2CB30BEEA7E9@.microsoft.com...
> Greetings all,
> I am new to this Newsgroup, so forgive me if my question seems stupid.
> We currently have a payroll system that runs on SQL Server 2000. We are
> doing a full backup (to a local hard disk) every night of the main
> database,
> which is about 55GB and then sending the SQL Backup off to tape. We can
> keep
> 2, maybe 3 days backup online, but space is getting tight.
> I have suggested that we do 1 complete backup at the beginning of the
> week, then a Differential backup every night, and a transaction log backup
> every couple of hours during the day.
> My question for you people. If I do the complete backup on Sunday
> night, a differential on Monday and Tuesday night, and a couple of
> Transaction Log backups on Wednesday, and the System crashes late
> Wednesday
> do I have to restore both Mon and Tue differential and all the Wed
> Transaction Logs and restoring the complete from Sun, or can I just
> restore
> the Sun complete, the Tue night differential and the last Transaction Log
> from Wed?
> I think my actual question is: "Is the Differential backup all the
> differences from the last complete or the last Differential, and does the
> Transaction Log backup get everything from the last Differential?"
> Thanks much
> Raymond Fantasia
> Fry''s Electronics
> ISD Department

Tuesday, February 14, 2012

Compatibility of SQL Server 7.0 with Windows 2K

Is SQL Server 7.0 compatible with the Windows 200 operating system? Are
there certain patches or service packs that need to be applied to SQL to
make this compatibility work? Thanks.

Larry"lmclaus" <lmclaus@.sandia.gov> wrote in message
news:bka37u$j4c$1@.sass2141.sandia.gov...
> Is SQL Server 7.0 compatible with the Windows 200 operating system? Are
> there certain patches or service packs that need to be applied to SQL to
> make this compatibility work? Thanks.
> Larry

http://www.microsoft.com/sql/evalua...datasheet.asp#E

Simon|||"lmclaus" <lmclaus@.sandia.gov> wrote in message
news:bka37u$j4c$1@.sass2141.sandia.gov...
> Is SQL Server 7.0 compatible with the Windows 200 operating system? Are
> there certain patches or service packs that need to be applied to SQL to
> make this compatibility work? Thanks.

Seems to be working fine here.

Ron.
--
Performance Intelligence, Inc.
Spy 4 DB2 - http://www.pireporting.com/spy4db2.html

Friday, February 10, 2012

Comparing two tables

I have two tables of "trade" data, one comes from out accounting
system, the other from text files sent to us by the counterparties
(brokers). I attacked the problem by creating two views that map the
data into a common format. I then used both of these in a UNION
query...
SELECT *
FROM vCounterpartyTrades AS c LEFT JOIN vOurTrades AS p
ON c.portfolioId = p.portfolioId AND c.cusip = p.cusip AND
c.custodianId = p.custodianId
WHERE p.quantity IS NULL OR c.quantity <> p.quantity
UNION
SELECT *
FROM vCounterpartyTrades AS c RIGHT JOIN vOurTrades AS p
ON c.portfolioId = p.portfolioId AND c.cusip = p.cusip AND
c.custodianId = p.custodianId
WHERE p.quantity <> 0 AND (c.quantity IS NULL OR c.quantity = 0)
The problem is that the UNION causes a temp table to be created. When
I try to add filters to reduce the number of rows that are returned,
the filter is applied to the temp table, not the views, so every
single query takes the same amount of time -- about 20 seconds, and
that's simply too long.
In the past I have had excellent results by replacing views with the
SQL that makes the view. So in this case, "vCounterpartyTrades as c"
is replaced by "( all of the SQL in that view ) as c". That way I can
apply any WHERE filters directly in the SQL by splicing in the WHERE
in VBA, and everything gets a lot faster.
But the problem here is that both views appear twice, on either side
of the UNION. That not only dramatically expands the resulting SQL
(both the views are pretty long as it is) but means both are run
twice. So to really speed this up I think I need to remove the UNION
and replace it with some sort of join...
SELECT *
FROM *a whole bunch of SQL* AS c, *another whole bunch of SQL* AS p
WHERE c.portfolioId = p.portfolioId AND c.cusip = p.cusip AND
c.custodianId = p.custodianId
AND (p.quantity IS NOT null AND (c.quantity IS NULL OR c.quantity = 0)
OR ( p.quantity IS NULL OR c.quantity <> p.quantity))
...is the obvious solution, but this eliminates anything where one
side or the other is null. I know there's a simple solution to this
using other join styles, but I have very little familiarity with them.
Can someone help me out?
Maury
p.s. Is anyone else having problems with MS's interface to these
groups? I can no longer post via their web site, because the post form
will not pop up.> But the problem here is that both views appear twice, on either side
> of the UNION. That not only dramatically expands the resulting SQL
> (both the views are pretty long as it is) but means both are run
> twice. So to really speed this up I think I need to remove the UNION
> and replace it with some sort of join...
I don't fully understand your requirements but is it possible to use UNION
ALL instead of just UNION? I would expect that to reduce the amount of work
that needs to be performed. Another option is to use a FULL JOIN instead of
the UNION of the LEFT/RIGHT JOINs. Maybe something like:
SELECT *
FROM vCounterpartyTrades AS c
FULL JOIN vOurTrades AS p ON
c.portfolioId = p.portfolioId AND
c.cusip = p.cusip AND
c.custodianId = p.custodianId
WHERE
p.quantity IS NULL OR
c.quantity <> p.quantity OR
(p.quantity <> 0 AND
(c.quantity IS NULL OR c.quantity = 0)
)
Hope this helps.
Dan Guzman
SQL Server MVP
"Maury Markowitz" <maury.markowitz@.gmail.com> wrote in message
news:a7f0ed7f-982e-4c41-9123-671e1958e37b@.f10g2000hsf.googlegroups.com...
>I have two tables of "trade" data, one comes from out accounting
> system, the other from text files sent to us by the counterparties
> (brokers). I attacked the problem by creating two views that map the
> data into a common format. I then used both of these in a UNION
> query...
> SELECT *
> FROM vCounterpartyTrades AS c LEFT JOIN vOurTrades AS p
> ON c.portfolioId = p.portfolioId AND c.cusip = p.cusip AND
> c.custodianId = p.custodianId
> WHERE p.quantity IS NULL OR c.quantity <> p.quantity
> UNION
> SELECT *
> FROM vCounterpartyTrades AS c RIGHT JOIN vOurTrades AS p
> ON c.portfolioId = p.portfolioId AND c.cusip = p.cusip AND
> c.custodianId = p.custodianId
> WHERE p.quantity <> 0 AND (c.quantity IS NULL OR c.quantity = 0)
> The problem is that the UNION causes a temp table to be created. When
> I try to add filters to reduce the number of rows that are returned,
> the filter is applied to the temp table, not the views, so every
> single query takes the same amount of time -- about 20 seconds, and
> that's simply too long.
> In the past I have had excellent results by replacing views with the
> SQL that makes the view. So in this case, "vCounterpartyTrades as c"
> is replaced by "( all of the SQL in that view ) as c". That way I can
> apply any WHERE filters directly in the SQL by splicing in the WHERE
> in VBA, and everything gets a lot faster.
> But the problem here is that both views appear twice, on either side
> of the UNION. That not only dramatically expands the resulting SQL
> (both the views are pretty long as it is) but means both are run
> twice. So to really speed this up I think I need to remove the UNION
> and replace it with some sort of join...
> SELECT *
> FROM *a whole bunch of SQL* AS c, *another whole bunch of SQL* AS p
> WHERE c.portfolioId = p.portfolioId AND c.cusip = p.cusip AND
> c.custodianId = p.custodianId
> AND (p.quantity IS NOT null AND (c.quantity IS NULL OR c.quantity => 0)
> OR ( p.quantity IS NULL OR c.quantity <> p.quantity))
> ...is the obvious solution, but this eliminates anything where one
> side or the other is null. I know there's a simple solution to this
> using other join styles, but I have very little familiarity with them.
> Can someone help me out?
> Maury
> p.s. Is anyone else having problems with MS's interface to these
> groups? I can no longer post via their web site, because the post form
> will not pop up.|||Ok, I actually found a great guide on all of this and got it working.
The key was to use "FULL OUTER JOIN" in the FROM. This makes all rows
from either side appear. After that there was a lot of tweaking of the
WHERE, but I did manage to get it working in the end. I still have to
use the two subqueries, but by moving the filters into their WHEREs
the performance is excellent, basically instant.
Maury