Showing posts with label working. Show all posts
Showing posts with label working. Show all posts

Sunday, March 25, 2012

difference between dates

Hi,
I have two problems.

1)I'm using datediff function to count difference in minutes between
two dates - and it's working fine.
But I would like to ask if there is any function (or maybe U could tell
me how to do it) that is able to count difference between two dates in
minutes, including only days from Monday to Friday and hours from 9:00
am to 5:15 pm.

2)My second question reference to the first one. Let's suppose that
I've managed to count correctly difference between two dates. But for
example: 120332 minutes is not telling me a lot. So I would like to
show this measure in this format DD:HH:MM
(DaysDays:HoursHours:MinutesMinutes) - aggregation function for this
measure is SUM.
I was trying to use MDX language to change 120332 into DD:HH:MM and
show this result in report but it didn't work - I don't know how
to do it correctly. Or maybe U have a better idea how I should do it.

Can You help me?

Here's an approach to the 2nd problem - that of formatting minutes as DD:HH:MM

>>

With

Member [Measures].[TimeInMins] as

120332, FORMAT_STRING = '#,#'

Member [Measures].[TimeDD] as

Format(Int([Measures].[TimeInMins]/1440),

"#:")

Member [Measures].[TimeHHMM] as

Format(TimeSerial(0, [Measures].[TimeInMins] -

(Int([Measures].[TimeInMins]/1440) * 1440), 0),

"HH:mm")

Member [Measures].[TimeFormatted] as

[Measures].[TimeDD] + [Measures].[TimeHHMM]

select {[Measures].[TimeInMins],

[Measures].[TimeFormatted]} on 0

from [Adventure Works]

TimeInMins TimeFormatted
120,332 83:13:32

>>

This article discusses how various values of FORMAT_STRING work:

http://windowssdk.msdn.microsoft.com/en-us/library/ms718137.aspx

>>

Contents of FORMAT_STRING

The FORMAT_STRING property contains a format string that was used to generate the FORMATTED_VALUE property. The contents of FORMAT_STRING vary, depending on the data type of the value.

...

>>

|||Thanks for help!!!
Here is code of working function (in sql server 2005):

MEMBER Measures.Time AS
right("0" + CStr(Int((Int(ET/60))/24)), 2)+ ":"
+ right("0" + CStr(Int(ET/60)-(Int((Int(ET/60))/24))*24), 2)+ ":"
+ right("0" + CStr(ET - (Int((Int(ET/60))/24)*24 + Int(Int(ET/60)-(Int((Int(ET/60))/24))*24))*60 ),2)

And to the first problem i wrote a TSQL function (maybe it isn't the best way - but for my problem is ok ;) )

DECLARE kursor CURSOR FOR
SELECT Case_number_, Arrival_Time, Closed_Time, datediff(day,Arrival_Time,Closed_Time) as roznica FROM data

DECLARE @.Case_number nvarchar(15)
DECLARE @.Arrival_Time datetime
DECLARE @.Closed_Time datetime
DECLARE @.Arrival_Time_help datetime
DECLARE @.Time_begin nvarchar(6)
DECLARE @.Time_end nvarchar(6)
DECLARE @.number_days int
DECLARE @.counter int
DECLARE @.no_weekend int
DECLARE @.dzien nvarchar(15)
DECLARE @.Resolved_Time int
DECLARE @.help_value int

OPEN kursor

FETCH NEXT FROM kursor INTO @.Case_number, @.Arrival_Time, @.Closed_Time, @.number_days

WHILE (@.@.FETCH_STATUS=0)
BEGIN

SET @.number_days =@.number_days +1
SET @.counter=@.number_days
SET @.Arrival_Time_help=@.Arrival_time
WHILE (@.counter>0)
BEGIN
SET @.dzien=datename(weekday,@.Arrival_Time_help)
if(@.dzien='Saturday' or @.dzien='Sunday')
BEGIN
SET @.number_days=@.number_days-1
END
SET @.Arrival_Time_help=DATEADD(day,1,@.Arrival_Time_help)
SET @.counter= @.counter-1
END

SET @.Resolved_Time=0
if(@.number_days=1)
SET @.Resolved_Time=datediff(mi,@.Arrival_Time,@.Closed_Time)
else
BEGIN
SET @.Time_begin=datename(hh,@.arrival_time)+':'+datename(mi,@.arrival_time)
SET @.Time_end='17:15'
SET @.help_value=datediff(mi,@.time_begin, @.time_end)
if(@.help_value>0)
SET @.Resolved_Time=@.help_value

SET @.Time_begin='9:00'
SET @.Time_end=datename(hh,@.Closed_time)+':'+datename(mi,@.Closed_time)
SET @.help_value=datediff(mi,@.time_begin, @.time_end)
if(@.help_value>0)

SET @.Resolved_Time=@.Resolved_Time+@.help_value
END

if(@.number_days>2)
BEGIN
SET @.Resolved_Time=@.Resolved_Time+(@.number_days-2)*495
END

UPDATE data set
Time_Period = @.Resolved_Time
WHERE Case_number_=@.Case_number

FETCH NEXT FROM kursor INTO @.Case_number, @.Arrival_Time, @.Closed_Time, @.number_days

END
CLOSE kursor
DEALLOCATE kursor

difference between dates

Hi,
I have two problems.

1)I'm using datediff function to count difference in minutes between
two dates - and it's working fine.
But I would like to ask if there is any function (or maybe U could tell
me how to do it) that is able to count difference between two dates in
minutes, including only days from Monday to Friday and hours from 9:00
am to 5:15 pm.

2)My second question reference to the first one. Let's suppose that
I've managed to count correctly difference between two dates. But for
example: 120332 minutes is not telling me a lot. So I would like to
show this measure in this format DD:HH:MM
(DaysDays:HoursHours:MinutesMinutes) - aggregation function for this
measure is SUM.
I was trying to use MDX language to change 120332 into DD:HH:MM and
show this result in report but it didn't work - I don't know how
to do it correctly. Or maybe U have a better idea how I should do it.

Can You help me?

Here's an approach to the 2nd problem - that of formatting minutes as DD:HH:MM

>>

With

Member [Measures].[TimeInMins] as

120332, FORMAT_STRING = '#,#'

Member [Measures].[TimeDD] as

