Showing posts with label regarding. Show all posts
Showing posts with label regarding. Show all posts

Tuesday, March 27, 2012

alias naming

Hi,
I want help regarding the following scenario...
My scenario is ...
I want to give description for each field somewhere in the database..
such that i should use that description as alias name in the SQL queries or Stored procedures...
For example...
Table : 'Table1'

Clumns Description

Field1 xxx
Field2 yyy

Query : Select Field1 as xxx , Field2 as yyy from Table1.

Mr requirement...
1.I want to specify tag or description for each field
2. if i change the description 'xxx' as 'x1x1x1',it should be automatically updated in the Query,Views,Storedproc.. wherever the table and the fields are referred.

can any one help me?.If you are storing alias name for columns,
you have to use dynamic sql, to get the results.

I think, your requirement is so complicated to implement. :D
What advantages you will get, if you implement it..? :rolleyes:

Regards,
Selva Balaji. B

Originally posted by durgadevi_n
Hi,
I want help regarding the following scenario...
My scenario is ...
I want to give description for each field somewhere in the database..
such that i should use that description as alias name in the SQL queries or Stored procedures...
For example...
Table : 'Table1'

Clumns Description

Field1 xxx
Field2 yyy

Query : Select Field1 as xxx , Field2 as yyy from Table1.

Mr requirement...
1.I want to specify tag or description for each field
2. if i change the description 'xxx' as 'x1x1x1',it should be automatically updated in the Query,Views,Storedproc.. wherever the table and the fields are referred.

can any one help me?. :D :D :D|||There isn't such a functionality within the database. Using the standard tools like Enterprise Manager or Query Analyzer, you have to use the physical names, and to assign the logical names every time again.

You may consider to make a view for each table assigning your logical names.

