I'm trying to do a calculation on a couple of number and
return a decimal number. An example of what I'm trying
to do is:
select (44-2)/44
How can I make this return 0.96
TIA,
Vic
Hi,
select round((44-2)/44.0,2)
Thanks
Hari
MCDBA
"Vic" <vduran@.specpro-inc.com> wrote in message
news:2472501c45f6c$b91a1ee0$a401280a@.phx.gbl...
> I'm trying to do a calculation on a couple of number and
> return a decimal number. An example of what I'm trying
> to do is:
> select (44-2)/44
> How can I make this return 0.96
> TIA,
> Vic
Showing posts with label couple. Show all posts
Showing posts with label couple. Show all posts
Sunday, March 25, 2012
calculated field question
I'm trying to do a calculation on a couple of number and
return a decimal number. An example of what I'm trying
to do is:
select (44-2)/44
How can I make this return 0.96
TIA,
VicHi,
select round((44-2)/44.0,2)
Thanks
Hari
MCDBA
"Vic" <vduran@.specpro-inc.com> wrote in message
news:2472501c45f6c$b91a1ee0$a401280a@.phx
.gbl...
> I'm trying to do a calculation on a couple of number and
> return a decimal number. An example of what I'm trying
> to do is:
> select (44-2)/44
> How can I make this return 0.96
> TIA,
> Vicsql
return a decimal number. An example of what I'm trying
to do is:
select (44-2)/44
How can I make this return 0.96
TIA,
VicHi,
select round((44-2)/44.0,2)
Thanks
Hari
MCDBA
"Vic" <vduran@.specpro-inc.com> wrote in message
news:2472501c45f6c$b91a1ee0$a401280a@.phx
.gbl...
> I'm trying to do a calculation on a couple of number and
> return a decimal number. An example of what I'm trying
> to do is:
> select (44-2)/44
> How can I make this return 0.96
> TIA,
> Vicsql
Thursday, March 22, 2012
calculated field question
I'm trying to do a calculation on a couple of number and
return a decimal number. An example of what I'm trying
to do is:
select (44-2)/44
How can I make this return 0.96
TIA,
VicHi,
select round((44-2)/44.0,2)
--
Thanks
Hari
MCDBA
"Vic" <vduran@.specpro-inc.com> wrote in message
news:2472501c45f6c$b91a1ee0$a401280a@.phx.gbl...
> I'm trying to do a calculation on a couple of number and
> return a decimal number. An example of what I'm trying
> to do is:
> select (44-2)/44
> How can I make this return 0.96
> TIA,
> Vic
return a decimal number. An example of what I'm trying
to do is:
select (44-2)/44
How can I make this return 0.96
TIA,
VicHi,
select round((44-2)/44.0,2)
--
Thanks
Hari
MCDBA
"Vic" <vduran@.specpro-inc.com> wrote in message
news:2472501c45f6c$b91a1ee0$a401280a@.phx.gbl...
> I'm trying to do a calculation on a couple of number and
> return a decimal number. An example of what I'm trying
> to do is:
> select (44-2)/44
> How can I make this return 0.96
> TIA,
> Vic
Saturday, February 25, 2012
C2 auditing on SQL Server
I currently have C2 auditing turned on for a server, and an audit trace file
gets written to the default database directory every couple of hours. Is
there a way to get C2 auditing to write to a separate database for querying?
And is there also a way to turn C2 on/off without restarting the server?
Is C2 the appropriate tool for internal auditing, or is there a
better tool out there for getting reports, etc?
cross posted to .securitytools
Thanks,
-RSHi,
A normal profiler using the properties windows can save the contents to a
table. I am not sure on how tyo automate this in C2 auditing, because
it craetes seperate files.
And is there also a way to turn C2 on/off without restarting the server?
No.
Is C2 the appropriate tool for internal auditing, or is there a better tool
out there for getting reports, etc?
Yes, But might not be useful for reporting. Take a look into the product
from lumigent
http://www.lumigent.com/Downloads/
Have a look into the below site for more information on c2 Audit
http://msdn.microsoft.com/library/d...-us/adminsql/ad
_security_2ard.asp
Thanks
Hari
MCDBA
"RS" <rspen@.yahoo.com> wrote in message
news:e$4zwZ2CEHA.3748@.TK2MSFTNGP11.phx.gbl...
> I currently have C2 auditing turned on for a server, and an audit trace
file
> gets written to the default database directory every couple of hours. Is
> there a way to get C2 auditing to write to a separate database for
querying?
> And is there also a way to turn C2 on/off without restarting the server?
> Is C2 the appropriate tool for internal auditing, or is there a
> better tool out there for getting reports, etc?
> cross posted to .securitytools
> Thanks,
> -RS
>|||C2 auditing is primary for forensics purposes and not meant to be used for r
eporting. The logs themselves write to 200mb and then roll over, so it's a
hassle at best to try and get anything meaningful from a reporting standpoin
t. I'd recommend running a
different profile for what you specifically want.|||Thanks..that helps. I think we are going to look at Lumigent, but it is
pricey. Is there anything that offers a good reporting tool for trace files
without being so expensive? Maybe there is a market opportunity here.
-RS
"binary_designs" <anonymous@.discussions.microsoft.com> wrote in message
news:A0B925B8-6ACC-4802-9BBB-26882634DCB2@.microsoft.com...
> C2 auditing is primary for forensics purposes and not meant to be used for
reporting. The logs themselves write to 200mb and then roll over, so it's a
hassle at best to try and get anything meaningful from a reporting
standpoint. I'd recommend running a different profile for what you
specifically want.
gets written to the default database directory every couple of hours. Is
there a way to get C2 auditing to write to a separate database for querying?
And is there also a way to turn C2 on/off without restarting the server?
Is C2 the appropriate tool for internal auditing, or is there a
better tool out there for getting reports, etc?
cross posted to .securitytools
Thanks,
-RSHi,
A normal profiler using the properties windows can save the contents to a
table. I am not sure on how tyo automate this in C2 auditing, because
it craetes seperate files.
And is there also a way to turn C2 on/off without restarting the server?
No.
Is C2 the appropriate tool for internal auditing, or is there a better tool
out there for getting reports, etc?
Yes, But might not be useful for reporting. Take a look into the product
from lumigent
http://www.lumigent.com/Downloads/
Have a look into the below site for more information on c2 Audit
http://msdn.microsoft.com/library/d...-us/adminsql/ad
_security_2ard.asp
Thanks
Hari
MCDBA
"RS" <rspen@.yahoo.com> wrote in message
news:e$4zwZ2CEHA.3748@.TK2MSFTNGP11.phx.gbl...
> I currently have C2 auditing turned on for a server, and an audit trace
file
> gets written to the default database directory every couple of hours. Is
> there a way to get C2 auditing to write to a separate database for
querying?
> And is there also a way to turn C2 on/off without restarting the server?
> Is C2 the appropriate tool for internal auditing, or is there a
> better tool out there for getting reports, etc?
> cross posted to .securitytools
> Thanks,
> -RS
>|||C2 auditing is primary for forensics purposes and not meant to be used for r
eporting. The logs themselves write to 200mb and then roll over, so it's a
hassle at best to try and get anything meaningful from a reporting standpoin
t. I'd recommend running a
different profile for what you specifically want.|||Thanks..that helps. I think we are going to look at Lumigent, but it is
pricey. Is there anything that offers a good reporting tool for trace files
without being so expensive? Maybe there is a market opportunity here.
-RS
"binary_designs" <anonymous@.discussions.microsoft.com> wrote in message
news:A0B925B8-6ACC-4802-9BBB-26882634DCB2@.microsoft.com...
> C2 auditing is primary for forensics purposes and not meant to be used for
reporting. The logs themselves write to 200mb and then roll over, so it's a
hassle at best to try and get anything meaningful from a reporting
standpoint. I'd recommend running a different profile for what you
specifically want.
c0000005 EXCEPTION_ACCESS_VIOLATION on Linked server access
Hi,
My server is running SQL Server 7.00.1063 on Windows 2000 Server SP3. A couple of linked server are configured on this server. These linked servers connect to SQL 7 servers, and also SQL 2000 servers.
If I try to use one of these linked servers in a SELECT query, I always get an access violation. System tables or user tables in any database, it don't work. A simple query like SELECT * from LINK1.master.dbo.sysprocesses crashes. Even a query on a non
-existing table (i.e. SELECT * FROM LINK1.my_db.dbo.unknowntable) crashes with an acces violation. I tried to create a new linked server, but this new one still don't work. Even worse: if I try SELECT * FROM A.B.C.D, It crashed with an access violation
instead of raising an error telling that A is not in sysservers...
I tried to reboot the server, but that didn't solve anything.
I ran a DBCC CHECKDB on all databases, but no error was found.
If this can helps to identify the problem, this is the Short Stack Dump found in the SQL000000.dmp files:
0x780011cd Module(MSVCRT+11cd) (wcslen+4)
0x005ec588 Module(sqlservr+1ec588) (FEqWsz+20)
0x00540ae6 Module(sqlservr+140ae6) (FOpenRange+ce)
0x004406f6 Module(sqlservr+406f6) (colnames+dac)
0x00440388 Module(sqlservr+40388) (colnames+7a)
0x004402d6 Module(sqlservr+402d6) (CProchdr::NormQuery+30)
0x00532811 Module(sqlservr+132811) (CProchdr::FCompile+1bf)
0x0040e1c8 Module(sqlservr+e1c8) (CSQLSource::FTransform+234)
0x00537769 Module(sqlservr+137769) (CSQLObject::FTransform2+31c)
0x0046b90d Module(sqlservr+6b90d) (CSQLObject::FGetFromDisk+627)
0x0041ff1c Module(sqlservr+1ff1c) (CSQLObject::FTransform+21a)
0x0060737b Module(sqlservr+20737b) (CSQLObject::PtrGetCmd+3e)
0x00636b94 Module(sqlservr+236b94) (FGetViewColumns+f6)
0x00540dcb Module(sqlservr+140dcb) (FOpenRange+412)
0x004406f6 Module(sqlservr+406f6) (colnames+dac)
0x00440388 Module(sqlservr+40388) (colnames+7a)
0x004402d6 Module(sqlservr+402d6) (CProchdr::NormQuery+30)
0x0043df13 Module(sqlservr+3df13) (CProchdr::FCompile+23f)
0x0040e1c8 Module(sqlservr+e1c8) (CSQLSource::FTransform+234)
0x00420394 Module(sqlservr+20394) (CSQLObject::FTransform2+1ab)
0x0046b90d Module(sqlservr+6b90d) (CSQLObject::FGetFromDisk+627)
0x0041ff1c Module(sqlservr+1ff1c) (CSQLObject::FTransform+21a)
0x0040dd22 Module(sqlservr+dd22) (CSQLSource::Execute+11d)
0x004ff1e3 Module(sqlservr+ff1e3) (CStmtExec::XretLocalExec+127)
0x004ff0a2 Module(sqlservr+ff0a2) (CStmtExec::XretExecute+253)
0x0040e9ab Module(sqlservr+e9ab) (CMsqlExecContext::ExecuteStmts+11b)
0x0040e4c0 Module(sqlservr+e4c0) (CMsqlExecContext::Execute+1bb)
This server has been built a year ago, and linked servers had always worked as expected until today...
Does anyone have an idea on how to solve this?
Thank you very much.
Eric Prevost
Hi,
I solved my problem. @.@.servername was returning NULL instead of server name. I used sp_dropserver / sp_addserver and restarted SQL Server. The problem is gone.
My server is running SQL Server 7.00.1063 on Windows 2000 Server SP3. A couple of linked server are configured on this server. These linked servers connect to SQL 7 servers, and also SQL 2000 servers.
If I try to use one of these linked servers in a SELECT query, I always get an access violation. System tables or user tables in any database, it don't work. A simple query like SELECT * from LINK1.master.dbo.sysprocesses crashes. Even a query on a non
-existing table (i.e. SELECT * FROM LINK1.my_db.dbo.unknowntable) crashes with an acces violation. I tried to create a new linked server, but this new one still don't work. Even worse: if I try SELECT * FROM A.B.C.D, It crashed with an access violation
instead of raising an error telling that A is not in sysservers...
I tried to reboot the server, but that didn't solve anything.
I ran a DBCC CHECKDB on all databases, but no error was found.
If this can helps to identify the problem, this is the Short Stack Dump found in the SQL000000.dmp files:
0x780011cd Module(MSVCRT+11cd) (wcslen+4)
0x005ec588 Module(sqlservr+1ec588) (FEqWsz+20)
0x00540ae6 Module(sqlservr+140ae6) (FOpenRange+ce)
0x004406f6 Module(sqlservr+406f6) (colnames+dac)
0x00440388 Module(sqlservr+40388) (colnames+7a)
0x004402d6 Module(sqlservr+402d6) (CProchdr::NormQuery+30)
0x00532811 Module(sqlservr+132811) (CProchdr::FCompile+1bf)
0x0040e1c8 Module(sqlservr+e1c8) (CSQLSource::FTransform+234)
0x00537769 Module(sqlservr+137769) (CSQLObject::FTransform2+31c)
0x0046b90d Module(sqlservr+6b90d) (CSQLObject::FGetFromDisk+627)
0x0041ff1c Module(sqlservr+1ff1c) (CSQLObject::FTransform+21a)
0x0060737b Module(sqlservr+20737b) (CSQLObject::PtrGetCmd+3e)
0x00636b94 Module(sqlservr+236b94) (FGetViewColumns+f6)
0x00540dcb Module(sqlservr+140dcb) (FOpenRange+412)
0x004406f6 Module(sqlservr+406f6) (colnames+dac)
0x00440388 Module(sqlservr+40388) (colnames+7a)
0x004402d6 Module(sqlservr+402d6) (CProchdr::NormQuery+30)
0x0043df13 Module(sqlservr+3df13) (CProchdr::FCompile+23f)
0x0040e1c8 Module(sqlservr+e1c8) (CSQLSource::FTransform+234)
0x00420394 Module(sqlservr+20394) (CSQLObject::FTransform2+1ab)
0x0046b90d Module(sqlservr+6b90d) (CSQLObject::FGetFromDisk+627)
0x0041ff1c Module(sqlservr+1ff1c) (CSQLObject::FTransform+21a)
0x0040dd22 Module(sqlservr+dd22) (CSQLSource::Execute+11d)
0x004ff1e3 Module(sqlservr+ff1e3) (CStmtExec::XretLocalExec+127)
0x004ff0a2 Module(sqlservr+ff0a2) (CStmtExec::XretExecute+253)
0x0040e9ab Module(sqlservr+e9ab) (CMsqlExecContext::ExecuteStmts+11b)
0x0040e4c0 Module(sqlservr+e4c0) (CMsqlExecContext::Execute+1bb)
This server has been built a year ago, and linked servers had always worked as expected until today...
Does anyone have an idea on how to solve this?
Thank you very much.
Eric Prevost
Hi,
I solved my problem. @.@.servername was returning NULL instead of server name. I used sp_dropserver / sp_addserver and restarted SQL Server. The problem is gone.
c0000005 EXCEPTION_ACCESS_VIOLATION on Linked server access
Hi,
My server is running SQL Server 7.00.1063 on Windows 2000 Server SP3. A cou
ple of linked server are configured on this server. These linked servers co
nnect to SQL 7 servers, and also SQL 2000 servers.
If I try to use one of these linked servers in a SELECT query, I always get
an access violation. System tables or user tables in any database, it don't
work. A simple query like SELECT * from LINK1.master.dbo.sysprocesses cras
hes. Even a query on a non
-existing table (i.e. SELECT * FROM LINK1.my_db.dbo.unknowntable) crashes wi
th an acces violation. I tried to create a new linked server, but this new
one still don't work. Even worse: if I try SELECT * FROM A.B.C.D, It crash
ed with an access violation
instead of raising an error telling that A is not in sysservers...
I tried to reboot the server, but that didn't solve anything.
I ran a DBCC CHECKDB on all databases, but no error was found.
If this can helps to identify the problem, this is the Short Stack Dump foun
d in the SQL000000.dmp files:
0x780011cd Module(MSVCRT+11cd) (wcslen+4)
0x005ec588 Module(sqlservr+1ec588) (FEqWsz+20)
0x00540ae6 Module(sqlservr+140ae6) (FOpenRange+ce)
0x004406f6 Module(sqlservr+406f6) (colnames+dac)
0x00440388 Module(sqlservr+40388) (colnames+7a)
0x004402d6 Module(sqlservr+402d6) (CProchdr::NormQuery+30)
0x00532811 Module(sqlservr+132811) (CProchdr::FCompile+1bf)
0x0040e1c8 Module(sqlservr+e1c8) (CSQLSource::FTransform+234)
0x00537769 Module(sqlservr+137769) (CSQLObject::FTransform2+31c)
0x0046b90d Module(sqlservr+6b90d) (CSQLObject::FGetFromDisk+627)
0x0041ff1c Module(sqlservr+1ff1c) (CSQLObject::FTransform+21a)
0x0060737b Module(sqlservr+20737b) (CSQLObject::PtrGetCmd+3e)
0x00636b94 Module(sqlservr+236b94) (FGetViewColumns+f6)
0x00540dcb Module(sqlservr+140dcb) (FOpenRange+412)
0x004406f6 Module(sqlservr+406f6) (colnames+dac)
0x00440388 Module(sqlservr+40388) (colnames+7a)
0x004402d6 Module(sqlservr+402d6) (CProchdr::NormQuery+30)
0x0043df13 Module(sqlservr+3df13) (CProchdr::FCompile+23f)
0x0040e1c8 Module(sqlservr+e1c8) (CSQLSource::FTransform+234)
0x00420394 Module(sqlservr+20394) (CSQLObject::FTransform2+1ab)
0x0046b90d Module(sqlservr+6b90d) (CSQLObject::FGetFromDisk+627)
0x0041ff1c Module(sqlservr+1ff1c) (CSQLObject::FTransform+21a)
0x0040dd22 Module(sqlservr+dd22) (CSQLSource::Execute+11d)
0x004ff1e3 Module(sqlservr+ff1e3) (CStmtExec::XretLocalExec+127)
0x004ff0a2 Module(sqlservr+ff0a2) (CStmtExec::XretExecute+253)
0x0040e9ab Module(sqlservr+e9ab) (CMsqlExecContext::ExecuteStmts+11b)
0x0040e4c0 Module(sqlservr+e4c0) (CMsqlExecContext::Execute+1bb)
This server has been built a year ago, and linked servers had always worked
as expected until today...
Does anyone have an idea on how to solve this?
Thank you very much.
Eric PrevostHi,
I solved my problem. @.@.servername was returning NULL instead of server name
. I used sp_dropserver / sp_addserver and restarted SQL Server. The proble
m is gone.
My server is running SQL Server 7.00.1063 on Windows 2000 Server SP3. A cou
ple of linked server are configured on this server. These linked servers co
nnect to SQL 7 servers, and also SQL 2000 servers.
If I try to use one of these linked servers in a SELECT query, I always get
an access violation. System tables or user tables in any database, it don't
work. A simple query like SELECT * from LINK1.master.dbo.sysprocesses cras
hes. Even a query on a non
-existing table (i.e. SELECT * FROM LINK1.my_db.dbo.unknowntable) crashes wi
th an acces violation. I tried to create a new linked server, but this new
one still don't work. Even worse: if I try SELECT * FROM A.B.C.D, It crash
ed with an access violation
instead of raising an error telling that A is not in sysservers...
I tried to reboot the server, but that didn't solve anything.
I ran a DBCC CHECKDB on all databases, but no error was found.
If this can helps to identify the problem, this is the Short Stack Dump foun
d in the SQL000000.dmp files:
0x780011cd Module(MSVCRT+11cd) (wcslen+4)
0x005ec588 Module(sqlservr+1ec588) (FEqWsz+20)
0x00540ae6 Module(sqlservr+140ae6) (FOpenRange+ce)
0x004406f6 Module(sqlservr+406f6) (colnames+dac)
0x00440388 Module(sqlservr+40388) (colnames+7a)
0x004402d6 Module(sqlservr+402d6) (CProchdr::NormQuery+30)
0x00532811 Module(sqlservr+132811) (CProchdr::FCompile+1bf)
0x0040e1c8 Module(sqlservr+e1c8) (CSQLSource::FTransform+234)
0x00537769 Module(sqlservr+137769) (CSQLObject::FTransform2+31c)
0x0046b90d Module(sqlservr+6b90d) (CSQLObject::FGetFromDisk+627)
0x0041ff1c Module(sqlservr+1ff1c) (CSQLObject::FTransform+21a)
0x0060737b Module(sqlservr+20737b) (CSQLObject::PtrGetCmd+3e)
0x00636b94 Module(sqlservr+236b94) (FGetViewColumns+f6)
0x00540dcb Module(sqlservr+140dcb) (FOpenRange+412)
0x004406f6 Module(sqlservr+406f6) (colnames+dac)
0x00440388 Module(sqlservr+40388) (colnames+7a)
0x004402d6 Module(sqlservr+402d6) (CProchdr::NormQuery+30)
0x0043df13 Module(sqlservr+3df13) (CProchdr::FCompile+23f)
0x0040e1c8 Module(sqlservr+e1c8) (CSQLSource::FTransform+234)
0x00420394 Module(sqlservr+20394) (CSQLObject::FTransform2+1ab)
0x0046b90d Module(sqlservr+6b90d) (CSQLObject::FGetFromDisk+627)
0x0041ff1c Module(sqlservr+1ff1c) (CSQLObject::FTransform+21a)
0x0040dd22 Module(sqlservr+dd22) (CSQLSource::Execute+11d)
0x004ff1e3 Module(sqlservr+ff1e3) (CStmtExec::XretLocalExec+127)
0x004ff0a2 Module(sqlservr+ff0a2) (CStmtExec::XretExecute+253)
0x0040e9ab Module(sqlservr+e9ab) (CMsqlExecContext::ExecuteStmts+11b)
0x0040e4c0 Module(sqlservr+e4c0) (CMsqlExecContext::Execute+1bb)
This server has been built a year ago, and linked servers had always worked
as expected until today...
Does anyone have an idea on how to solve this?
Thank you very much.
Eric PrevostHi,
I solved my problem. @.@.servername was returning NULL instead of server name
. I used sp_dropserver / sp_addserver and restarted SQL Server. The proble
m is gone.
Friday, February 24, 2012
C#/SQL noob question
Using C# and ASP.NET, I need to connect to an SQL Server running Reporting Services, grab a report, supply a couple of parameters and an output format, and render a stream that I can write to a browser. Can anybody point me to an example or tutorial explaining how to do that?
thanks!
You probably want to start here:
http://msdn.microsoft.com/sql/bi/reporting/default.aspx?pull=/library/en-us/dnsql90/html/integratrsapp.asp
Subscribe to:
Posts (Atom)