Showing posts with label operation. Show all posts
Showing posts with label operation. Show all posts

Monday, March 19, 2012

Check Database Operation

Hi,
I want to check that which operation like Insert, Update or Delete is
performed on the table in a trigger written for all the these opertaions.
Is there is any function from which I can know this?
Thanks.
The only way you can tell in a trigger is the presence or absence of rows in
the inserted and deleted table:
1. No rows in either table - nothing was changed
2. Rows in inserted , none in deleted - Insert
3. Rows in deleted , non in inserted - Delete
4. Rows in both - Update
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Syed Zulfiqar" <zulfiqar_syed@.hotmail.com> wrote in message
news:uzu3YIgHEHA.548@.TK2MSFTNGP09.phx.gbl...
> Hi,
> I want to check that which operation like Insert, Update or Delete is
> performed on the table in a trigger written for all the these opertaions.
> Is there is any function from which I can know this?
> Thanks.
>

Check Database Operation

Hi,
I want to check that which operation like Insert, Update or Delete is
performed on the table in a trigger written for all the these opertaions.
Is there is any function from which I can know this?
Thanks.The only way you can tell in a trigger is the presence or absence of rows in
the inserted and deleted table:
1. No rows in either table - nothing was changed
2. Rows in inserted , none in deleted - Insert
3. Rows in deleted , non in inserted - Delete
4. Rows in both - Update
--
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Syed Zulfiqar" <zulfiqar_syed@.hotmail.com> wrote in message
news:uzu3YIgHEHA.548@.TK2MSFTNGP09.phx.gbl...
> Hi,
> I want to check that which operation like Insert, Update or Delete is
> performed on the table in a trigger written for all the these opertaions.
> Is there is any function from which I can know this?
> Thanks.
>

Check Database Operation

Hi,
I want to check that which operation like Insert, Update or Delete is
performed on the table in a trigger written for all the these opertaions.
Is there is any function from which I can know this?
Thanks.The only way you can tell in a trigger is the presence or absence of rows in
the inserted and deleted table:
1. No rows in either table - nothing was changed
2. Rows in inserted , none in deleted - Insert
3. Rows in deleted , non in inserted - Delete
4. Rows in both - Update
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Syed Zulfiqar" <zulfiqar_syed@.hotmail.com> wrote in message
news:uzu3YIgHEHA.548@.TK2MSFTNGP09.phx.gbl...
> Hi,
> I want to check that which operation like Insert, Update or Delete is
> performed on the table in a trigger written for all the these opertaions.
> Is there is any function from which I can know this?
> Thanks.
>

Friday, February 10, 2012

Changing/Moving SQL Server 2000 to new Domain

Hi
I wonder if the follwoing operation can be done ?
Can I move SQL Server 2000 running on Windows 2000 from
one Domain to another ? Will the server and DB's will be
functional ?
Thx
Bar
Hi,
No issues, Only thing is you need to create a Trust relationship with old
domain, So that users in the old domain also can access.
But the following things also need to be considered
1. If the SQL server in new domain is a new name then, Issue the below
commands based on the new server name
sp_dropserver <Old server name>
go
sp_addserver <new server name>,Local
2. If it is new ip address
Change the connectiction string in your application server or connection
file
3. If you are using any server alias using TCP/IP
Modify the existing alias with new IP address using "CLient Network
utility"
Thanks
Hari
MCDBA
"Bar" <anonymous@.discussions.microsoft.com> wrote in message
news:701101c42fcf$29f05ad0$a601280a@.phx.gbl...
> Hi
> I wonder if the follwoing operation can be done ?
> Can I move SQL Server 2000 running on Windows 2000 from
> one Domain to another ? Will the server and DB's will be
> functional ?
> Thx
> Bar

Changing/Moving SQL Server 2000 to new Domain

Hi
I wonder if the follwoing operation can be done '
Can I move SQL Server 2000 running on Windows 2000 from
one Domain to another ? Will the server and DB's will be
functional '
Thx
BarHi,
No issues, Only thing is you need to create a Trust relationship with old
domain, So that users in the old domain also can access.
But the following things also need to be considered
----
1. If the SQL server in new domain is a new name then, Issue the below
commands based on the new server name
sp_dropserver <Old server name>
go
sp_addserver <new server name>,Local
2. If it is new ip address
Change the connectiction string in your application server or connection
file
3. If you are using any server alias using TCP/IP
Modify the existing alias with new IP address using "CLient Network
utility"
Thanks
Hari
MCDBA
"Bar" <anonymous@.discussions.microsoft.com> wrote in message
news:701101c42fcf$29f05ad0$a601280a@.phx.gbl...
> Hi
> I wonder if the follwoing operation can be done '
> Can I move SQL Server 2000 running on Windows 2000 from
> one Domain to another ? Will the server and DB's will be
> functional '
> Thx
> Bar

Changing/Moving SQL Server 2000 to new Domain

Hi
I wonder if the follwoing operation can be done '
Can I move SQL Server 2000 running on Windows 2000 from
one Domain to another ? Will the server and DB's will be
functional '
Thx
BarHi,
No issues, Only thing is you need to create a Trust relationship with old
domain, So that users in the old domain also can access.
But the following things also need to be considered
----
1. If the SQL server in new domain is a new name then, Issue the below
commands based on the new server name
sp_dropserver <Old server name>
go
sp_addserver <new server name>,Local
2. If it is new ip address
Change the connectiction string in your application server or connection
file
3. If you are using any server alias using TCP/IP
Modify the existing alias with new IP address using "CLient Network
utility"
Thanks
Hari
MCDBA
"Bar" <anonymous@.discussions.microsoft.com> wrote in message
news:701101c42fcf$29f05ad0$a601280a@.phx.gbl...
> Hi
> I wonder if the follwoing operation can be done '
> Can I move SQL Server 2000 running on Windows 2000 from
> one Domain to another ? Will the server and DB's will be
> functional '
> Thx
> Bar