Client tools, however, can replace the physical names by logical ones in the user interface. Look, for example, the DB Explorer (http://www.DB-Explorer.com).|||Hi,
Actually in my application...
I am creating more stored procedures based on a single table...(database already used by another application).
Since i can't change the field names, i am making use of alias name for the required fields in Stored procedures and binding tha data in the front end where the alias name gets displayed.
I've more than 500 stored procedures in my database.
If I want to change a field caption ,
I cannot change the existing field's name since it is already used by other application.
Also It is very hard to find out and change the alias name in each and every stored procedure wherever it is referenced.

So i am trying to look in other chances...to reflect the change in every stored procedure with a single move.

Is it possible?...
plz help me...
bye
by
durga|||And what about using views? You may consider not to assign your alias within every stored proc, but once in a view definition. If you change aliases in a view, your stored proc will return the changed name, assuming that you are working with SELECT * statements. This is consistent for all stored proc based on a particular view.|||You may want to have a look at extended properties
(sp_addextendedproperty, sp_updateextendedproperty, sp_dropextendedproperty).

It will not let you use the alias'es directly, but you do not have to come up with tables/functions etc to utilize them.

To use them you must (by code if you can, use syscomments or sqldmo) regenerate alll ddl's wher ethey are referenced (sysdepends, sysreferences).

not a small task...

Originally posted by durgadevi_n
Hi,
I want help regarding the following scenario...
My scenario is ...
I want to give description for each field somewhere in the database..
such that i should use that description as alias name in the SQL queries or Stored procedures...
For example...
Table : 'Table1'

Clumns Description

Field1 xxx
Field2 yyy

Query : Select Field1 as xxx , Field2 as yyy from Table1.

Mr requirement...
1.I want to specify tag or description for each field
2. if i change the description 'xxx' as 'x1x1x1',it should be automatically updated in the Query,Views,Storedproc.. wherever the table and the fields are referred.

can any one help me?.

Tuesday, March 20, 2012

Alert

Hi,
I have a question regarding alerts in SQL Server.
From what I`ve read an alert tracks a certain logged information and if the
info matches the alert definition then the alert fires up.
My question is, for instance, I want to define a Perfmon alert that will
trigger a message in the windows application log when something happens.
Is it possible to configure a SQL Server alert that will catch the string
defined in the Perfmon Alert, from the Windows application log...and if yes,
how can I configure the SQL Server alert.
e.g. I define a perfmon alert that says "Hello" when the disk space on C:
drive falls under 100Mb, is it possible to define a job that triggers when in
the windows application log a certain Information/Warrning/Error contains in
its definition the "Hello" string?
Thx
Razvan Dragomir,
MCSA / MCSA: Messaging, Exchange & Windows System Administrator
I meant to say "alert" not "job"...sorry for the mistake
Razvan Dragomir,
MCSA/MCSA:Messaging Exchange & Windows System Administrator
"Razvan Dragomir" wrote:

> Hi,
> I have a question regarding alerts in SQL Server.
> From what I`ve read an alert tracks a certain logged information and if the
> info matches the alert definition then the alert fires up.
> My question is, for instance, I want to define a Perfmon alert that will
> trigger a message in the windows application log when something happens.
> Is it possible to configure a SQL Server alert that will catch the string
> defined in the Perfmon Alert, from the Windows application log...and if yes,
> how can I configure the SQL Server alert.
> e.g. I define a perfmon alert that says "Hello" when the disk space on C:
> drive falls under 100Mb, is it possible to define a job that triggers when in
> the windows application log a certain Information/Warrning/Error contains in
> its definition the "Hello" string?
>
> Thx
> --
> Razvan Dragomir,
> MCSA / MCSA: Messaging, Exchange & Windows System Administrator
>

Alert

Hi,
I have a question regarding alerts in SQL Server.
From what I`ve read an alert tracks a certain logged information and if the
info matches the alert definition then the alert fires up.
My question is, for instance, I want to define a Perfmon alert that will
trigger a message in the windows application log when something happens.
Is it possible to configure a SQL Server alert that will catch the string
defined in the Perfmon Alert, from the Windows application log...and if yes,
how can I configure the SQL Server alert.
e.g. I define a perfmon alert that says "Hello" when the disk space on C:
drive falls under 100Mb, is it possible to define a job that triggers when i
n
the windows application log a certain Information/Warrning/Error contains in
its definition the "Hello" string?
Thx
--
Razvan Dragomir,
MCSA / MCSA: Messaging, Exchange & Windows System AdministratorI meant to say "alert" not "job"...sorry for the mistake
Razvan Dragomir,
MCSA/MCSA:Messaging Exchange & Windows System Administrator
"Razvan Dragomir" wrote:

> Hi,
> I have a question regarding alerts in SQL Server.
> From what I`ve read an alert tracks a certain logged information and if th
e
> info matches the alert definition then the alert fires up.
> My question is, for instance, I want to define a Perfmon alert that will
> trigger a message in the windows application log when something happens.
> Is it possible to configure a SQL Server alert that will catch the stri
ng
> defined in the Perfmon Alert, from the Windows application log...and if ye
s,
> how can I configure the SQL Server alert.
> e.g. I define a perfmon alert that says "Hello" when the disk space on C
:
> drive falls under 100Mb, is it possible to define a job that triggers when
in
> the windows application log a certain Information/Warrning/Error contains
in
> its definition the "Hello" string?
>
> Thx
> --
> Razvan Dragomir,
> MCSA / MCSA: Messaging, Exchange & Windows System Administrator
>

Friday, February 24, 2012

agent entries in registry missing after restore

Hi,
We had to back-up and restore a server due to an error
during installation regarding disk partitioning.
The server is completely restored where rights to files
have been restred and all files are in the same location
(MS Back-up). Everything seems to be working fine, except
for MS SQL server.
No MS SQL servers are available to log-on to.
Event messages 322, 19011, 208, 203, 17177 etc. appear
sample of event 322:
Event Type: Error
Event Source: SQLSERVERAGENT
Event Category: (4)
Event ID: 322
Date: 1/22/2004
Time: 12:50:14 PM
User: N/A
Computer: BLUE
Description:
The description for Event ID ( 322 ) in Source (
SQLSERVERAGENT ) cannot be found. The local computer may
not have the necessary registry information or message DLL
files to display messages from a remote computer. The
following information is part of the event: 19002,
MSSQLSERVER.
---
So the question is: he registry seems to be restored
properly, but somehow SQL server entries are not found. I
did not take a copy of the registry. Prior to deleting it.
Am I suffering a rights problem or a registry restore
problem?
Any ideas are very much appreciated!
Thanks,
SamYou can try to rebuild the registry entries, if this is the problem. When
you start the SQL Server Setup, you will find a
Rebuild Registry Option in the Advanced Setup Options.
Cheers,
Herbert
"Sam Jaarsma" <sam@.grupoamengual.com.nospam> schrieb im Newsbeitrag
news:2bb101c3e191$e3a27c10$a001280a@.phx.gbl...
quote:

> Hi,
> We had to back-up and restore a server due to an error
> during installation regarding disk partitioning.
> The server is completely restored where rights to files
> have been restred and all files are in the same location
> (MS Back-up). Everything seems to be working fine, except
> for MS SQL server.
> No MS SQL servers are available to log-on to.
> Event messages 322, 19011, 208, 203, 17177 etc. appear
> sample of event 322:
> Event Type: Error
> Event Source: SQLSERVERAGENT
> Event Category: (4)
> Event ID: 322
> Date: 1/22/2004
> Time: 12:50:14 PM
> User: N/A
> Computer: BLUE
> Description:
> The description for Event ID ( 322 ) in Source (
> SQLSERVERAGENT ) cannot be found. The local computer may
> not have the necessary registry information or message DLL
> files to display messages from a remote computer. The
> following information is part of the event: 19002,
> MSSQLSERVER.
> ---
> So the question is: he registry seems to be restored
> properly, but somehow SQL server entries are not found. I
> did not take a copy of the registry. Prior to deleting it.
> Am I suffering a rights problem or a registry restore
> problem?
> Any ideas are very much appreciated!
> Thanks,
> Sam
>

agent entries in registry missing after restore

Hi,
We had to back-up and restore a server due to an error
during installation regarding disk partitioning.
The server is completely restored where rights to files
have been restred and all files are in the same location
(MS Back-up). Everything seems to be working fine, except
for MS SQL server.
No MS SQL servers are available to log-on to.
Event messages 322, 19011, 208, 203, 17177 etc. appear
sample of event 322:
Event Type: Error
Event Source: SQLSERVERAGENT
Event Category: (4)
Event ID: 322
Date: 1/22/2004
Time: 12:50:14 PM
User: N/A
Computer: BLUE
Description:
The description for Event ID ( 322 ) in Source (
SQLSERVERAGENT ) cannot be found. The local computer may
not have the necessary registry information or message DLL
files to display messages from a remote computer. The
following information is part of the event: 19002,
MSSQLSERVER.
---
So the question is: he registry seems to be restored
properly, but somehow SQL server entries are not found. I
did not take a copy of the registry. Prior to deleting it.
Am I suffering a rights problem or a registry restore
problem?
Any ideas are very much appreciated!
Thanks,
SamYou can try to rebuild the registry entries, if this is the problem. When
you start the SQL Server Setup, you will find a
Rebuild Registry Option in the Advanced Setup Options.
Cheers,
Herbert
"Sam Jaarsma" <sam@.grupoamengual.com.nospam> schrieb im Newsbeitrag
news:2bb101c3e191$e3a27c10$a001280a@.phx.gbl...
> Hi,
> We had to back-up and restore a server due to an error
> during installation regarding disk partitioning.
> The server is completely restored where rights to files
> have been restred and all files are in the same location
> (MS Back-up). Everything seems to be working fine, except
> for MS SQL server.
> No MS SQL servers are available to log-on to.
> Event messages 322, 19011, 208, 203, 17177 etc. appear
> sample of event 322:
> Event Type: Error
> Event Source: SQLSERVERAGENT
> Event Category: (4)
> Event ID: 322
> Date: 1/22/2004
> Time: 12:50:14 PM
> User: N/A
> Computer: BLUE
> Description:
> The description for Event ID ( 322 ) in Source (
> SQLSERVERAGENT ) cannot be found. The local computer may
> not have the necessary registry information or message DLL
> files to display messages from a remote computer. The
> following information is part of the event: 19002,
> MSSQLSERVER.
> ---
> So the question is: he registry seems to be restored
> properly, but somehow SQL server entries are not found. I
> did not take a copy of the registry. Prior to deleting it.
> Am I suffering a rights problem or a registry restore
> problem?
> Any ideas are very much appreciated!
> Thanks,
> Sam
>