Format(Int([Measures].[TimeInMins]/1440),

"#:")

Member [Measures].[TimeHHMM] as

Format(TimeSerial(0, [Measures].[TimeInMins] -

(Int([Measures].[TimeInMins]/1440) * 1440), 0),

"HH:mm")

Member [Measures].[TimeFormatted] as

[Measures].[TimeDD] + [Measures].[TimeHHMM]

select {[Measures].[TimeInMins],

[Measures].[TimeFormatted]} on 0

from [Adventure Works]

TimeInMins TimeFormatted
120,332 83:13:32

>>

This article discusses how various values of FORMAT_STRING work:

http://windowssdk.msdn.microsoft.com/en-us/library/ms718137.aspx

>>

Contents of FORMAT_STRING

The FORMAT_STRING property contains a format string that was used to generate the FORMATTED_VALUE property. The contents of FORMAT_STRING vary, depending on the data type of the value.

...

>>

|||Thanks for help!!!
Here is code of working function (in sql server 2005):

MEMBER Measures.Time AS
right("0" + CStr(Int((Int(ET/60))/24)), 2)+ ":"
+ right("0" + CStr(Int(ET/60)-(Int((Int(ET/60))/24))*24), 2)+ ":"
+ right("0" + CStr(ET - (Int((Int(ET/60))/24)*24 + Int(Int(ET/60)-(Int((Int(ET/60))/24))*24))*60 ),2)

