Showing posts with label anew. Show all posts
Showing posts with label anew. Show all posts

Thursday, March 8, 2012

add new user with all rights to all dbases

Kind of new to Enterprize Manager, just wondering what the steps are to add
a
new user that will have all rights to all databases? Thanks.
--
Paul G
Software engineer."Paul" <Paul@.discussions.microsoft.com> wrote in message
news:FF651560-0FE5-4B24-B9C2-C66E227CD0FB@.microsoft.com...
> Kind of new to Enterprize Manager, just wondering what the steps are to
> add a
> new user that will have all rights to all databases? Thanks.
> --
> Paul G
> Software engineer.
Add your new user normally. Either as a Windows Authenticated account or as
a SQL User account.
Add that new user to the sysadmins SQL Server group inside SQL Server.
Just a side note on security here. I hope that this is the user account
that you will be connecting with moving forward and not something you are
planning on giving to everyone who uses the database. ;-)
Rick Sawtell
MCT, MCSD, MCDBA|||Thanks for the response. Actually I was trying to set up an account for a
database administrator that could administer all dbases. This would only be
used by one individual.
"Rick Sawtell" wrote:

> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> news:FF651560-0FE5-4B24-B9C2-C66E227CD0FB@.microsoft.com...
> Add your new user normally. Either as a Windows Authenticated account or
as
> a SQL User account.
> Add that new user to the sysadmins SQL Server group inside SQL Server.
>
> Just a side note on security here. I hope that this is the user account
> that you will be connecting with moving forward and not something you are
> planning on giving to everyone who uses the database. ;-)
>
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>|||If it is OK to have sysadmins privileges for the person, just add a login fo
r the person, and make
it sysadmin.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:6401A53E-E9C0-41F9-9E08-C58B82148BD0@.microsoft.com...[vbcol=seagreen]
> Thanks for the response. Actually I was trying to set up an account for a
> database administrator that could administer all dbases. This would only
be
> used by one individual.
> "Rick Sawtell" wrote:
>|||ok thanks for the additional information.
"Tibor Karaszi" wrote:

> If it is OK to have sysadmins privileges for the person, just add a login
for the person, and make
> it sysadmin.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> http://www.sqlug.se/
>
> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> news:6401A53E-E9C0-41F9-9E08-C58B82148BD0@.microsoft.com...
>
>

add new user with all rights to all dbases

Kind of new to Enterprize Manager, just wondering what the steps are to add a
new user that will have all rights to all databases? Thanks.
Paul G
Software engineer.
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:FF651560-0FE5-4B24-B9C2-C66E227CD0FB@.microsoft.com...
> Kind of new to Enterprize Manager, just wondering what the steps are to
> add a
> new user that will have all rights to all databases? Thanks.
> --
> Paul G
> Software engineer.
Add your new user normally. Either as a Windows Authenticated account or as
a SQL User account.
Add that new user to the sysadmins SQL Server group inside SQL Server.
Just a side note on security here. I hope that this is the user account
that you will be connecting with moving forward and not something you are
planning on giving to everyone who uses the database. ;-)
Rick Sawtell
MCT, MCSD, MCDBA
|||Thanks for the response. Actually I was trying to set up an account for a
database administrator that could administer all dbases. This would only be
used by one individual.
"Rick Sawtell" wrote:

> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> news:FF651560-0FE5-4B24-B9C2-C66E227CD0FB@.microsoft.com...
> Add your new user normally. Either as a Windows Authenticated account or as
> a SQL User account.
> Add that new user to the sysadmins SQL Server group inside SQL Server.
>
> Just a side note on security here. I hope that this is the user account
> that you will be connecting with moving forward and not something you are
> planning on giving to everyone who uses the database. ;-)
>
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>
|||If it is OK to have sysadmins privileges for the person, just add a login for the person, and make
it sysadmin.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:6401A53E-E9C0-41F9-9E08-C58B82148BD0@.microsoft.com...[vbcol=seagreen]
> Thanks for the response. Actually I was trying to set up an account for a
> database administrator that could administer all dbases. This would only be
> used by one individual.
> "Rick Sawtell" wrote:
|||ok thanks for the additional information.
"Tibor Karaszi" wrote:

> If it is OK to have sysadmins privileges for the person, just add a login for the person, and make
> it sysadmin.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> http://www.sqlug.se/
>
> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> news:6401A53E-E9C0-41F9-9E08-C58B82148BD0@.microsoft.com...
>
>

Tuesday, March 6, 2012

Add new record

