Hello,
I could not use this in the criteria filed of my query.
= System.Environment.GetEnvironmentVariable(MYID)
It gives invalid object name
System.Environment.GetEnvironmentVariable
Couldn't I use it in where clause?
Thanks,
Jim.You'll need to use it in a query expression as follows:
="select * From sysservers where srvname = '" &
System.Environment.GetEnvironmentVariable("COMPUTERNAME") & "'"
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"JIM.H." <anonymous@.discussions.microsoft.com> wrote in message
news:2cb3a01c46905$6b8d1ea0$a301280a@.phx.gbl...
> Hello,
> I could not use this in the criteria filed of my query.
> = System.Environment.GetEnvironmentVariable(MYID)
> It gives invalid object name
> System.Environment.GetEnvironmentVariable
> Couldn't I use it in where clause?
> Thanks,
> Jim.
>|||Thanks Ravi,
I am developening the query in the Data tab of report
design. Can you tell me exactly where I type this kind of
expression? I am quite new in this.
Thanks,
Jim.
>--Original Message--
>You'll need to use it in a query expression as follows:
>="select * From sysservers where srvname = '" &
>System.Environment.GetEnvironmentVariable("COMPUTERNAME")
& "'"
>--
>Ravi Mumulla (Microsoft)
>SQL Server Reporting Services
>This posting is provided "AS IS" with no warranties, and
confers no rights.
>"JIM.H." <anonymous@.discussions.microsoft.com> wrote in
message
>news:2cb3a01c46905$6b8d1ea0$a301280a@.phx.gbl...
>> Hello,
>> I could not use this in the criteria filed of my query.
>> = System.Environment.GetEnvironmentVariable(MYID)
>> It gives invalid object name
>> System.Environment.GetEnvironmentVariable
>> Couldn't I use it in where clause?
>> Thanks,
>> Jim.
>
>.
>|||Sorry I do not get picture in here, if you are talking
abouy typing it in SQL pan in Data tab, I am doing that
but it does not seem it is working.
>--Original Message--
>You'll need to type this expression in the Data pane in
Report Designer UI.
>Please see the attached image.
>--
>Ravi Mumulla (Microsoft)
>SQL Server Reporting Services
>This posting is provided "AS IS" with no warranties, and
confers no rights.
>"JIM.H." <anonymous@.discussions.microsoft.com> wrote in
message
>news:2cd0601c4691f$3cccbd90$a301280a@.phx.gbl...
>> Thanks Ravi,
>> I am developening the query in the Data tab of report
>> design. Can you tell me exactly where I type this kind
of
>> expression? I am quite new in this.
>> Thanks,
>> Jim.
>> >--Original Message--
>> >You'll need to use it in a query expression as follows:
>> >
>> >="select * From sysservers where srvname = '" &
>> >System.Environment.GetEnvironmentVariable
("COMPUTERNAME")
>> & "'"
>> >
>> >--
>> >Ravi Mumulla (Microsoft)
>> >SQL Server Reporting Services
>> >
>> >This posting is provided "AS IS" with no warranties,
and
>> confers no rights.
>> >"JIM.H." <anonymous@.discussions.microsoft.com> wrote in
>> message
>> >news:2cb3a01c46905$6b8d1ea0$a301280a@.phx.gbl...
>> >> Hello,
>> >> I could not use this in the criteria filed of my
query.
>> >> = System.Environment.GetEnvironmentVariable(MYID)
>> >> It gives invalid object name
>> >> System.Environment.GetEnvironmentVariable
>> >> Couldn't I use it in where clause?
>> >> Thanks,
>> >> Jim.
>> >>
>> >
>> >
>> >.
>> >
>
>|||You will not get the fields in the fields window automatically. So you'd
first have to type in static SQL and run it (which will generate the fields
list in the fields window) and then replace the static SQL with the query
expression.
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"JIM.H." <anonymous@.discussions.microsoft.com> wrote in message
news:2c4e501c4692f$36241410$a401280a@.phx.gbl...
> Sorry I do not get picture in here, if you are talking
> abouy typing it in SQL pan in Data tab, I am doing that
> but it does not seem it is working.
> >--Original Message--
> >You'll need to type this expression in the Data pane in
> Report Designer UI.
> >Please see the attached image.
> >
> >--
> >Ravi Mumulla (Microsoft)
> >SQL Server Reporting Services
> >
> >This posting is provided "AS IS" with no warranties, and
> confers no rights.
> >"JIM.H." <anonymous@.discussions.microsoft.com> wrote in
> message
> >news:2cd0601c4691f$3cccbd90$a301280a@.phx.gbl...
> >> Thanks Ravi,
> >> I am developening the query in the Data tab of report
> >> design. Can you tell me exactly where I type this kind
> of
> >> expression? I am quite new in this.
> >> Thanks,
> >> Jim.
> >>
> >> >--Original Message--
> >> >You'll need to use it in a query expression as follows:
> >> >
> >> >="select * From sysservers where srvname = '" &
> >> >System.Environment.GetEnvironmentVariable
> ("COMPUTERNAME")
> >> & "'"
> >> >
> >> >--
> >> >Ravi Mumulla (Microsoft)
> >> >SQL Server Reporting Services
> >> >
> >> >This posting is provided "AS IS" with no warranties,
> and
> >> confers no rights.
> >> >"JIM.H." <anonymous@.discussions.microsoft.com> wrote in
> >> message
> >> >news:2cb3a01c46905$6b8d1ea0$a301280a@.phx.gbl...
> >> >> Hello,
> >> >> I could not use this in the criteria filed of my
> query.
> >> >> = System.Environment.GetEnvironmentVariable(MYID)
> >> >> It gives invalid object name
> >> >> System.Environment.GetEnvironmentVariable
> >> >> Couldn't I use it in where clause?
> >> >> Thanks,
> >> >> Jim.
> >> >>
> >> >
> >> >
> >> >.
> >> >
> >
> >
> >sql
Showing posts with label object. Show all posts
Showing posts with label object. Show all posts
Friday, March 23, 2012
Wednesday, March 21, 2012
getdata.xml vs getdata.asp
As I've started to use XML more extensively for data transfer to web
pages, I have started to use the XMLHttpRequest object to get data
from the server. Since I want the data to be returned as XML, I have
been playing around with http: requests to SQL Server. I have also
created ASP pages that return XML after using SQL Server to collect
data.
As far as I know, these two methods are approximately equivalent. ASP
clearly has some important advantages over SQL Http requests,
maintaining session information immediately comes to mind, but does
the convenience of ASP come at a high enough cost that I should
consider using SQL Http requests?
I should clarify the question: I'm your typical geek who loves to
learn and use new technology: I'm inclined to use SQL Http requests
simply because they are new and different and I like how they can help
delegate different logical tasks in my project. Am I wasting my
client's money and my own time looking to SQL Http requests for
performance improvements?
TIA for any light you can shed on this...
Chuck Jungmann
"Chuck Jungmann" <NOchuckSPAM@.cpjj.net> wrote in message
news:frepj0ddqr0m68kt7rak5og95lv4dfg3j6@.4ax.com...
[snip]
> Am I wasting my
> client's money and my own time looking to SQL Http requests for
> performance improvements?
As with all technology, most things are a compromise. SQLXML is no
exception. I would suggest looking at the pros and cons and then choosing
the method that best suits your needs.
SQLXML vs. ASP pros:
1) Less layers (possible speed increase)
2) Not scripted (possible speed increase)
3) SQL and XML knowledge only
SQLXML vs. ASP cons:
1) Less flexible.
2) Possibly more vunerable to attacks (less testing and real-world use than
ASP)
3) Upgrade path somewhat unclear at the moment (although it looks like 2005
will provide a good upgrade path to SQLXML HTTP).
I would also suggest doing some performance tests and reliability tests to
see how your two methods measure up. I don't think your testing is a waste
of time.
Bryant
pages, I have started to use the XMLHttpRequest object to get data
from the server. Since I want the data to be returned as XML, I have
been playing around with http: requests to SQL Server. I have also
created ASP pages that return XML after using SQL Server to collect
data.
As far as I know, these two methods are approximately equivalent. ASP
clearly has some important advantages over SQL Http requests,
maintaining session information immediately comes to mind, but does
the convenience of ASP come at a high enough cost that I should
consider using SQL Http requests?
I should clarify the question: I'm your typical geek who loves to
learn and use new technology: I'm inclined to use SQL Http requests
simply because they are new and different and I like how they can help
delegate different logical tasks in my project. Am I wasting my
client's money and my own time looking to SQL Http requests for
performance improvements?
TIA for any light you can shed on this...
Chuck Jungmann
"Chuck Jungmann" <NOchuckSPAM@.cpjj.net> wrote in message
news:frepj0ddqr0m68kt7rak5og95lv4dfg3j6@.4ax.com...
[snip]
> Am I wasting my
> client's money and my own time looking to SQL Http requests for
> performance improvements?
As with all technology, most things are a compromise. SQLXML is no
exception. I would suggest looking at the pros and cons and then choosing
the method that best suits your needs.
SQLXML vs. ASP pros:
1) Less layers (possible speed increase)
2) Not scripted (possible speed increase)
3) SQL and XML knowledge only
SQLXML vs. ASP cons:
1) Less flexible.
2) Possibly more vunerable to attacks (less testing and real-world use than
ASP)
3) Upgrade path somewhat unclear at the moment (although it looks like 2005
will provide a good upgrade path to SQLXML HTTP).
I would also suggest doing some performance tests and reliability tests to
see how your two methods measure up. I don't think your testing is a waste
of time.
Bryant
Labels:
database,
datafrom,
extensively,
getdataasp,
getdataxml,
ive,
microsoft,
mysql,
object,
oracle,
server,
sql,
transfer,
webpages,
xml,
xmlhttprequest
Monday, March 12, 2012
Get the owner of a table in SQLServer
Is there any way to get the owner of a table or a database object in SQL
Server? I want to check whether a given user id is the owner of a particular
table or not.
Please help me with an example if possible.
VenkatVenkat
SELECT ROUTINE_NAME,ROUTINE_SCHEMA
FROM INFORMATION_SCHEMA.ROUTINES
WHERE OBJECTPROPERTY(OBJECT_ID(ROUTINE_SCHEMA+
'.'+ROUTINE_NAME),
'IsMsShipped')=0
"Venkat" <tammana@.inooga.com> wrote in message
news:eDZqMy%23mFHA.3304@.tk2msftngp13.phx.gbl...
> Is there any way to get the owner of a table or a database object in SQL
> Server? I want to check whether a given user id is the owner of a
> particular table or not.
> Please help me with an example if possible.
> --
> Venkat
>|||VENKAT,
Execute the below system stored procedure
sp_help <object_name>
Execute the sp_help with out parameter to get the object owners for all
objects.
Thanks
Hari
SQL Server Mvp
"Venkat" <tammana@.inooga.com> wrote in message
news:eDZqMy%23mFHA.3304@.tk2msftngp13.phx.gbl...
> Is there any way to get the owner of a table or a database object in SQL
> Server? I want to check whether a given user id is the owner of a
> particular table or not.
> Please help me with an example if possible.
> --
> Venkat
>
Server? I want to check whether a given user id is the owner of a particular
table or not.
Please help me with an example if possible.
VenkatVenkat
SELECT ROUTINE_NAME,ROUTINE_SCHEMA
FROM INFORMATION_SCHEMA.ROUTINES
WHERE OBJECTPROPERTY(OBJECT_ID(ROUTINE_SCHEMA+
'.'+ROUTINE_NAME),
'IsMsShipped')=0
"Venkat" <tammana@.inooga.com> wrote in message
news:eDZqMy%23mFHA.3304@.tk2msftngp13.phx.gbl...
> Is there any way to get the owner of a table or a database object in SQL
> Server? I want to check whether a given user id is the owner of a
> particular table or not.
> Please help me with an example if possible.
> --
> Venkat
>|||VENKAT,
Execute the below system stored procedure
sp_help <object_name>
Execute the sp_help with out parameter to get the object owners for all
objects.
Thanks
Hari
SQL Server Mvp
"Venkat" <tammana@.inooga.com> wrote in message
news:eDZqMy%23mFHA.3304@.tk2msftngp13.phx.gbl...
> Is there any way to get the owner of a table or a database object in SQL
> Server? I want to check whether a given user id is the owner of a
> particular table or not.
> Please help me with an example if possible.
> --
> Venkat
>
Wednesday, March 7, 2012
get specified permission to an object
Hi
How can I get information of permission of a user to an object in a database
.
Even if the permission was granted to the user any way:
by a database role
by an aplication role
by direct grant
by the user member of an NT group which group is in 'users' on the database
(trusted conn.)
etc.
I have to know after the connect to the database if the user have permission
or not to read - write the database tables.
Thank for any idea.
Imre AmentCheck out sp_helprotect in the BOL.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"permission to an object" <permission to an
object@.discussions.microsoft.com> wrote in message
news:BE12E14B-915E-4D6B-B5A1-08ACB267E757@.microsoft.com...
Hi
How can I get information of permission of a user to an object in a
database.
Even if the permission was granted to the user any way:
by a database role
by an aplication role
by direct grant
by the user member of an NT group which group is in 'users' on the database
(trusted conn.)
etc.
I have to know after the connect to the database if the user have permission
or not to read - write the database tables.
Thank for any idea.
Imre Ament|||Hi,
To see the object level permissions granted using "GRANT"statement see
sp_helprotect <object_name>,'user_name'
To see the assigned roles to the user in all database, execute below
sp_helplogins <Login_name>
To see the roles in a partcular database
use <dbname>
go
sp_helpuser <user_name>
Thanks
Hari
MCDBA
"permission to an object" <permission to an
object@.discussions.microsoft.com> wrote in message
news:BE12E14B-915E-4D6B-B5A1-08ACB267E757@.microsoft.com...
> Hi
> How can I get information of permission of a user to an object in a
database.
> Even if the permission was granted to the user any way:
> by a database role
> by an aplication role
> by direct grant
> by the user member of an NT group which group is in 'users' on the
database (trusted conn.)
> etc.
> I have to know after the connect to the database if the user have
permission or not to read - write the database tables.
> Thank for any idea.
> Imre Ament
>
How can I get information of permission of a user to an object in a database
.
Even if the permission was granted to the user any way:
by a database role
by an aplication role
by direct grant
by the user member of an NT group which group is in 'users' on the database
(trusted conn.)
etc.
I have to know after the connect to the database if the user have permission
or not to read - write the database tables.
Thank for any idea.
Imre AmentCheck out sp_helprotect in the BOL.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"permission to an object" <permission to an
object@.discussions.microsoft.com> wrote in message
news:BE12E14B-915E-4D6B-B5A1-08ACB267E757@.microsoft.com...
Hi
How can I get information of permission of a user to an object in a
database.
Even if the permission was granted to the user any way:
by a database role
by an aplication role
by direct grant
by the user member of an NT group which group is in 'users' on the database
(trusted conn.)
etc.
I have to know after the connect to the database if the user have permission
or not to read - write the database tables.
Thank for any idea.
Imre Ament|||Hi,
To see the object level permissions granted using "GRANT"statement see
sp_helprotect <object_name>,'user_name'
To see the assigned roles to the user in all database, execute below
sp_helplogins <Login_name>
To see the roles in a partcular database
use <dbname>
go
sp_helpuser <user_name>
Thanks
Hari
MCDBA
"permission to an object" <permission to an
object@.discussions.microsoft.com> wrote in message
news:BE12E14B-915E-4D6B-B5A1-08ACB267E757@.microsoft.com...
> Hi
> How can I get information of permission of a user to an object in a
database.
> Even if the permission was granted to the user any way:
> by a database role
> by an aplication role
> by direct grant
> by the user member of an NT group which group is in 'users' on the
database (trusted conn.)
> etc.
> I have to know after the connect to the database if the user have
permission or not to read - write the database tables.
> Thank for any idea.
> Imre Ament
>
Sunday, February 19, 2012
Get Modified datetime of an DB Object in SQL-Server 2000
Hi Wizzies,
Plz help me with this one. I know that I can get the CREATION datetime of a database object from "crdate" column of sysobjects table. Same way, is there anything in SQL-Server 2000 for fetching MODIFIED datetime of a database object?Not that I know of. In the past I've run nightly jobs against the database that compare current stored procedure CHECKSUM values against previous values to see if any were changed.
blindman
Plz help me with this one. I know that I can get the CREATION datetime of a database object from "crdate" column of sysobjects table. Same way, is there anything in SQL-Server 2000 for fetching MODIFIED datetime of a database object?Not that I know of. In the past I've run nightly jobs against the database that compare current stored procedure CHECKSUM values against previous values to see if any were changed.
blindman
Subscribe to:
Posts (Atom)