And to the first problem i wrote a TSQL function (maybe it isn't the best way - but for my problem is ok ;) )

DECLARE kursor CURSOR FOR
SELECT Case_number_, Arrival_Time, Closed_Time, datediff(day,Arrival_Time,Closed_Time) as roznica FROM data

DECLARE @.Case_number nvarchar(15)
DECLARE @.Arrival_Time datetime
DECLARE @.Closed_Time datetime
DECLARE @.Arrival_Time_help datetime
DECLARE @.Time_begin nvarchar(6)
DECLARE @.Time_end nvarchar(6)
DECLARE @.number_days int
DECLARE @.counter int
DECLARE @.no_weekend int
DECLARE @.dzien nvarchar(15)
DECLARE @.Resolved_Time int
DECLARE @.help_value int

OPEN kursor

FETCH NEXT FROM kursor INTO @.Case_number, @.Arrival_Time, @.Closed_Time, @.number_days

WHILE (@.@.FETCH_STATUS=0)
BEGIN

SET @.number_days =@.number_days +1
SET @.counter=@.number_days
SET @.Arrival_Time_help=@.Arrival_time
WHILE (@.counter>0)
BEGIN
SET @.dzien=datename(weekday,@.Arrival_Time_help)
if(@.dzien='Saturday' or @.dzien='Sunday')
BEGIN
SET @.number_days=@.number_days-1
END
SET @.Arrival_Time_help=DATEADD(day,1,@.Arrival_Time_help)
SET @.counter= @.counter-1
END

SET @.Resolved_Time=0
if(@.number_days=1)
SET @.Resolved_Time=datediff(mi,@.Arrival_Time,@.Closed_Time)
else
BEGIN
SET @.Time_begin=datename(hh,@.arrival_time)+':'+datename(mi,@.arrival_time)
SET @.Time_end='17:15'
SET @.help_value=datediff(mi,@.time_begin, @.time_end)
if(@.help_value>0)
SET @.Resolved_Time=@.help_value

SET @.Time_begin='9:00'
SET @.Time_end=datename(hh,@.Closed_time)+':'+datename(mi,@.Closed_time)
SET @.help_value=datediff(mi,@.time_begin, @.time_end)
if(@.help_value>0)

SET @.Resolved_Time=@.Resolved_Time+@.help_value
END

if(@.number_days>2)
BEGIN
SET @.Resolved_Time=@.Resolved_Time+(@.number_days-2)*495
END

UPDATE data set
Time_Period = @.Resolved_Time
WHERE Case_number_=@.Case_number

FETCH NEXT FROM kursor INTO @.Case_number, @.Arrival_Time, @.Closed_Time, @.number_days

END
CLOSE kursor
DEALLOCATE kursor

Monday, March 19, 2012

Did I get current source code?

Hi,
I have been working with a programmer overseas for the past six months.
Every so often I request and get the source code for a Delphi program
running on MSSQL. My question please is, how can I tell if I am getting
valid or current source code?
regards,
s
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.805 / Virus Database: 547 - Release Date: 03-Dec-04Use Delphi to compile and test it?
This isn't a SQL Server question.
David Portas
SQL Server MVP
--

Dialog Security and Message Encryption

I understand that Dialog Security + certificates can be used to encryption individual dialogs. I have several demos working now that do just this.However, I don't fully understand exactly when the messages are encrypted, and if they are ever written to a queue on the initiating service prior to being encrypted. I want to make sure that admins can't simply query the transmission queues to get clear text messages, because I have strict requirements that I encrypt all personal data that is stored anywhere in a database.


BOL is a little unclear on this topic. The relevant doc reads:

For a dialog that uses security, Service Broker encrypts all messages sent outside a SQL Server instance. Messages that remain within a SQL Server instance are never encrypted. In dialog security, only the database that hosts the initiating service and the database that hosts the target service need to have access to the certificates used for security. That is, an instance that performs message forwarding is not required to have the capability to decrypt the messages that the instance forwards.

Does this imply that message destined for an external service aren't encrypted until they leave the instance? Or does Service Broker figure out that the message is destined for a remote service and therefore applies encryption to the message_body prior to the message hitting the transmission queue on the initiating service?

Many thanks, Kevin

Messages are encrypted only in traffic, as they are transmitted over the network. You cannot prevent an administrator (or user with proper permissions) from seeing the clear text of the messages in the transmission_queue. Storing the messages encrypted in the transmission_queue has several weaknesses/issues:
- it breaks cryptographic best practices as same cipher is sent over and over again in case of retries
- the message clear text can still be seen in the SEND statement T-SQL batch (and this can be monitored for)
- the message clear text can still be seen in the destination queue

In your case you have to use the encryption infrastructure of SQL Server (EncryptByKey, DecryptByKey) to encrypt/decrypt the sent payload, or do the encryption in the application code.

But since message data is ultimately originating from a table and usually is being stored (after RECEIVE) in a table, you have the requirement to store the data encrypted anyway, irellevant of Service Broker. IMHO the best option is to sent directly the encrypted data, as is stored in the table.

HTH,
~ Remus

|||

Thanks, that's kind of what I expected. I will define some sort of envelope message that includes the encrypted payload.

Out of curiosity, what format is the message_body column in when I query a queue? Is there any way I can decode that to see the actual xml? I'll need to demo that the payload is encrypted.

Cheers, Kevin

|||No encoding, just serialized. Is a simple VARBINARY(MAX). Doing a SELECT CAST(MESSAGE_BODY AS XML) FROM sys.transmission_queue will show the correct XML. The 0xFFFE at the beginning is the XML Byte Order Mark for UTF-16.|||

Remus Rusanu wrote:

But since message data is ultimately originating from a table and usually is being stored (after RECEIVE) in a table, you have the requirement to store the data encrypted anyway, irellevant of Service Broker. IMHO the best option is to sent directly the encrypted data, as is stored in the table.

I've been thinking about this and I'm going to have to correct myself. Sending directly the ecrypted column and storing received data as the encrypted column would require that the same key is used on both sites. This is a bad cryptographic practice and also can turn into a key maintainance nightmare when the keys are changed.

There should be a key to store the data on one site. This key must be used to decrypt the data before sending. The decrypted data should be encrypted it with a dedicated transmition key. The transmission key has to be shared or exhanged by the two parties involved. The receiver should use this transmission key to decrypt the payload. The decrypted payload should be then encrypted with the receiver's own 'storage' key.

I know there are a lot of encrypt/decrypt steps involved, but sharing the key between the sender and receiver can be dangerous/problematic.

The main problem is that the 'transmission' key must be somehow exchanged by the sender and receiver, this is not a trivial operation. One example can be as follows: for instance this 'transmission' key could be the first message sent on a conversation. For each conversation, the sender can generate and create a random symmetric key (later used to encrypt message on this conversation), then send it to the target encrypted with the target's public key (the very same one used to set up dialog security/REMOTE SERVICE BINDING). The receiver when it receives the first message it decrypts it (since it has the corresponding private key), creates a symmetric key from the received secret and later can use this symmetric key to decrypt message on this conversation. When a conversations is closed, its 'transmission' symmetric keys can be removed.

Other typical cryptographic precautions (signing/timestamping the transmission key, adding a nonce/chanlenge etc) I believe are not necessary, because you already have authentication from the dialog security itself.

HTH,
~ Remus

P.S. Kevin, you seem to know a thing or two about this subject and maybe you already knew all this, but I have to think at all the other people looking at the post.

|||

Many thanks Remus. I am intending to use a different set of keys for transmission encryption. The messages should have a much shorter lifetime that the data that gets mapped into the production tables, so I don't want to couple the data storage keys with the transmission keys.

I hadn't thought about using an initial exchange of messages in order to establish a symmetric key for encryption -- sounds just like what SSL does. Of course, I will also need to encrypt the transmission symmetric key when it is stored locally, but SQL 2k5 seems to have plenty of options there.

Cheers, Kevin

Diagrams SQL Server 2005

Hello,
I am working with the 2005er version.
I am missing the diagrams where I can show the tables and there relation
ships (th old daVinci tools).
Can somebody tell me where they are gone?
Thanks
Michael
Michael Zdarsky
www.zac-it.com
ZAC-IT GmbH
09190-9271010
You should be discussing this in the beta groups for SQL Server 2005. But
since SQL 2005 B2 isn't covered under beta I can say that they diagrams are
not in the version of the beta you are working with. New features, such as
this one, may or may not be added to the final release.
Brian
"Michael Zdarsky" <zdarsky@.zac-it.com.(nospamplease)> wrote in message
news:02A8C7FB-11DE-46DF-B592-49A3F1FB6FCE@.microsoft.com...
> Hello,
> I am working with the 2005er version.
> I am missing the diagrams where I can show the tables and there relation
> ships (th old daVinci tools).
> Can somebody tell me where they are gone?
> Thanks
> Michael
> --
> Michael Zdarsky
> www.zac-it.com
> ZAC-IT GmbH
> 09190-9271010
|||http://www.aspfaq.com/sql2005/show.asp?id=6
Please use the SQL Server 2005 newsgroups to discuss SQL Server 2005.
That's what the groups were created for.
http://www.aspfaq.com/sql2005/show.asp?id=1
http://www.aspfaq.com/
(Reverse address to reply.)
"Michael Zdarsky" <zdarsky@.zac-it.com.(nospamplease)> wrote in message
news:02A8C7FB-11DE-46DF-B592-49A3F1FB6FCE@.microsoft.com...
> Hello,
> I am working with the 2005er version.
> I am missing the diagrams where I can show the tables and there relation
> ships (th old daVinci tools).
> Can somebody tell me where they are gone?
> Thanks
> Michael
> --
> Michael Zdarsky
> www.zac-it.com
> ZAC-IT GmbH
> 09190-9271010

Diagrams SQL Server 2005

Hello,
I am working with the 2005er version.
I am missing the diagrams where I can show the tables and there relation
ships (th old daVinci tools).
Can somebody tell me where they are gone?
Thanks
Michael
--
Michael Zdarsky
www.zac-it.com
ZAC-IT GmbH
09190-9271010You should be discussing this in the beta groups for SQL Server 2005. But
since SQL 2005 B2 isn't covered under beta I can say that they diagrams are
not in the version of the beta you are working with. New features, such as
this one, may or may not be added to the final release.
--
Brian
"Michael Zdarsky" <zdarsky@.zac-it.com.(nospamplease)> wrote in message
news:02A8C7FB-11DE-46DF-B592-49A3F1FB6FCE@.microsoft.com...
> Hello,
> I am working with the 2005er version.
> I am missing the diagrams where I can show the tables and there relation
> ships (th old daVinci tools).
> Can somebody tell me where they are gone?
> Thanks
> Michael
> --
> Michael Zdarsky
> www.zac-it.com
> ZAC-IT GmbH
> 09190-9271010|||http://www.aspfaq.com/sql2005/show.asp?id=6
Please use the SQL Server 2005 newsgroups to discuss SQL Server 2005.
That's what the groups were created for.
http://www.aspfaq.com/sql2005/show.asp?id=1
--
http://www.aspfaq.com/
(Reverse address to reply.)
"Michael Zdarsky" <zdarsky@.zac-it.com.(nospamplease)> wrote in message
news:02A8C7FB-11DE-46DF-B592-49A3F1FB6FCE@.microsoft.com...
> Hello,
> I am working with the 2005er version.
> I am missing the diagrams where I can show the tables and there relation
> ships (th old daVinci tools).
> Can somebody tell me where they are gone?
> Thanks
> Michael
> --
> Michael Zdarsky
> www.zac-it.com
> ZAC-IT GmbH
> 09190-9271010

Sunday, March 11, 2012

Diagrams manipulation

Hello, working on SQL2000.
I want to know if the diagrams can be exported to a format that can be
later imported to another database.
I also want to know if importing a diagram to a database, changes the
indexes, FK, etc or has nothing to do with it.
Thanks in advanceYou can certainly move the diagrams to another server
HOW TO: Move a Database Diagram
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q320125
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Guillermo Casta?o A" <guillermoc74@.hotmail.com> wrote in message
news:9350d78d.0401070611.ce11d86@.posting.google.com...
> Hello, working on SQL2000.
> I want to know if the diagrams can be exported to a format that can be
> later imported to another database.
> I also want to know if importing a diagram to a database, changes the
> indexes, FK, etc or has nothing to do with it.
> Thanks in advance

Diagram of the SP relations

All,
Is it possible to get something like a diagram of the SP relations? I'm
working with one DB and the business logic is done so that the SP can
execute another SP inside itself, the next SP can call another one, etc. So
that we can get 3-4 different sub-layers inside one SP. If I need to make
one simple change to any SP, for example to add a new parameter, I get so
huge pleasure that it's really hard to make everything right. I need to add
these parameter correctly to all SPs, plus correct the app source code. If I
could keep some automatically generated schema with all these relations on
my desk it would be much easier to break through this crazy logic. Please
help who knows how to simplify that. Don't tell me that this approach is
stupid, I know that. :( To change anything means to redo the whole DB,
that's not acceptable now, the app is in production.
Just D.Well, you could use the dependency table but that is
often inaccurate. This isn't a dead on solution but
may provide you with a good start.
It analyzes the text of the stored procedure and orders
all of them by order of "real" dependency.
http://www.eggheadcafe.com/articles/20030609.asp
Robbe Morris - 2004-2006 Microsoft MVP C#
Earn money answering .NET questions
http://www.eggheadcafe.com/forums/merit.asp
"Just D" <no@.spam.please> wrote in message
news:wTWog.8849$Nv.6431@.fed1read10...
> All,
> Is it possible to get something like a diagram of the SP relations? I'm
> working with one DB and the business logic is done so that the SP can
> execute another SP inside itself, the next SP can call another one, etc.
> So that we can get 3-4 different sub-layers inside one SP. If I need to
> make one simple change to any SP, for example to add a new parameter, I
> get so huge pleasure that it's really hard to make everything right. I
> need to add these parameter correctly to all SPs, plus correct the app
> source code. If I could keep some automatically generated schema with all
> these relations on my desk it would be much easier to break through this
> crazy logic. Please help who knows how to simplify that. Don't tell me
> that this approach is stupid, I know that. :( To change anything means to
> redo the whole DB, that's not acceptable now, the app is in production.
> Just D.
>|||Just D wrote:
> All,
> Is it possible to get something like a diagram of the SP relations? I'm
> working with one DB and the business logic is done so that the SP can
> execute another SP inside itself, the next SP can call another one, etc. S
o
> that we can get 3-4 different sub-layers inside one SP. If I need to make
> one simple change to any SP, for example to add a new parameter, I get so
> huge pleasure that it's really hard to make everything right. I need to ad
d
> these parameter correctly to all SPs, plus correct the app source code. If
I
> could keep some automatically generated schema with all these relations on
> my desk it would be much easier to break through this crazy logic. Please
> help who knows how to simplify that. Don't tell me that this approach is
> stupid, I know that. :( To change anything means to redo the whole DB,
> that's not acceptable now, the app is in production.
> Just D.
>
This is stupid, you should redo the whole DB... ;-)
Seriously though, you can search the syscomments table to figure out
which sproc reference the one you're changing. Not the perfect
solution, but it should help you find all the things you need to change
when adding a parameter...

Diagram Editor doesn't work in SQLServer 2000

Hi,
All of a sudden the other day my diagram editor stopped working. I really rely on and can't figure out what happened. Everything else works fine. Since the problem started, I installed SP3 and it didn't help. I'm using a 60 day eval version of SQLS
erver which may have something to do with it (I have one licensed copy that I will install on another machine and am ordering another copy at the moment). Anyways, any ideas?
tdk
tdk,
Did you install VB6 SP6? If so you overwrote the working version of
mdt2df.dll. You will need to restore this dll and register it from before
the update. If you didn't you can try installing an older version of
mdt2df.dll.
-Sam Matzen
"tdk" <tdk@.discussions.microsoft.com> wrote in message
news:9340199E-172E-436A-84CA-275B77CDD642@.microsoft.com...
> Hi,
> All of a sudden the other day my diagram editor stopped working. I
really rely on and can't figure out what happened. Everything else works
fine. Since the problem started, I installed SP3 and it didn't help. I'm
using a 60 day eval version of SQLServer which may have something to do with
it (I have one licensed copy that I will install on another machine and am
ordering another copy at the moment). Anyways, any ideas?
> tdk
|||I have a similar problem that this causing me all kinds annoyance, in my
case diagrams created in Enterprise Manager are only viewable in EM and
diagrams created though Access (through Access Data Projects) are only
viewable in Access. If I try to view a diagram in one tool that was created
in the other the viewing program crashes. I do have VB6 installed so I
wonder if this is related...any links, additional documentation on this
problem? How would you even know which version of the dll is the proper one
to be compatible with everything?
|||Jon,
All I know is that when I installed VB6 Service Pack 6 it overrode the .dll
and my Enterprise Manager diagrams no longer worked.
I don't think there is any way to view Access diagrams in Enterprise
Manager.
-Sam Matzen
"Jon" <jonremovemewest@.msn.com> wrote in message
news:uL$xg6lcEHA.2384@.TK2MSFTNGP09.phx.gbl...
> I have a similar problem that this causing me all kinds annoyance, in my
> case diagrams created in Enterprise Manager are only viewable in EM and
> diagrams created though Access (through Access Data Projects) are only
> viewable in Access. If I try to view a diagram in one tool that was
created
> in the other the viewing program crashes. I do have VB6 installed so I
> wonder if this is related...any links, additional documentation on this
> problem? How would you even know which version of the dll is the proper
one
> to be compatible with everything?
>
|||Ah ha. I found an older version where I unpacked the SQLServer eval version onto my drive (\dir mdt2df.dll /s
Thanks a bunch for the help Samuel.
Tyson
"Samuel L Matzen" wrote:

> tdk,
> Did you install VB6 SP6? If so you overwrote the working version of
> mdt2df.dll. You will need to restore this dll and register it from before
> the update. If you didn't you can try installing an older version of
> mdt2df.dll.
> -Sam Matzen
>
> "tdk" <tdk@.discussions.microsoft.com> wrote in message
> news:9340199E-172E-436A-84CA-275B77CDD642@.microsoft.com...
> really rely on and can't figure out what happened. Everything else works
> fine. Since the problem started, I installed SP3 and it didn't help. I'm
> using a 60 day eval version of SQLServer which may have something to do with
> it (I have one licensed copy that I will install on another machine and am
> ordering another copy at the moment). Anyways, any ideas?
>
>
|||Thanks Samuel, I definitely do have VB SP6 on my machine. I am fairly certain it was installed later than SQLServer. The version of MDT2DF.DLL that I have is 2.0.0.9586, which from what I can gather about version updates on the msdn site is a fairly ne
w version. The question is, how do I get an old version of just that dll? Once I have it, I know how to register it (asusming it's a COM dll, regsvr32).
Tyson
"Samuel L Matzen" wrote:

> tdk,
> Did you install VB6 SP6? If so you overwrote the working version of
> mdt2df.dll. You will need to restore this dll and register it from before
> the update. If you didn't you can try installing an older version of
> mdt2df.dll.
> -Sam Matzen
>
> "tdk" <tdk@.discussions.microsoft.com> wrote in message
> news:9340199E-172E-436A-84CA-275B77CDD642@.microsoft.com...
> really rely on and can't figure out what happened. Everything else works
> fine. Since the problem started, I installed SP3 and it didn't help. I'm
> using a 60 day eval version of SQLServer which may have something to do with
> it (I have one licensed copy that I will install on another machine and am
> ordering another copy at the moment). Anyways, any ideas?
>
>

Friday, March 9, 2012

Diagram Editor doesn't work in SQLServer 2000

Hi,
All of a sudden the other day my diagram editor stopped working. I really rely on and can't figure out what happened. Everything else works fine. Since the problem started, I installed SP3 and it didn't help. I'm using a 60 day eval version of SQLServer which may have something to do with it (I have one licensed copy that I will install on another machine and am ordering another copy at the moment). Anyways, any ideas?
tdktdk,
Did you install VB6 SP6? If so you overwrote the working version of
mdt2df.dll. You will need to restore this dll and register it from before
the update. If you didn't you can try installing an older version of
mdt2df.dll.
-Sam Matzen
"tdk" <tdk@.discussions.microsoft.com> wrote in message
news:9340199E-172E-436A-84CA-275B77CDD642@.microsoft.com...
> Hi,
> All of a sudden the other day my diagram editor stopped working. I
really rely on and can't figure out what happened. Everything else works
fine. Since the problem started, I installed SP3 and it didn't help. I'm
using a 60 day eval version of SQLServer which may have something to do with
it (I have one licensed copy that I will install on another machine and am
ordering another copy at the moment). Anyways, any ideas?
> tdk|||I have a similar problem that this causing me all kinds annoyance, in my
case diagrams created in Enterprise Manager are only viewable in EM and
diagrams created though Access (through Access Data Projects) are only
viewable in Access. If I try to view a diagram in one tool that was created
in the other the viewing program crashes. I do have VB6 installed so I
wonder if this is related...any links, additional documentation on this
problem? How would you even know which version of the dll is the proper one
to be compatible with everything?|||Jon,
All I know is that when I installed VB6 Service Pack 6 it overrode the .dll
and my Enterprise Manager diagrams no longer worked.
I don't think there is any way to view Access diagrams in Enterprise
Manager.
-Sam Matzen
"Jon" <jonremovemewest@.msn.com> wrote in message
news:uL$xg6lcEHA.2384@.TK2MSFTNGP09.phx.gbl...
> I have a similar problem that this causing me all kinds annoyance, in my
> case diagrams created in Enterprise Manager are only viewable in EM and
> diagrams created though Access (through Access Data Projects) are only
> viewable in Access. If I try to view a diagram in one tool that was
created
> in the other the viewing program crashes. I do have VB6 installed so I
> wonder if this is related...any links, additional documentation on this
> problem? How would you even know which version of the dll is the proper
one
> to be compatible with everything?
>

Diagram Editor doesn't work in SQLServer 2000

Hi,
All of a sudden the other day my diagram editor stopped working. I really r
ely on and can't figure out what happened. Everything else works fine. Sin
ce the problem started, I installed SP3 and it didn't help. I'm using a 60
day eval version of SQLS
erver which may have something to do with it (I have one licensed copy that
I will install on another machine and am ordering another copy at the moment
). Anyways, any ideas?
tdktdk,
Did you install VB6 SP6? If so you overwrote the working version of
mdt2df.dll. You will need to restore this dll and register it from before
the update. If you didn't you can try installing an older version of
mdt2df.dll.
-Sam Matzen
"tdk" <tdk@.discussions.microsoft.com> wrote in message
news:9340199E-172E-436A-84CA-275B77CDD642@.microsoft.com...
> Hi,
> All of a sudden the other day my diagram editor stopped working. I
really rely on and can't figure out what happened. Everything else works
fine. Since the problem started, I installed SP3 and it didn't help. I'm
using a 60 day eval version of SQLServer which may have something to do with
it (I have one licensed copy that I will install on another machine and am
ordering another copy at the moment). Anyways, any ideas?
> tdk|||I have a similar problem that this causing me all kinds annoyance, in my
case diagrams created in Enterprise Manager are only viewable in EM and
diagrams created though Access (through Access Data Projects) are only
viewable in Access. If I try to view a diagram in one tool that was created
in the other the viewing program crashes. I do have VB6 installed so I
wonder if this is related...any links, additional documentation on this
problem? How would you even know which version of the dll is the proper one
to be compatible with everything?|||Jon,
All I know is that when I installed VB6 Service Pack 6 it overrode the .dll
and my Enterprise Manager diagrams no longer worked.
I don't think there is any way to view Access diagrams in Enterprise
Manager.
-Sam Matzen
"Jon" <jonremovemewest@.msn.com> wrote in message
news:uL$xg6lcEHA.2384@.TK2MSFTNGP09.phx.gbl...
> I have a similar problem that this causing me all kinds annoyance, in my
> case diagrams created in Enterprise Manager are only viewable in EM and
> diagrams created though Access (through Access Data Projects) are only
> viewable in Access. If I try to view a diagram in one tool that was
created
> in the other the viewing program crashes. I do have VB6 installed so I
> wonder if this is related...any links, additional documentation on this
> problem? How would you even know which version of the dll is the proper
one
> to be compatible with everything?
>|||Ah ha. I found an older version where I unpacked the SQLServer eval version
onto my drive (\dir mdt2df.dll /s
Thanks a bunch for the help Samuel.
Tyson
"Samuel L Matzen" wrote:

> tdk,
> Did you install VB6 SP6? If so you overwrote the working version of
> mdt2df.dll. You will need to restore this dll and register it from before
> the update. If you didn't you can try installing an older version of
> mdt2df.dll.
> -Sam Matzen
>
> "tdk" <tdk@.discussions.microsoft.com> wrote in message
> news:9340199E-172E-436A-84CA-275B77CDD642@.microsoft.com...
> really rely on and can't figure out what happened. Everything else works
> fine. Since the problem started, I installed SP3 and it didn't help. I'm
> using a 60 day eval version of SQLServer which may have something to do wi
th
> it (I have one licensed copy that I will install on another machine and am
> ordering another copy at the moment). Anyways, any ideas?
>
>|||Thanks Samuel, I definitely do have VB SP6 on my machine. I am fairly cert
ain it was installed later than SQLServer. The version of MDT2DF.DLL that I
have is 2.0.0.9586, which from what I can gather about version updates on t
he msdn site is a fairly ne
w version. The question is, how do I get an old version of just that dll?
Once I have it, I know how to register it (asusming it's a COM dll, regsvr32
).
Tyson
"Samuel L Matzen" wrote:

> tdk,
> Did you install VB6 SP6? If so you overwrote the working version of
> mdt2df.dll. You will need to restore this dll and register it from before
> the update. If you didn't you can try installing an older version of
> mdt2df.dll.
> -Sam Matzen
>
> "tdk" <tdk@.discussions.microsoft.com> wrote in message
> news:9340199E-172E-436A-84CA-275B77CDD642@.microsoft.com...
> really rely on and can't figure out what happened. Everything else works
> fine. Since the problem started, I installed SP3 and it didn't help. I'm
> using a 60 day eval version of SQLServer which may have something to do wi
th
> it (I have one licensed copy that I will install on another machine and am
> ordering another copy at the moment). Anyways, any ideas?
>
>

DHCP vs. Static

My SQL*Server 7 server was working fine this morning... All of a sudden
anyone that is set up using DHCP to get IP Settings can't connect to any
databases... If I change them to a static IP Address it works fine...
Can't remember the exact message but it was something along the lines of
"SQL Server not found or access denied".....
I can get the full message if required...
Sounds like the DHCP server is dispensing the wrong information, possibly
about the DNS server. The error is usually a name resoultion problem, i.e.
the client cannot resolve the server name to its network address.
After a client acquires it ip address via DHCP, run ipconfig /all form a
command prompt and compare the values with a client that has a static ip
address.
Rand
This posting is provided "as is" with no warranties and confers no rights.
|||> Sounds like the DHCP server is dispensing the wrong information, possibly
> about the DNS server. The error is usually a name resoultion problem, i.e.
> the client cannot resolve the server name to its network address.
It is dispensing the right information. I am thinking that the corporate
weenies changed
something somewhere and it is causing us problems...
Funny thing is, machines that have a static ip address and the same DNS
Servers entered manually
work just fine.
What I did for now was remove the DNS Servers from the DHCP settings and am
doing a
ipconfig /release
ipconfig /renew
after this is done and the DNS servers aren't set on the DHCP enabled
machines, everything works fine...
Of course any internet stuff is broken....
What could change to cause a situation like that?

> After a client acquires it ip address via DHCP, run ipconfig /all form a
> command prompt and compare the values with a client that has a static ip
> address.

DHCP vs. Static

My SQL*Server 7 server was working fine this morning... All of a sudden
anyone that is set up using DHCP to get IP Settings can't connect to any
databases... If I change them to a static IP Address it works fine...
Can't remember the exact message but it was something along the lines of
"SQL Server not found or access denied".....
I can get the full message if required...Sounds like the DHCP server is dispensing the wrong information, possibly
about the DNS server. The error is usually a name resoultion problem, i.e.
the client cannot resolve the server name to its network address.
After a client acquires it ip address via DHCP, run ipconfig /all form a
command prompt and compare the values with a client that has a static ip
address.
Rand
This posting is provided "as is" with no warranties and confers no rights.|||> Sounds like the DHCP server is dispensing the wrong information, possibly
> about the DNS server. The error is usually a name resoultion problem, i.e.
> the client cannot resolve the server name to its network address.
It is dispensing the right information. I am thinking that the corporate
weenies changed
something somewhere and it is causing us problems...
Funny thing is, machines that have a static ip address and the same DNS
Servers entered manually
work just fine.
What I did for now was remove the DNS Servers from the DHCP settings and am
doing a
ipconfig /release
ipconfig /renew
after this is done and the DNS servers aren't set on the DHCP enabled
machines, everything works fine...
Of course any internet stuff is broken....
What could change to cause a situation like that?

> After a client acquires it ip address via DHCP, run ipconfig /all form a
> command prompt and compare the values with a client that has a static ip
> address.

DeviceInfo StartPage not working

Hi,
I try to make a custom toolbar that navigates like the HTML toolbar.
This should support going to next page etc.
I'm trying to set the page in the deviceInfo string to pass it to the
rs.Render method.
I used the code like in ms-
help://MS.RSBOL80.1033/RSPROG/htm/rsp_prog_soapapi_dev_8x5u.htm
Although I set startpage to 2 I only get the first page or the whole
report depending if I set the toolbar to true or false.
Also, the streamIds string always is Nothing or has length 0.
My report has 2 pages when I look at it in the Reports folder.
Code is below
Thanks in advance !
'create the ReportingService object
Dim rs As New ReportingService
'set the credentials to be passed to Reporting Services
rs.PreAuthenticate = True
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
Dim cache As CredentialCache = New CredentialCache
cache.Add(New Uri(rs.Url), "Negotiate", New NetworkCredential
(System.Configuration.ConfigurationSettings.AppSettings.Get
("ReportUserName"),
System.Configuration.ConfigurationSettings.AppSettings.Get
("ReportUserPassword"),
System.Configuration.ConfigurationSettings.AppSettings.Get
("ReportServer")))
'Assign CredentialCache to the Web service Client Proxy(myProxy)
Credetials property.
rs.Credentials = cache
Dim parameters As ParameterValue()
Dim encoding As String
Dim parametersUsed As ParameterValue()
Dim warnings As Warning()
Dim streamIDs As String() = Nothing
parameters = passParameters()
'render the report
Dim historyID As String = Nothing
Dim devInfo As String = "<StartPage>2</StartPage></DeviceInfo>"
Me.data = rs.Render(m_path, m_format, historyID, devInfo,
parameters, _
Nothing, Nothing, encoding, Me.mimeType, parametersUsed, _
warnings, streamIDs)
'determine if format is rendered to the web or a file.
Dim extension As String = GetExtension(Me.mimeType)
Dim reportName As String = m_path.Substring(m_path.LastIndexOf
("/") + 1)
Me.fileName = reportName & "." & extensionStartPage is only used for Image and PDF formats. For HTML, use the device
info <Section>.
--
Bryan Keller
Developer Documentation
SQL Server Reporting Services
A friendly reminder that this posting is provided "AS IS" with no
warranties, and confers no rights.
"Roel" <sig@.sig.com> wrote in message
news:Xns9549A61C42BC6sigsigcom@.207.46.248.16...
> Hi,
> I try to make a custom toolbar that navigates like the HTML toolbar.
> This should support going to next page etc.
> I'm trying to set the page in the deviceInfo string to pass it to the
> rs.Render method.
> I used the code like in ms-
> help://MS.RSBOL80.1033/RSPROG/htm/rsp_prog_soapapi_dev_8x5u.htm
> Although I set startpage to 2 I only get the first page or the whole
> report depending if I set the toolbar to true or false.
> Also, the streamIds string always is Nothing or has length 0.
> My report has 2 pages when I look at it in the Reports folder.
> Code is below
> Thanks in advance !
>
> 'create the ReportingService object
> Dim rs As New ReportingService
> 'set the credentials to be passed to Reporting Services
> rs.PreAuthenticate = True
> rs.Credentials = System.Net.CredentialCache.DefaultCredentials
> Dim cache As CredentialCache = New CredentialCache
> cache.Add(New Uri(rs.Url), "Negotiate", New NetworkCredential
> (System.Configuration.ConfigurationSettings.AppSettings.Get
> ("ReportUserName"),
> System.Configuration.ConfigurationSettings.AppSettings.Get
> ("ReportUserPassword"),
> System.Configuration.ConfigurationSettings.AppSettings.Get
> ("ReportServer")))
> 'Assign CredentialCache to the Web service Client Proxy(myProxy)
> Credetials property.
> rs.Credentials = cache
> Dim parameters As ParameterValue()
> Dim encoding As String
> Dim parametersUsed As ParameterValue()
> Dim warnings As Warning()
> Dim streamIDs As String() = Nothing
> parameters = passParameters()
> 'render the report
> Dim historyID As String = Nothing
> Dim devInfo As String = "<StartPage>2</StartPage></DeviceInfo>"
> Me.data = rs.Render(m_path, m_format, historyID, devInfo,
> parameters, _
> Nothing, Nothing, encoding, Me.mimeType, parametersUsed, _
> warnings, streamIDs)
> 'determine if format is rendered to the web or a file.
> Dim extension As String = GetExtension(Me.mimeType)
> Dim reportName As String = m_path.Substring(m_path.LastIndexOf
> ("/") + 1)
> Me.fileName = reportName & "." & extension
>|||"Bryan Keller [MSFT]" <bryanke@.online.microsoft.com> wrote in
news:O7ry#VVhEHA.712@.TK2MSFTNGP09.phx.gbl:
> StartPage is only used for Image and PDF formats. For HTML, use the
> device info <Section>.
>
Thanks! works perfect.
Is there any way to know what the last section is ? I want to have a button
to jump to the last page of the report. It is possible to set the section
to MAXINT or so, but that's ugly code :)
thanks in advance,
Roel

Friday, February 24, 2012

Developer Edition- is that enough?

I am working for a university and we received funding to create an online
searchable database for Company A. Company A has SQL Server 2005 and uses it
within its company. We would like to create a database of articles and
research for them, test it, post it on the Web, see if it works and then giv
e
the database to Company A. Can we do that with only the Developer Edition, o
r
do we need to buy the SQL Server 2005? I know the only difference between th
e
Developer Edition and the Enterprise edition is the license, what does that
mean'
Thank you so much for any advice you have."lana1916" <lana1916@.discussions.microsoft.com> wrote in message
news:30191BB1-2DBD-4A67-BC8C-9AC8DB11649C@.microsoft.com...
>I am working for a university and we received funding to create an online
> searchable database for Company A. Company A has SQL Server 2005 and uses
> it
> within its company. We would like to create a database of articles and
> research for them, test it, post it on the Web, see if it works and then
> give
> the database to Company A. Can we do that with only the Developer Edition,
> or
> do we need to buy the SQL Server 2005? I know the only difference between
> the
> Developer Edition and the Enterprise edition is the license, what does
> that
> mean'
> Thank you so much for any advice you have
Here's the operative language from the SQL Server 2005 Developer Edition
license
If you comply with these license terms, you have the rights below for each
license you acquire.
1. OVERVIEW.
a. Software. The software includes development tools, software programs
and documentation.
b. License Model. The software is licensed on a per user basis.
2. INSTALLATION AND USE RIGHTS.
a. General. One user may install and use copies of the software to
design, develop, test and demonstrate your programs. Testing does not
include staging on a server in a production environment, such as loading
content prior to production use.
b. Included Microsoft Programs. These license terms apply to all
Microsoft programs included with the software. If the license terms with
any of those programs give you other rights that do not expressly conflict
with these license terms, you also have those rights.
3. ADDITIONAL LICENSING REQUIREMENTS AND/OR USE RIGHTS.
a. User Testing. Your end users may access the software to perform
acceptance tests on your programs.
b. Demonstration. Any person that has access to your internal network
may install and use copies of the software to demonstrate use of your
programs with the software. Those copies may not be used for any other
purpose.
If this doesn't answer your question, you might want to check with your
Microsoft representitive. Note that any number of developers, each of whom
owns a seperate Developer Edition license, can share one server instance of
SQL Server Developer edition.
To move from development to production an instance of SQL Server Developer
Edition can be upgraded to SQL Server Enterprise Edition, or the database
can be moved to a server running any other edition of SQL Server.
David.|||The fact that you want to post it on the Web is usually considered by
Microsoft as a production database; so the developer edition is not
sufficient. However, as this is only for tests, SQL-Server Express 2005
should be sufficient as the backend for this web thing; so you will be OK if
you use the Express edition as your backend database.
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: http://cerbermail.com/?QugbLEWINF
"lana1916" <lana1916@.discussions.microsoft.com> wrote in message
news:30191BB1-2DBD-4A67-BC8C-9AC8DB11649C@.microsoft.com...
>I am working for a university and we received funding to create an online
> searchable database for Company A. Company A has SQL Server 2005 and uses
> it
> within its company. We would like to create a database of articles and
> research for them, test it, post it on the Web, see if it works and then
> give
> the database to Company A. Can we do that with only the Developer Edition,
> or
> do we need to buy the SQL Server 2005? I know the only difference between
> the
> Developer Edition and the Enterprise edition is the license, what does
> that
> mean'
> Thank you so much for any advice you have.

Developer Edition- is that enough?

I am working for a university and we received funding to create an online
searchable database for Company A. Company A has SQL Server 2005 and uses it
within its company. We would like to create a database of articles and
research for them, test it, post it on the Web, see if it works and then give
the database to Company A. Can we do that with only the Developer Edition, or
do we need to buy the SQL Server 2005? I know the only difference between the
Developer Edition and the Enterprise edition is the license, what does that
mean'
Thank you so much for any advice you have."lana1916" <lana1916@.discussions.microsoft.com> wrote in message
news:30191BB1-2DBD-4A67-BC8C-9AC8DB11649C@.microsoft.com...
>I am working for a university and we received funding to create an online
> searchable database for Company A. Company A has SQL Server 2005 and uses
> it
> within its company. We would like to create a database of articles and
> research for them, test it, post it on the Web, see if it works and then
> give
> the database to Company A. Can we do that with only the Developer Edition,
> or
> do we need to buy the SQL Server 2005? I know the only difference between
> the
> Developer Edition and the Enterprise edition is the license, what does
> that
> mean'
> Thank you so much for any advice you have
Here's the operative language from the SQL Server 2005 Developer Edition
license
--
If you comply with these license terms, you have the rights below for each
license you acquire.
1. OVERVIEW.
a. Software. The software includes development tools, software programs
and documentation.
b. License Model. The software is licensed on a per user basis.
2. INSTALLATION AND USE RIGHTS.
a. General. One user may install and use copies of the software to
design, develop, test and demonstrate your programs. Testing does not
include staging on a server in a production environment, such as loading
content prior to production use.
b. Included Microsoft Programs. These license terms apply to all
Microsoft programs included with the software. If the license terms with
any of those programs give you other rights that do not expressly conflict
with these license terms, you also have those rights.
3. ADDITIONAL LICENSING REQUIREMENTS AND/OR USE RIGHTS.
a. User Testing. Your end users may access the software to perform
acceptance tests on your programs.
b. Demonstration. Any person that has access to your internal network
may install and use copies of the software to demonstrate use of your
programs with the software. Those copies may not be used for any other
purpose.
--
If this doesn't answer your question, you might want to check with your
Microsoft representitive. Note that any number of developers, each of whom
owns a seperate Developer Edition license, can share one server instance of
SQL Server Developer edition.
To move from development to production an instance of SQL Server Developer
Edition can be upgraded to SQL Server Enterprise Edition, or the database
can be moved to a server running any other edition of SQL Server.
David.|||The fact that you want to post it on the Web is usually considered by
Microsoft as a production database; so the developer edition is not
sufficient. However, as this is only for tests, SQL-Server Express 2005
should be sufficient as the backend for this web thing; so you will be OK if
you use the Express edition as your backend database.
--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: http://cerbermail.com/?QugbLEWINF
"lana1916" <lana1916@.discussions.microsoft.com> wrote in message
news:30191BB1-2DBD-4A67-BC8C-9AC8DB11649C@.microsoft.com...
>I am working for a university and we received funding to create an online
> searchable database for Company A. Company A has SQL Server 2005 and uses
> it
> within its company. We would like to create a database of articles and
> research for them, test it, post it on the Web, see if it works and then
> give
> the database to Company A. Can we do that with only the Developer Edition,
> or
> do we need to buy the SQL Server 2005? I know the only difference between
> the
> Developer Edition and the Enterprise edition is the license, what does
> that
> mean'
> Thank you so much for any advice you have.

Friday, February 17, 2012

Develop multiusers applications with SQL Server Express

Can I develop applications with SQL Server Express that I have more than one user in several computers working with the same database on a server, or I can only develop applications with only one user with a local database with SQL Server Express?

SQL Server Express will support multiple users. To connect from other computers you must first enable "Local and remote connections" in the Surface Area configuration tool .

Karl

|||

You should also read the Blog entry at http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx. You may need to enable SQL Browser and create Excpetions in your Firewall to allow people to connect to your SQL Express server. It all depends on the configuration of your computer and how you want to connect.

Regards,
Mike Wachal
SQL Express