Hallo everyone,
I have a form with unbound textboxes that forms a record,how can I add a
new record of unbound textboxes afterI have update the first record?
Can anyone help me please?
You haven't specified what development environment you are using. This
isn't a SQL Server-specific question so you'll probably get more help
posting to a group for the appropriate tool: Access? VB? C#? ASP?
David Portas
SQL Server MVP

Add new record

Hallo everyone,
I have a form with unbound textboxes that forms a record,how can I add a
new record of unbound textboxes afterI have update the first record?
Can anyone help me please?You haven't specified what development environment you are using. This
isn't a SQL Server-specific question so you'll probably get more help
posting to a group for the appropriate tool: Access? VB? C#? ASP?
David Portas
SQL Server MVP
--

Thursday, February 16, 2012

Add a table constraint and it's performance

I have a table with 100 gigs of data - and it seems it takes forever to add a
new constraint to this table, I finally have to cancel the statement after 1
hr of running. Is there a reason why or I am missing something.
below is my script
ALTER table [dbo].[acc_image]
add constraint [chk_acc_image_table]
check ([label] <> '' and [dbo].fn_count_acc_image_labels] (acc_image_id) < 2)
Label is the varchar of 50 and the fn_count_acc_image is to check the
duplicate label.
Thanks in advance.
It's quite normal. When you create a new check constraint all records in a
table are validated against this new constraint.
If you are sure that there are no records that violate this new constraint
(you can check this by writing the proper SELECT statement) use WITH NOCHECK
option:
ALTER table [dbo].[acc_image]
WITH NOCHECK
add constraint [chk_acc_image_table]
check ([label] <> '' and [dbo].fn_count_acc_image_labels] (acc_image_id) <
2)
Regards
Pawel Potasinski
Uytkownik "PhilN" <philngu@.msn.com> napisa w wiadomoci
news:F054C6E4-82B7-4848-9D04-CCBA24BFF8BE@.microsoft.com...
>I have a table with 100 gigs of data - and it seems it takes forever to add
>a
> new constraint to this table, I finally have to cancel the statement after
> 1
> hr of running. Is there a reason why or I am missing something.
> below is my script
> ALTER table [dbo].[acc_image]
> add constraint [chk_acc_image_table]
> check ([label] <> '' and [dbo].fn_count_acc_image_labels] (acc_image_id) <
> 2)
> Label is the varchar of 50 and the fn_count_acc_image is to check the
> duplicate label.
> Thanks in advance.
>
|||Hi
Read this article
http://sqlblog.com/blogs/hugo_kornelis/archive/2007/03/29/can-you-trust-your-constraints.aspx
"PhilN" <philngu@.msn.com> wrote in message
news:F054C6E4-82B7-4848-9D04-CCBA24BFF8BE@.microsoft.com...
>I have a table with 100 gigs of data - and it seems it takes forever to add
>a
> new constraint to this table, I finally have to cancel the statement after
> 1
> hr of running. Is there a reason why or I am missing something.
> below is my script
> ALTER table [dbo].[acc_image]
> add constraint [chk_acc_image_table]
> check ([label] <> '' and [dbo].fn_count_acc_image_labels] (acc_image_id) <
> 2)
> Label is the varchar of 50 and the fn_count_acc_image is to check the
> duplicate label.
> Thanks in advance.
>
|||Hi Uri,
The article is great, but if your primary goal is to prevent waiting at the
moment you use WITH NOCHECK anyway.
Then you can go with WITH CHECK CHECK CONSTRAINT in the maintenence window.
Regards
Pawel Potasinski
Uytkownik "Uri Dimant" <urid@.iscar.co.il> napisa w wiadomoci
news:OjnLxaEyHHA.988@.TK2MSFTNGP02.phx.gbl...
> Hi
> Read this article
> http://sqlblog.com/blogs/hugo_kornelis/archive/2007/03/29/can-you-trust-your-constraints.aspx
>
>
> "PhilN" <philngu@.msn.com> wrote in message
> news:F054C6E4-82B7-4848-9D04-CCBA24BFF8BE@.microsoft.com...
>
|||yes, this is exactly what I want to do - since I know 100% all rows in the
table are abide within this constraint. Using "with check" is not very
efficient in my case.
Beside with the table size that i have, the alter table took a whole night
(> 8 hr) to run and it lock up anyone who try to access the table. I have to
aborted the operation in the morning.
Thanks very much Pawel and everyone who made the suggestions.
"Pawel Potasinski" wrote:

> Hi Uri,
> The article is great, but if your primary goal is to prevent waiting at the
> moment you use WITH NOCHECK anyway.
> Then you can go with WITH CHECK CHECK CONSTRAINT in the maintenence window.
> --
> Regards
> Pawel Potasinski
>
> U?ytkownik "Uri Dimant" <urid@.iscar.co.il> napisa3 w wiadomo?ci
> news:OjnLxaEyHHA.988@.TK2MSFTNGP02.phx.gbl...
>
>

Add a table constraint and it's performance

I have a table with 100 gigs of data - and it seems it takes forever to add
a
new constraint to this table, I finally have to cancel the statement after 1
hr of running. Is there a reason why or I am missing something.
below is my script
ALTER table [dbo].[acc_image]
add constraint [chk_acc_image_table]
check ([label] <> '' and [dbo].fn_count_acc_image_labels] (acc_image
_id) < 2)
Label is the varchar of 50 and the fn_count_acc_image is to check the
duplicate label.
Thanks in advance.It's quite normal. When you create a new check constraint all records in a
table are validated against this new constraint.
If you are sure that there are no records that violate this new constraint
(you can check this by writing the proper SELECT statement) use WITH NOCHECK
option:
ALTER table [dbo].[acc_image]
WITH NOCHECK
add constraint [chk_acc_image_table]
check ([label] <> '' and [dbo].fn_count_acc_image_labels] (acc_image
_id) <
2)
Regards
Pawel Potasinski
Uytkownik "PhilN" <philngu@.msn.com> napisa w wiadomoci
news:F054C6E4-82B7-4848-9D04-CCBA24BFF8BE@.microsoft.com...
>I have a table with 100 gigs of data - and it seems it takes forever to add
>a
> new constraint to this table, I finally have to cancel the statement after
> 1
> hr of running. Is there a reason why or I am missing something.
> below is my script
> ALTER table [dbo].[acc_image]
> add constraint [chk_acc_image_table]
> check ([label] <> '' and [dbo].fn_count_acc_image_labels] (acc_ima
ge_id) <
> 2)
> Label is the varchar of 50 and the fn_count_acc_image is to check the
> duplicate label.
> Thanks in advance.
>|||Hi
Read this article
http://sqlblog.com/blogs/hugo_korne.../>
raints.aspx
"PhilN" <philngu@.msn.com> wrote in message
news:F054C6E4-82B7-4848-9D04-CCBA24BFF8BE@.microsoft.com...
>I have a table with 100 gigs of data - and it seems it takes forever to add
>a
> new constraint to this table, I finally have to cancel the statement after
> 1
> hr of running. Is there a reason why or I am missing something.
> below is my script
> ALTER table [dbo].[acc_image]
> add constraint [chk_acc_image_table]
> check ([label] <> '' and [dbo].fn_count_acc_image_labels] (acc_ima
ge_id) <
> 2)
> Label is the varchar of 50 and the fn_count_acc_image is to check the
> duplicate label.
> Thanks in advance.
>|||Hi Uri,
The article is great, but if your primary goal is to prevent waiting at the
moment you use WITH NOCHECK anyway.
Then you can go with WITH CHECK CHECK CONSTRAINT in the maintenence window.
Regards
Pawel Potasinski
Uytkownik "Uri Dimant" <urid@.iscar.co.il> napisa w wiadomoci
news:OjnLxaEyHHA.988@.TK2MSFTNGP02.phx.gbl...
> Hi
> Read this article
> http://sqlblog.com/blogs/hugo_korne...
straints.aspx
>
>
> "PhilN" <philngu@.msn.com> wrote in message
> news:F054C6E4-82B7-4848-9D04-CCBA24BFF8BE@.microsoft.com...
>|||yes, this is exactly what I want to do - since I know 100% all rows in the
table are abide within this constraint. Using "with check" is not very
efficient in my case.
Beside with the table size that i have, the alter table took a whole night
(> 8 hr) to run and it lock up anyone who try to access the table. I have to
aborted the operation in the morning.
Thanks very much Pawel and everyone who made the suggestions.
"Pawel Potasinski" wrote:

> Hi Uri,
> The article is great, but if your primary goal is to prevent waiting at th
e
> moment you use WITH NOCHECK anyway.
> Then you can go with WITH CHECK CHECK CONSTRAINT in the maintenence window
.
> --
> Regards
> Pawel Potasinski
>
> U?ytkownik "Uri Dimant" <urid@.iscar.co.il> napisa3 w wiadomo?ci
> news:OjnLxaEyHHA.988@.TK2MSFTNGP02.phx.gbl...
>
>