Showing posts with label create. Show all posts
Showing posts with label create. Show all posts

Thursday, March 29, 2012

database name in SQL Server 2000

I'd like to create a trigger on a SQL Server 2000 table that operates if the table is in a particular database, but not in others. How do I query for the database name?

Thanks.

DB_NAME() will give you the database name but since you create a trigger on tables I don't see how this is usefull?

when you create a trigger on table abc you have to be in a DB already so you already know the name on creation

Denis the SQL Menace

http://sqlservercode.blogspot.com/

Thursday, March 22, 2012

Database Mirroring - Multiple Endpoints

Hi All
Is it possible to create multiple endpoints for Database Mirroring in SQL
Server 2005?
After reading that only 10 databases should be mirrored per endpoint I tried
to create another endpoint and received the following error:
An endpoint already exists with the bindings specified. Only one endpoint
supported for a specific binding. Use ALTER ENDPOINT or DROP the existing
endpoint and execute the CREATE ENDPOINT statement.
Can someone please clarify how to create an additional endpoint and/or how
to mirror more than 10 databases.
Thanks
Can you point me to the document which talks about 10 mirrored database per
endpoint.
I have more than 10 endpoints in my server.
Thank you
"David" <David@.discussions.microsoft.com> wrote in message
news:2303C6A1-5317-4BBB-B00A-EA8E48DDC7FC@.microsoft.com...
> Hi All
> Is it possible to create multiple endpoints for Database Mirroring in SQL
> Server 2005?
> After reading that only 10 databases should be mirrored per endpoint I
> tried
> to create another endpoint and received the following error:
> An endpoint already exists with the bindings specified. Only one endpoint
> supported for a specific binding. Use ALTER ENDPOINT or DROP the existing
> endpoint and execute the CREATE ENDPOINT statement.
> Can someone please clarify how to create an additional endpoint and/or how
> to mirror more than 10 databases.
> Thanks
|||Hi David, please take a look at the below link:
http://www.sqlcommunity.com/default.aspx?tabid=77&id=79
All mirroring connections on a server instance use a single database
mirroring endpoint.
There's no hard limit on ho many databases can be mirrored per server. This
depends on the resources available on the server. The best practice however
is to limit your SQL Server with 10 but this is not an official limit.
You may explore more about database mirroring @. Database Mirroring clinic on
www.sqlcommunity.com (Below is the link)
http://sqlcommunity.com/Articles/SQLClinic/DatabaseMirroringClinic/tabid/117/language/en-US/Default.aspx
Thank you,
Saleem Hakani
HTTP://WWW.SQLCOMMUNITY.COM (SQL Server Community)
SQLTips, SQL Forums, SQL Blogs, SQL RADIO, SQL Events, SQL Scripts, SQL
Articles, SQL Clinic and a lot of SQL fun.
"David" wrote:

> Hi All
> Is it possible to create multiple endpoints for Database Mirroring in SQL
> Server 2005?
> After reading that only 10 databases should be mirrored per endpoint I tried
> to create another endpoint and received the following error:
> An endpoint already exists with the bindings specified. Only one endpoint
> supported for a specific binding. Use ALTER ENDPOINT or DROP the existing
> endpoint and execute the CREATE ENDPOINT statement.
> Can someone please clarify how to create an additional endpoint and/or how
> to mirror more than 10 databases.
> Thanks
|||Hi Shailesh, there's no limit on how many databases you can mirror per
server. This depends on the availability of the resorces on the server.
However, the best practice hs been to limit your server with 10.
More info on database mirroring can be found at Database Mirroring Clinic on
www.sqlcommunity.com :
http://sqlcommunity.com/Articles/SQLClinic/DatabaseMirroringClinic/tabid/117/language/en-US/Default.aspx
Thank you,
Saleem Hakani
HTTP://WWW.SQLCOMMUNITY.COM (SQL Server Community)
SQLTips, SQL Forums, SQL Blogs, SQL RADIO, SQL Events, SQL Scripts, SQL
Articles, SQL Clinic and a lot of SQL fun.
"Shailesh Khanal" wrote:

> Can you point me to the document which talks about 10 mirrored database per
> endpoint.
> I have more than 10 endpoints in my server.
> Thank you
>
> "David" <David@.discussions.microsoft.com> wrote in message
> news:2303C6A1-5317-4BBB-B00A-EA8E48DDC7FC@.microsoft.com...
>
>

Database Mirroring - Multiple Endpoints

Hi All
Is it possible to create multiple endpoints for Database Mirroring in SQL
Server 2005?
After reading that only 10 databases should be mirrored per endpoint I tried
to create another endpoint and received the following error:
An endpoint already exists with the bindings specified. Only one endpoint
supported for a specific binding. Use ALTER ENDPOINT or DROP the existing
endpoint and execute the CREATE ENDPOINT statement.
Can someone please clarify how to create an additional endpoint and/or how
to mirror more than 10 databases.
ThanksCan you point me to the document which talks about 10 mirrored database per
endpoint.
I have more than 10 endpoints in my server.
Thank you
"David" <David@.discussions.microsoft.com> wrote in message
news:2303C6A1-5317-4BBB-B00A-EA8E48DDC7FC@.microsoft.com...
> Hi All
> Is it possible to create multiple endpoints for Database Mirroring in SQL
> Server 2005?
> After reading that only 10 databases should be mirrored per endpoint I
> tried
> to create another endpoint and received the following error:
> An endpoint already exists with the bindings specified. Only one endpoint
> supported for a specific binding. Use ALTER ENDPOINT or DROP the existing
> endpoint and execute the CREATE ENDPOINT statement.
> Can someone please clarify how to create an additional endpoint and/or how
> to mirror more than 10 databases.
> Thanks|||Hi David, please take a look at the below link:
http://www.sqlcommunity.com/default.aspx?tabid=77&id=79
All mirroring connections on a server instance use a single database
mirroring endpoint.
There's no hard limit on ho many databases can be mirrored per server. This
depends on the resources available on the server. The best practice however
is to limit your SQL Server with 10 but this is not an official limit.
You may explore more about database mirroring @. Database Mirroring clinic on
www.sqlcommunity.com (Below is the link)
http://sqlcommunity.com/Articles/SQLClinic/DatabaseMirroringClinic/tabid/117/language/en-US/Default.aspx
Thank you,
Saleem Hakani
HTTP://WWW.SQLCOMMUNITY.COM (SQL Server Community)
SQLTips, SQL Forums, SQL Blogs, SQL RADIO, SQL Events, SQL Scripts, SQL
Articles, SQL Clinic and a lot of SQL fun.
"David" wrote:
> Hi All
> Is it possible to create multiple endpoints for Database Mirroring in SQL
> Server 2005?
> After reading that only 10 databases should be mirrored per endpoint I tried
> to create another endpoint and received the following error:
> An endpoint already exists with the bindings specified. Only one endpoint
> supported for a specific binding. Use ALTER ENDPOINT or DROP the existing
> endpoint and execute the CREATE ENDPOINT statement.
> Can someone please clarify how to create an additional endpoint and/or how
> to mirror more than 10 databases.
> Thanks|||Hi Shailesh, there's no limit on how many databases you can mirror per
server. This depends on the availability of the resorces on the server.
However, the best practice hs been to limit your server with 10.
More info on database mirroring can be found at Database Mirroring Clinic on
www.sqlcommunity.com :
http://sqlcommunity.com/Articles/SQLClinic/DatabaseMirroringClinic/tabid/117/language/en-US/Default.aspx
--
Thank you,
Saleem Hakani
HTTP://WWW.SQLCOMMUNITY.COM (SQL Server Community)
SQLTips, SQL Forums, SQL Blogs, SQL RADIO, SQL Events, SQL Scripts, SQL
Articles, SQL Clinic and a lot of SQL fun.
"Shailesh Khanal" wrote:
> Can you point me to the document which talks about 10 mirrored database per
> endpoint.
> I have more than 10 endpoints in my server.
> Thank you
>
> "David" <David@.discussions.microsoft.com> wrote in message
> news:2303C6A1-5317-4BBB-B00A-EA8E48DDC7FC@.microsoft.com...
> > Hi All
> >
> > Is it possible to create multiple endpoints for Database Mirroring in SQL
> > Server 2005?
> >
> > After reading that only 10 databases should be mirrored per endpoint I
> > tried
> > to create another endpoint and received the following error:
> >
> > An endpoint already exists with the bindings specified. Only one endpoint
> > supported for a specific binding. Use ALTER ENDPOINT or DROP the existing
> > endpoint and execute the CREATE ENDPOINT statement.
> >
> > Can someone please clarify how to create an additional endpoint and/or how
> > to mirror more than 10 databases.
> >
> > Thanks
>
>

Wednesday, March 21, 2012

Database migration and security issues

Dear all,
I have 2 questions:
(1) I would like to migrate a SQL database (named "myDB") from SQL server A
to SQL server B. I am planning to create a new database named "myDB" in
server B, then go back to server A to do the backup. Then restore it in
server B. Is it feasible? Anyone has a better way to do it?
(2) The second question deals with security issue and it makes me
frustrated. There is a database which is maintained by an end-user in my
company currently. He has the "db_owner" rights on this database. Now we
(MIS) are going to take over the admin work of this database. We will assign
"db_reader" & "db_writer" to him only. However, this user wrote some VB
programs to access this database (using ADO) and this programs involves some
actions of deleteing and creating temp tables in the database. If he only ha
s
"db_reader" & "db_writer" rights, then the program would fail to work. It is
not reasonable to create another SQL server login id with "db_owner" right t
o
this user, this would lose control on our admin work again. I am quite
frustrated by this... can anyone help?
Thanks a lot.
Ivan1. create backup on server A then restore on server B. You must transfer
logins from server A to B
2. ">>this programs involves some
> actions of deleteing and creating temp tables in the database""
create temp tables in tembdb, not in your prod db
OR
add this user in db_ddladmin
--
Aleksandar Grbic
MCDBA, Senior Database Administrator
"Ivan" wrote:

> Dear all,
> I have 2 questions:
> (1) I would like to migrate a SQL database (named "myDB") from SQL server
A
> to SQL server B. I am planning to create a new database named "myDB" in
> server B, then go back to server A to do the backup. Then restore it in
> server B. Is it feasible? Anyone has a better way to do it?
> (2) The second question deals with security issue and it makes me
> frustrated. There is a database which is maintained by an end-user in my
> company currently. He has the "db_owner" rights on this database. Now we
> (MIS) are going to take over the admin work of this database. We will assi
gn
> "db_reader" & "db_writer" to him only. However, this user wrote some VB
> programs to access this database (using ADO) and this programs involves so
me
> actions of deleteing and creating temp tables in the database. If he only
has
> "db_reader" & "db_writer" rights, then the program would fail to work. It
is
> not reasonable to create another SQL server login id with "db_owner" right
to
> this user, this would lose control on our admin work again. I am quite
> frustrated by this... can anyone help?
> Thanks a lot.
> Ivan|||Dear Aleksandar,
How to transfer logins ?
Thanks!!
"Aleksandar Grbic" wrote:
[vbcol=seagreen]
> 1. create backup on server A then restore on server B. You must transfer
> logins from server A to B
> 2. ">>this programs involves some
> create temp tables in tembdb, not in your prod db
> OR
> add this user in db_ddladmin
> --
> Aleksandar Grbic
> MCDBA, Senior Database Administrator
>
> "Ivan" wrote:
>|||Hi Ivan,
(i) U can restore then database by backup
(ii) copy the mdf file and attach the database.
(iii) Use copy database wizard.
(iv) script the database and run the script on the server and transfer
the data.
Go to DTS and use transfer logins .
defien source from where u want to transfer the logins and destination
to where ti want to copy.
but before u tranfer u create or restore or attach the database on that
srever.
hope this hel u
from
killer|||Search Knowledgebase for
sp_help_revlogin
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Ivan" <Ivan@.discussions.microsoft.com> wrote in message
news:5E32FF17-7866-40CB-A5CE-6AE5EE0FD64C@.microsoft.com...[vbcol=seagreen]
> Dear Aleksandar,
> How to transfer logins ?
> Thanks!!
> "Aleksandar Grbic" wrote:
>|||show BOL for help, "sp_addlogin"
you must create login on server B with same SID and password as logins on
server A
see examples in Books Online
OR
see "HOW TO: Transfer Logins and Passwords Between Instances of SQL Server"
at http://support.microsoft.com/defaul...kb;en-us;246133
Aleksandar Grbic
MCDBA, Senior Database Administrator
"Ivan" wrote:
[vbcol=seagreen]
> Dear Aleksandar,
> How to transfer logins ?
> Thanks!!
> "Aleksandar Grbic" wrote:
>

Database migration and security issues

Dear all,
I have 2 questions:
(1) I would like to migrate a SQL database (named "myDB") from SQL server A
to SQL server B. I am planning to create a new database named "myDB" in
server B, then go back to server A to do the backup. Then restore it in
server B. Is it feasible? Anyone has a better way to do it?
(2) The second question deals with security issue and it makes me
frustrated. There is a database which is maintained by an end-user in my
company currently. He has the "db_owner" rights on this database. Now we
(MIS) are going to take over the admin work of this database. We will assign
"db_reader" & "db_writer" to him only. However, this user wrote some VB
programs to access this database (using ADO) and this programs involves some
actions of deleteing and creating temp tables in the database. If he only has
"db_reader" & "db_writer" rights, then the program would fail to work. It is
not reasonable to create another SQL server login id with "db_owner" right to
this user, this would lose control on our admin work again. I am quite
frustrated by this... can anyone help?
Thanks a lot.
Ivan
1. create backup on server A then restore on server B. You must transfer
logins from server A to B
2. ">>this programs involves some
> actions of deleteing and creating temp tables in the database""
create temp tables in tembdb, not in your prod db
OR
add this user in db_ddladmin
Aleksandar Grbic
MCDBA, Senior Database Administrator
"Ivan" wrote:

> Dear all,
> I have 2 questions:
> (1) I would like to migrate a SQL database (named "myDB") from SQL server A
> to SQL server B. I am planning to create a new database named "myDB" in
> server B, then go back to server A to do the backup. Then restore it in
> server B. Is it feasible? Anyone has a better way to do it?
> (2) The second question deals with security issue and it makes me
> frustrated. There is a database which is maintained by an end-user in my
> company currently. He has the "db_owner" rights on this database. Now we
> (MIS) are going to take over the admin work of this database. We will assign
> "db_reader" & "db_writer" to him only. However, this user wrote some VB
> programs to access this database (using ADO) and this programs involves some
> actions of deleteing and creating temp tables in the database. If he only has
> "db_reader" & "db_writer" rights, then the program would fail to work. It is
> not reasonable to create another SQL server login id with "db_owner" right to
> this user, this would lose control on our admin work again. I am quite
> frustrated by this... can anyone help?
> Thanks a lot.
> Ivan
|||Dear Aleksandar,
How to transfer logins ?
Thanks!!
"Aleksandar Grbic" wrote:
[vbcol=seagreen]
> 1. create backup on server A then restore on server B. You must transfer
> logins from server A to B
> 2. ">>this programs involves some
> create temp tables in tembdb, not in your prod db
> OR
> add this user in db_ddladmin
> --
> Aleksandar Grbic
> MCDBA, Senior Database Administrator
>
> "Ivan" wrote:
|||Hi Ivan,
(i) U can restore then database by backup
(ii) copy the mdf file and attach the database.
(iii) Use copy database wizard.
(iv) script the database and run the script on the server and transfer
the data.
Go to DTS and use transfer logins .
defien source from where u want to transfer the logins and destination
to where ti want to copy.
but before u tranfer u create or restore or attach the database on that
srever.
hope this hel u
from
killer
|||Search Knowledgebase for
sp_help_revlogin
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Ivan" <Ivan@.discussions.microsoft.com> wrote in message
news:5E32FF17-7866-40CB-A5CE-6AE5EE0FD64C@.microsoft.com...[vbcol=seagreen]
> Dear Aleksandar,
> How to transfer logins ?
> Thanks!!
> "Aleksandar Grbic" wrote:
|||show BOL for help, "sp_addlogin"
you must create login on server B with same SID and password as logins on
server A
see examples in Books Online
OR
see "HOW TO: Transfer Logins and Passwords Between Instances of SQL Server"
at http://support.microsoft.com/default...b;en-us;246133
Aleksandar Grbic
MCDBA, Senior Database Administrator
"Ivan" wrote:
[vbcol=seagreen]
> Dear Aleksandar,
> How to transfer logins ?
> Thanks!!
> "Aleksandar Grbic" wrote:

Database migration and security issues

Dear all,
I have 2 questions:
(1) I would like to migrate a SQL database (named "myDB") from SQL server A
to SQL server B. I am planning to create a new database named "myDB" in
server B, then go back to server A to do the backup. Then restore it in
server B. Is it feasible? Anyone has a better way to do it?
(2) The second question deals with security issue and it makes me
frustrated. There is a database which is maintained by an end-user in my
company currently. He has the "db_owner" rights on this database. Now we
(MIS) are going to take over the admin work of this database. We will assign
"db_reader" & "db_writer" to him only. However, this user wrote some VB
programs to access this database (using ADO) and this programs involves some
actions of deleteing and creating temp tables in the database. If he only has
"db_reader" & "db_writer" rights, then the program would fail to work. It is
not reasonable to create another SQL server login id with "db_owner" right to
this user, this would lose control on our admin work again. I am quite
frustrated by this... can anyone help?
Thanks a lot.
Ivan1. create backup on server A then restore on server B. You must transfer
logins from server A to B
2. ">>this programs involves some
> actions of deleteing and creating temp tables in the database""
create temp tables in tembdb, not in your prod db
OR
add this user in db_ddladmin :(
--
Aleksandar Grbic
MCDBA, Senior Database Administrator
"Ivan" wrote:
> Dear all,
> I have 2 questions:
> (1) I would like to migrate a SQL database (named "myDB") from SQL server A
> to SQL server B. I am planning to create a new database named "myDB" in
> server B, then go back to server A to do the backup. Then restore it in
> server B. Is it feasible? Anyone has a better way to do it?
> (2) The second question deals with security issue and it makes me
> frustrated. There is a database which is maintained by an end-user in my
> company currently. He has the "db_owner" rights on this database. Now we
> (MIS) are going to take over the admin work of this database. We will assign
> "db_reader" & "db_writer" to him only. However, this user wrote some VB
> programs to access this database (using ADO) and this programs involves some
> actions of deleteing and creating temp tables in the database. If he only has
> "db_reader" & "db_writer" rights, then the program would fail to work. It is
> not reasonable to create another SQL server login id with "db_owner" right to
> this user, this would lose control on our admin work again. I am quite
> frustrated by this... can anyone help?
> Thanks a lot.
> Ivan|||Dear Aleksandar,
How to transfer logins ?
Thanks!!
"Aleksandar Grbic" wrote:
> 1. create backup on server A then restore on server B. You must transfer
> logins from server A to B
> 2. ">>this programs involves some
> > actions of deleteing and creating temp tables in the database""
> create temp tables in tembdb, not in your prod db
> OR
> add this user in db_ddladmin :(
> --
> Aleksandar Grbic
> MCDBA, Senior Database Administrator
>
> "Ivan" wrote:
> > Dear all,
> >
> > I have 2 questions:
> >
> > (1) I would like to migrate a SQL database (named "myDB") from SQL server A
> > to SQL server B. I am planning to create a new database named "myDB" in
> > server B, then go back to server A to do the backup. Then restore it in
> > server B. Is it feasible? Anyone has a better way to do it?
> >
> > (2) The second question deals with security issue and it makes me
> > frustrated. There is a database which is maintained by an end-user in my
> > company currently. He has the "db_owner" rights on this database. Now we
> > (MIS) are going to take over the admin work of this database. We will assign
> > "db_reader" & "db_writer" to him only. However, this user wrote some VB
> > programs to access this database (using ADO) and this programs involves some
> > actions of deleteing and creating temp tables in the database. If he only has
> > "db_reader" & "db_writer" rights, then the program would fail to work. It is
> > not reasonable to create another SQL server login id with "db_owner" right to
> > this user, this would lose control on our admin work again. I am quite
> > frustrated by this... can anyone help?
> > Thanks a lot.
> >
> > Ivan|||Hi Ivan,
(i) U can restore then database by backup
(ii) copy the mdf file and attach the database.
(iii) Use copy database wizard.
(iv) script the database and run the script on the server and transfer
the data.
Go to DTS and use transfer logins .
defien source from where u want to transfer the logins and destination
to where ti want to copy.
but before u tranfer u create or restore or attach the database on that
srever.
hope this hel u
from
killer|||Search Knowledgebase for
sp_help_revlogin
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Ivan" <Ivan@.discussions.microsoft.com> wrote in message
news:5E32FF17-7866-40CB-A5CE-6AE5EE0FD64C@.microsoft.com...
> Dear Aleksandar,
> How to transfer logins ?
> Thanks!!
> "Aleksandar Grbic" wrote:
>> 1. create backup on server A then restore on server B. You must transfer
>> logins from server A to B
>> 2. ">>this programs involves some
>> > actions of deleteing and creating temp tables in the database""
>> create temp tables in tembdb, not in your prod db
>> OR
>> add this user in db_ddladmin :(
>> --
>> Aleksandar Grbic
>> MCDBA, Senior Database Administrator
>>
>> "Ivan" wrote:
>> > Dear all,
>> >
>> > I have 2 questions:
>> >
>> > (1) I would like to migrate a SQL database (named "myDB") from SQL server A
>> > to SQL server B. I am planning to create a new database named "myDB" in
>> > server B, then go back to server A to do the backup. Then restore it in
>> > server B. Is it feasible? Anyone has a better way to do it?
>> >
>> > (2) The second question deals with security issue and it makes me
>> > frustrated. There is a database which is maintained by an end-user in my
>> > company currently. He has the "db_owner" rights on this database. Now we
>> > (MIS) are going to take over the admin work of this database. We will assign
>> > "db_reader" & "db_writer" to him only. However, this user wrote some VB
>> > programs to access this database (using ADO) and this programs involves some
>> > actions of deleteing and creating temp tables in the database. If he only has
>> > "db_reader" & "db_writer" rights, then the program would fail to work. It is
>> > not reasonable to create another SQL server login id with "db_owner" right to
>> > this user, this would lose control on our admin work again. I am quite
>> > frustrated by this... can anyone help?
>> > Thanks a lot.
>> >
>> > Ivan|||show BOL for help, "sp_addlogin"
you must create login on server B with same SID and password as logins on
server A
see examples in Books Online
OR
see "HOW TO: Transfer Logins and Passwords Between Instances of SQL Server"
at http://support.microsoft.com/default.aspx?scid=kb;en-us;246133
Aleksandar Grbic
MCDBA, Senior Database Administrator
"Ivan" wrote:
> Dear Aleksandar,
> How to transfer logins ?
> Thanks!!
> "Aleksandar Grbic" wrote:
> > 1. create backup on server A then restore on server B. You must transfer
> > logins from server A to B
> >
> > 2. ">>this programs involves some
> > > actions of deleteing and creating temp tables in the database""
> > create temp tables in tembdb, not in your prod db
> > OR
> > add this user in db_ddladmin :(
> > --
> > Aleksandar Grbic
> > MCDBA, Senior Database Administrator
> >
> >
> > "Ivan" wrote:
> >
> > > Dear all,
> > >
> > > I have 2 questions:
> > >
> > > (1) I would like to migrate a SQL database (named "myDB") from SQL server A
> > > to SQL server B. I am planning to create a new database named "myDB" in
> > > server B, then go back to server A to do the backup. Then restore it in
> > > server B. Is it feasible? Anyone has a better way to do it?
> > >
> > > (2) The second question deals with security issue and it makes me
> > > frustrated. There is a database which is maintained by an end-user in my
> > > company currently. He has the "db_owner" rights on this database. Now we
> > > (MIS) are going to take over the admin work of this database. We will assign
> > > "db_reader" & "db_writer" to him only. However, this user wrote some VB
> > > programs to access this database (using ADO) and this programs involves some
> > > actions of deleteing and creating temp tables in the database. If he only has
> > > "db_reader" & "db_writer" rights, then the program would fail to work. It is
> > > not reasonable to create another SQL server login id with "db_owner" right to
> > > this user, this would lose control on our admin work again. I am quite
> > > frustrated by this... can anyone help?
> > > Thanks a lot.
> > >
> > > Ivansql

Sunday, March 11, 2012

database maintenance plans for 2005 Express

Hello:
I know how to create database maintenance plans (automated backups) in SQL
Server 2000 and 2005.
But, I have never done so in SQL Server 2005 Express Edition.
I tried right-clicking on maintenance plans in 2005 Express so that I could
choose to create new plans, but no such selection is available to choose.
So, how do you create maintenance plans in SQL Server 2005 Express Edition?
Thanks!
childofthe1980s
Express doesn't come with SQL Agent. Have a look at these:
http://blogs.msdn.com/rogerwolterblog/archive/2006/04/13/575974.aspx
Backing up Express
Automating Database maintenance in SQL 2005 Express Edition Part I
http://www.sqldbatips.com/showarticle.asp?ID=27
Automating Database maintenance in SQL 2005 Express Edition Part II
http://www.sqldbatips.com/showarticle.asp?ID=29
Andrew J. Kelly SQL MVP
"childofthe1980s" <childofthe1980s@.discussions.microsoft.com> wrote in
message news:2FC46958-D2C0-4120-B6C1-583FCE607044@.microsoft.com...
> Hello:
> I know how to create database maintenance plans (automated backups) in SQL
> Server 2000 and 2005.
> But, I have never done so in SQL Server 2005 Express Edition.
> I tried right-clicking on maintenance plans in 2005 Express so that I
> could
> choose to create new plans, but no such selection is available to choose.
> So, how do you create maintenance plans in SQL Server 2005 Express
> Edition?
> Thanks!
> childofthe1980s

database maintenance plans for 2005 Express

Hello:
I know how to create database maintenance plans (automated backups) in SQL
Server 2000 and 2005.
But, I have never done so in SQL Server 2005 Express Edition.
I tried right-clicking on maintenance plans in 2005 Express so that I could
choose to create new plans, but no such selection is available to choose.
So, how do you create maintenance plans in SQL Server 2005 Express Edition?
Thanks!
childofthe1980sExpress doesn't come with SQL Agent. Have a look at these:
http://blogs.msdn.com/rogerwolterbl.../13/575974.aspx
Backing up Express
Automating Database maintenance in SQL 2005 Express Edition Part I
http://www.sqldbatips.com/showarticle.asp?ID=27
Automating Database maintenance in SQL 2005 Express Edition Part II
http://www.sqldbatips.com/showarticle.asp?ID=29
Andrew J. Kelly SQL MVP
"childofthe1980s" <childofthe1980s@.discussions.microsoft.com> wrote in
message news:2FC46958-D2C0-4120-B6C1-583FCE607044@.microsoft.com...
> Hello:
> I know how to create database maintenance plans (automated backups) in SQL
> Server 2000 and 2005.
> But, I have never done so in SQL Server 2005 Express Edition.
> I tried right-clicking on maintenance plans in 2005 Express so that I
> could
> choose to create new plans, but no such selection is available to choose.
> So, how do you create maintenance plans in SQL Server 2005 Express
> Edition?
> Thanks!
> childofthe1980s

database maintenance plans for 2005 Express

Hello:
I know how to create database maintenance plans (automated backups) in SQL
Server 2000 and 2005.
But, I have never done so in SQL Server 2005 Express Edition.
I tried right-clicking on maintenance plans in 2005 Express so that I could
choose to create new plans, but no such selection is available to choose.
So, how do you create maintenance plans in SQL Server 2005 Express Edition?
Thanks!
childofthe1980sExpress doesn't come with SQL Agent. Have a look at these:
http://blogs.msdn.com/rogerwolterblog/archive/2006/04/13/575974.aspx
Backing up Express
Automating Database maintenance in SQL 2005 Express Edition Part I
http://www.sqldbatips.com/showarticle.asp?ID=27
Automating Database maintenance in SQL 2005 Express Edition Part II
http://www.sqldbatips.com/showarticle.asp?ID=29
--
Andrew J. Kelly SQL MVP
"childofthe1980s" <childofthe1980s@.discussions.microsoft.com> wrote in
message news:2FC46958-D2C0-4120-B6C1-583FCE607044@.microsoft.com...
> Hello:
> I know how to create database maintenance plans (automated backups) in SQL
> Server 2000 and 2005.
> But, I have never done so in SQL Server 2005 Express Edition.
> I tried right-clicking on maintenance plans in 2005 Express so that I
> could
> choose to create new plans, but no such selection is available to choose.
> So, how do you create maintenance plans in SQL Server 2005 Express
> Edition?
> Thanks!
> childofthe1980s

Database Maintenance Plan Wizard

I used the Database Maintenance Plan Wizard to create backup plans for the
master, msdb, and model databases. The model database backs up just fine, but
I get the following error for the master and msdb:
SQL Server Scheduled Job 'Transaction Log Backup Job for DB Maintenance Plan
'DB Maintenance Plan master, msdb'' (0x27C15923C7908543B33AADC8F4379A07) -
Status: Failed - Invoked on: 2004-12-17 00:00:01 - Message: The job failed.
The Job was invoked by Schedule 72 (Schedule 1). The last step to run was
step 1 (Step 1).
John Schuster
That is because they are set to SIMPLE mode and you can not backup the log
on a db that is in SIMPLE mode. Create a new plan just for the system db's
and don't issue log backups. Bythe way you don't need to do log backups on
the Model either since it is only a template for new databases.
Andrew J. Kelly SQL MVP
"John Schuster" <JohnSchuster@.discussions.microsoft.com> wrote in message
news:9B4E59C1-9C94-4D20-939E-AD96527A80BE@.microsoft.com...
>I used the Database Maintenance Plan Wizard to create backup plans for the
> master, msdb, and model databases. The model database backs up just fine,
> but
> I get the following error for the master and msdb:
> SQL Server Scheduled Job 'Transaction Log Backup Job for DB Maintenance
> Plan
> 'DB Maintenance Plan master, msdb'' (0x27C15923C7908543B33AADC8F4379A07) -
> Status: Failed - Invoked on: 2004-12-17 00:00:01 - Message: The job
> failed.
> The Job was invoked by Schedule 72 (Schedule 1). The last step to run was
> step 1 (Step 1).
> --
> John Schuster
|||Thank you very much.
"Andrew J. Kelly" wrote:

> That is because they are set to SIMPLE mode and you can not backup the log
> on a db that is in SIMPLE mode. Create a new plan just for the system db's
> and don't issue log backups. Bythe way you don't need to do log backups on
> the Model either since it is only a template for new databases.
> --
> Andrew J. Kelly SQL MVP
>
> "John Schuster" <JohnSchuster@.discussions.microsoft.com> wrote in message
> news:9B4E59C1-9C94-4D20-939E-AD96527A80BE@.microsoft.com...
>
>

Database Maintenance Plan Question

In Microsoft Knowledge Base Article 303292, one of the workarounds
states to create 2 maintenance plans, one for simple, and one for
full/bulk recovery models. Assuming I currently have 10 user
databases, 3 simple and 7 full and I put them into the appropriate
plan, I understand how they would be backed up. How would databases
created after the plans are setup be added?
Thanks much, Lane LesperanceYou would have to change the main plan each time a db is added.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Lane Lesperance" <llesperance@.cooperpower.com> wrote in message
news:66feb5c.0403190933.4f0296a5@.posting.google.com...
> In Microsoft Knowledge Base Article 303292, one of the workarounds
> states to create 2 maintenance plans, one for simple, and one for
> full/bulk recovery models. Assuming I currently have 10 user
> databases, 3 simple and 7 full and I put them into the appropriate
> plan, I understand how they would be backed up. How would databases
> created after the plans are setup be added?
> Thanks much, Lane Lesperance

Thursday, March 8, 2012

Database Maintenance Plan Bug

We have an environment where we utilize master-target topology. When we
create a maintenance plan, we are able to add as many servers as we want.
After the plan is created, we are unable to add additional servers on the
master server, and when we open a plan, all the servers are unchecked. Does
anyone know if this is a bug, and if there is a patch to it? Does anyone know
how to add additional servers after the plan is created?There are several issues with the MP in that it is not quite capable of
doing everything you would expect. This is a one I haven't heard before but
it is somewhat consistent with other bugs that I have seen. The MP wizard
gets it's information from several sources when you open the wizard. One is
the MP system tables and another is that it parses the command strings in
the jobs it creates. It is very likely it has troubles parsing master -
target type jobs. It should be pretty easy to create your own to do the
same thing though.
--
Andrew J. Kelly SQL MVP
"MikeS" <MikeS@.discussions.microsoft.com> wrote in message
news:DA16B809-ED8C-412C-83BE-A328637CFA25@.microsoft.com...
> We have an environment where we utilize master-target topology. When we
> create a maintenance plan, we are able to add as many servers as we want.
> After the plan is created, we are unable to add additional servers on the
> master server, and when we open a plan, all the servers are unchecked.
> Does
> anyone know if this is a bug, and if there is a patch to it? Does anyone
> know
> how to add additional servers after the plan is created?|||We have a very large sql shop, and I would like to have an automated way to
know on which servers I have the maintenance plan rolled out. Could you
please provide an example, of what you mean "easy to create your own " I can
create a string which will build a plan, but it means I will have to "rerun
it" every time I need to add a new server. Is there a sufficient way of
creating this?
thank you
"Andrew J. Kelly" wrote:
> There are several issues with the MP in that it is not quite capable of
> doing everything you would expect. This is a one I haven't heard before but
> it is somewhat consistent with other bugs that I have seen. The MP wizard
> gets it's information from several sources when you open the wizard. One is
> the MP system tables and another is that it parses the command strings in
> the jobs it creates. It is very likely it has troubles parsing master -
> target type jobs. It should be pretty easy to create your own to do the
> same thing though.
> --
> Andrew J. Kelly SQL MVP
>
> "MikeS" <MikeS@.discussions.microsoft.com> wrote in message
> news:DA16B809-ED8C-412C-83BE-A328637CFA25@.microsoft.com...
> > We have an environment where we utilize master-target topology. When we
> > create a maintenance plan, we are able to add as many servers as we want.
> > After the plan is created, we are unable to add additional servers on the
> > master server, and when we open a plan, all the servers are unchecked.
> > Does
> > anyone know if this is a bug, and if there is a patch to it? Does anyone
> > know
> > how to add additional servers after the plan is created?
>
>|||Mike,
What I meant was that it is fairly easy to create custom jobs to do things
such as Backup, Reindex etc. Once you have the scripts it is again pretty
easy to deploy them to any server. You can use DMO or even oSql to issue
the commands to any server you connect to. You can also use DMO or oSql to
check for the existence of any job by simply running the proper query or
sp_helpJob etc. If you have that many servers where it becomes hard to
manage I have two suggestions. One is that you might want to consider
consolidating several servers into a single larger one. This can save costs
on licenses and hardware over many smaller servers. They are also easier to
maintain. But I highly recommend you look at a 3rd party product from
http://www.sqlsentry.net/ that can help you to manage your jobs at a much
more efficient way.
--
Andrew J. Kelly SQL MVP
"MikeS" <MikeS@.discussions.microsoft.com> wrote in message
news:B46E86CA-F89E-4E79-A796-32BF781A601C@.microsoft.com...
> We have a very large sql shop, and I would like to have an automated way
> to
> know on which servers I have the maintenance plan rolled out. Could you
> please provide an example, of what you mean "easy to create your own " I
> can
> create a string which will build a plan, but it means I will have to
> "rerun
> it" every time I need to add a new server. Is there a sufficient way of
> creating this?
> thank you
> "Andrew J. Kelly" wrote:
>> There are several issues with the MP in that it is not quite capable of
>> doing everything you would expect. This is a one I haven't heard before
>> but
>> it is somewhat consistent with other bugs that I have seen. The MP
>> wizard
>> gets it's information from several sources when you open the wizard. One
>> is
>> the MP system tables and another is that it parses the command strings in
>> the jobs it creates. It is very likely it has troubles parsing master -
>> target type jobs. It should be pretty easy to create your own to do the
>> same thing though.
>> --
>> Andrew J. Kelly SQL MVP
>>
>> "MikeS" <MikeS@.discussions.microsoft.com> wrote in message
>> news:DA16B809-ED8C-412C-83BE-A328637CFA25@.microsoft.com...
>> > We have an environment where we utilize master-target topology. When we
>> > create a maintenance plan, we are able to add as many servers as we
>> > want.
>> > After the plan is created, we are unable to add additional servers on
>> > the
>> > master server, and when we open a plan, all the servers are unchecked.
>> > Does
>> > anyone know if this is a bug, and if there is a patch to it? Does
>> > anyone
>> > know
>> > how to add additional servers after the plan is created?
>>

database maintenance plan

i am a new to sql server, my question is that can we create database
maintenance plan for those database with offline or detached status.
Thanks
nick
Hi
No. Those DB's are not accessible, so you can not.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Nick" <Nick@.discussions.microsoft.com> wrote in message
news:201D8F36-7A07-4989-A58E-C87A91640491@.microsoft.com...
> i am a new to sql server, my question is that can we create database
> maintenance plan for those database with offline or detached status.
>
> Thanks
> nick
|||Nick
No, why do you want to do that? Put the in the safe place.
"Nick" <Nick@.discussions.microsoft.com> wrote in message
news:201D8F36-7A07-4989-A58E-C87A91640491@.microsoft.com...
> i am a new to sql server, my question is that can we create database
> maintenance plan for those database with offline or detached status.
>
> Thanks
> nick

database maintenance plan

i am a new to sql server, my question is that can we create database
maintenance plan for those database with offline or detached status.
Thanks
nickHi
No. Those DB's are not accessible, so you can not.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Nick" <Nick@.discussions.microsoft.com> wrote in message
news:201D8F36-7A07-4989-A58E-C87A91640491@.microsoft.com...
> i am a new to sql server, my question is that can we create database
> maintenance plan for those database with offline or detached status.
>
> Thanks
> nick|||Nick
No, why do you want to do that? Put the in the safe place.
"Nick" <Nick@.discussions.microsoft.com> wrote in message
news:201D8F36-7A07-4989-A58E-C87A91640491@.microsoft.com...
> i am a new to sql server, my question is that can we create database
> maintenance plan for those database with offline or detached status.
>
> Thanks
> nick

Wednesday, March 7, 2012

Database Maintenance Plan

I normally steer clear of the EM wizards, but in this case I used it to crea
te a maintenance plan.
We were looking to do a nightly COMPLETE BACKUP - thus getting a .BAK file t
hat we could restore from in the event of programming disaster, etc.
I decided to say yes to the TRANSACTION LOG backup, but I'm not sure why. I
t defaulted to 12:00 am, as opposed to 2:00 am, what good is that. The COMP
LETE BACKUP has mdf/ldf in it - right?
The customer isn't looking for point-in-time recovery with this plan - just
a simple nightly backup in case of...
Opinions and suggestions would be greatly appeciated - thanks.
Here is the plan it created:
DATABASES
Health
SERVERS
(local)
COMPLETE BACKUP
Occurs every 1 week(s) on Monday, Tuesday, Wednesday, Thursday, Friday, Satu
rday, at 2:00:00 AM.
Backup media: Disk
Store backup files in the default SQL Server Backup directory.
Delete backup files which are older than 4 Week(s).
Verify the backup after completion.
Create a subdirectory for each database, to store the backup files.
TRANSACTION LOG BACKUP
Occurs every 1 week(s) on Monday, Tuesday, Wednesday, Thursday, Friday, Satu
rday, at 12:00:00 AM.
Backup media: Disk
Store backup files in the default SQL Server Backup directory.
Delete backup files which are older than 4 Week(s).
Verify the backup after completion.
Create a subdirectory for each database, to store the backup files.
Operator 'sqlops' will be e-mailed.Steve,
If you really don't need log backup, then just set the recovery mode to
simple and don't do log backups!
However, log backups is IMO a good thing to have as it gives a number of
good things (point in time recovery, ability to do a log backup if the data
part of the db crashes etc). If you decide to do log backups, I suggest
every hour (or so).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Steve Z" <szlamany@.antarescomputing.com> wrote in message
news:5856B024-0342-4D26-9715-3123C1A224EC@.microsoft.com...
> I normally steer clear of the EM wizards, but in this case I used it to
create a maintenance plan.
> We were looking to do a nightly COMPLETE BACKUP - thus getting a .BAK file
that we could restore from in the event of programming disaster, etc.
> I decided to say yes to the TRANSACTION LOG backup, but I'm not sure why.
It defaulted to 12:00 am, as opposed to 2:00 am, what good is that. The
COMPLETE BACKUP has mdf/ldf in it - right?
> The customer isn't looking for point-in-time recovery with this plan -
just a simple nightly backup in case of...
> Opinions and suggestions would be greatly appeciated - thanks.
> Here is the plan it created:
> DATABASES
> Health
> SERVERS
> (local)
> COMPLETE BACKUP
> Occurs every 1 week(s) on Monday, Tuesday, Wednesday,
Thursday, Friday, Saturday, at 2:00:00 AM.
> Backup media: Disk
> Store backup files in the default SQL Server Backup directory.
> Delete backup files which are older than 4 Week(s).
> Verify the backup after completion.
> Create a subdirectory for each database, to store the backup
files.
> TRANSACTION LOG BACKUP
> Occurs every 1 week(s) on Monday, Tuesday, Wednesday,
Thursday, Friday, Saturday, at 12:00:00 AM.
> Backup media: Disk
> Store backup files in the default SQL Server Backup directory.
> Delete backup files which are older than 4 Week(s).
> Verify the backup after completion.
> Create a subdirectory for each database, to store the backup
files.
> Operator 'sqlops' will be e-mailed.
>|||Thanks...
To clarify, though, the .BAK file created every night in this plan is a full
y restorable DATA and LOG file from that moment - right?
I like the idea of the hourly transaction log backup - does that mean that I
still keep with this one maintenance plan, but have the TRANSACTION LOG par
t run hourly?
Steve
-- Tibor Karaszi wrote: --
Steve,
If you really don't need log backup, then just set the recovery mode to
simple and don't do log backups!
However, log backups is IMO a good thing to have as it gives a number of
good things (point in time recovery, ability to do a log backup if the data
part of the db crashes etc). If you decide to do log backups, I suggest
every hour (or so).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Steve Z" <szlamany@.antarescomputing.com> wrote in message
news:5856B024-0342-4D26-9715-3123C1A224EC@.microsoft.com...
> I normally steer clear of the EM wizards, but in this case I used it to
create a maintenance plan.
that we could restore from in the event of programming disaster, etc.
It defaulted to 12:00 am, as opposed to 2:00 am, what good is that. The
COMPLETE BACKUP has mdf/ldf in it - right?
just a simple nightly backup in case of...
> Health
> (local)
> Occurs every 1 week(s) on Monday, Tuesday, Wednesday,
Thursday, Friday, Saturday, at 2:00:00 AM.
> Backup media: Disk
> Store backup files in the default SQL Server Backup directory.
> Delete backup files which are older than 4 Week(s).
> Verify the backup after completion.
> Create a subdirectory for each database, to store the backup
files.
> Occurs every 1 week(s) on Monday, Tuesday, Wednesday,
Thursday, Friday, Saturday, at 12:00:00 AM.
> Backup media: Disk
> Store backup files in the default SQL Server Backup directory.
> Delete backup files which are older than 4 Week(s).
> Verify the backup after completion.
> Create a subdirectory for each database, to store the backup
files.|||transaction log backup has nothing to do with the
database backup (except the first time). keep both.
>--Original Message--
>Thanks...
>To clarify, though, the .BAK file created every night in
this plan is a fully restorable DATA and LOG file from
that moment - right?
>I like the idea of the hourly transaction log backup -
does that mean that I still keep with this one
maintenance plan, but have the TRANSACTION LOG part run
hourly?
>Steve
> -- Tibor Karaszi wrote: --
> Steve,
> If you really don't need log backup, then just set
the recovery mode to
> simple and don't do log backups!
> However, log backups is IMO a good thing to have as
it gives a number of
> good things (point in time recovery, ability to do
a log backup if the data
> part of the db crashes etc). If you decide to do
log backups, I suggest
> every hour (or so).
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
>
> "Steve Z" <szlamany@.antarescomputing.com> wrote in
message
> news:5856B024-0342-4D26-9715-
3123C1A224EC@.microsoft.com...
this case I used it to
> create a maintenance plan.
thus getting a .BAK file
> that we could restore from in the event of
programming disaster, etc.
backup, but I'm not sure why.
> It defaulted to 12:00 am, as opposed to 2:00 am,
what good is that. The
> COMPLETE BACKUP has mdf/ldf in it - right?
recovery with this plan -
> just a simple nightly backup in case of...
appeciated - thanks.
Tuesday, Wednesday,
> Thursday, Friday, Saturday, at 2:00:00 AM.
Server Backup directory.
than 4 Week(s).
database, to store the backup
> files.
Tuesday, Wednesday,
> Thursday, Friday, Saturday, at 12:00:00 AM.
Server Backup directory.
than 4 Week(s).
database, to store the backup
> files.
>.
>|||Don't confuse the mdf and ldf files with database and log backups. A
database backup is a full backup of the database. When you restore such, SQL
Server will create both the mdf and ldf file(s) for you.
Yes, if you want to do log backup, you can do it using the maint plan.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Steve Z" <szlamany@.antarescomputing.com> wrote in message
news:769A4790-39ED-41A6-A527-AB6955D094DC@.microsoft.com...
> Thanks...
> To clarify, though, the .BAK file created every night in this plan is a
fully restorable DATA and LOG file from that moment - right?
> I like the idea of the hourly transaction log backup - does that mean that
I still keep with this one maintenance plan, but have the TRANSACTION LOG
part run hourly?
> Steve
> -- Tibor Karaszi wrote: --
> Steve,
> If you really don't need log backup, then just set the recovery mode
to
> simple and don't do log backups!
> However, log backups is IMO a good thing to have as it gives a number
of
> good things (point in time recovery, ability to do a log backup if
the data
> part of the db crashes etc). If you decide to do log backups, I
suggest
> every hour (or so).
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
>
> "Steve Z" <szlamany@.antarescomputing.com> wrote in message
> news:5856B024-0342-4D26-9715-3123C1A224EC@.microsoft.com...
it to
> create a maintenance plan.
.BAK file
> that we could restore from in the event of programming disaster, etc.
sure why.
> It defaulted to 12:00 am, as opposed to 2:00 am, what good is that.
The
> COMPLETE BACKUP has mdf/ldf in it - right?
plan -
> just a simple nightly backup in case of...
> Thursday, Friday, Saturday, at 2:00:00 AM.
directory.
backup
> files.
> Thursday, Friday, Saturday, at 12:00:00 AM.
directory.
backup
> files.|||Hi Steve,
I am reviewing you post and since we have not heard from you for some time
in the newsgroup, I wonder if you still have some question about it besides
our MVP's information. As Tibor said, system will baks up the original
database files and records their locations. It contains:
1)schema and file structure
2) data
3) portion or the transaction log files. the portion of the transaction log
that is backed up contains database activities since the start of the
backup process
The Restore process will use this information to re-create all the files in
their original loacations, complete with objects and data.
For any more question, please post your message here and we are glad to
help.
Thanks.
Best regards
Baisong Wei
Microsoft Online Support
----
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.

database maintenance plan

i am a new to sql server, my question is that can we create database
maintenance plan for those database with offline or detached status.
Thanks
nickHi
No. Those DB's are not accessible, so you can not.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Nick" <Nick@.discussions.microsoft.com> wrote in message
news:201D8F36-7A07-4989-A58E-C87A91640491@.microsoft.com...
> i am a new to sql server, my question is that can we create database
> maintenance plan for those database with offline or detached status.
>
> Thanks
> nick|||Nick
No, why do you want to do that? Put the in the safe place.
"Nick" <Nick@.discussions.microsoft.com> wrote in message
news:201D8F36-7A07-4989-A58E-C87A91640491@.microsoft.com...
> i am a new to sql server, my question is that can we create database
> maintenance plan for those database with offline or detached status.
>
> Thanks
> nick

Friday, February 17, 2012

Database Login fails

Hi

I can logon to my Sql server using the SSMS management tool, I am using Windows Authentication to logon to SSMS. Create a database OK, with all the necessary tables.

However when I start a VB Express app and try to connect to this database I get an error that login filed for user AMD\Larry, AMD is my PC name and my login (Larry) is the computer Administrator logon. The PC is a standalone ie not part of a domain etc.

Can anyone help?

Regards.

Larry.

Hi Larry,

to solve you problem: in SSMS, connect to your database, go to Security, Logins, New Login, Add new login as AMD\Larry and give it right to access your database.

good luck

mario

|||Are you also using integrated Authentication in VB Express. Make sure that you don′t really *type* in the user as this will be recognized as a SQL Server login. Integrated login is done in the background and don′t have be typed in somewhere (I also mention that becasue many people are always confused about that)


HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

|||Thanks for these I wil try them and get back.

Database login

I have a web based application that could have many clients/users.
Should I create a user account for each client browsing the web site.
They can only access certain data after they have been verified from a
user table. They use a common database login to access the data. This
is planned to be a public free site. So hopefully the client count
will be high.create login that the application uses to get to the DB... instead of
creating a login for each user.|||Ok thats they wey I'm approaching it now.|||Are you using an ODBC or DSN less, either way assuming the users should
have the same permissions then 1 user is created in the db with a certain
level of permissions. You may also have an admin section , therfore the
admin user may have a different set of permissions
Jack Vamvas
___________________________________
Receive free SQL tips - www.ciquery.com/sqlserver.htm
"nathan001" <nathan@.thelosthorizon.com> wrote in message
news:1143477924.849156.7120@.z34g2000cwc.googlegroups.com...
> Ok thats they wey I'm approaching it now.
>|||From what you describe, it sounds like you need ASP.NET Forms
Authentication. At a minimum, you will need to implement a table with one
row for each subscriber.
ASP.NET Forms Authentication Overview
http://msdn2.microsoft.com/en-us/library/7t6b43z4.aspx
As for database (server) logins, you will need to implement one login for
each type of user (admin, subscriber, guest, etc.) and then use SQL Server
role based permissions to restrict each user's access to specific database
objects.
SQL Server 2000 Administrator's Pocket Consultant - Chapter 5: SQL Server
2000 Security
http://www.microsoft.com/technet/pr...s/c05ppcsq.mspx
SQL Server 2000 Operations Guide: Security Administration
http://www.microsoft.com/technet/pr...in/sqlops3.mspx
SQL Server 2000 Resource Kit - Chapter 10: Implementing Security
http://www.microsoft.com/technet/pr...fr=true

If this database is hosted by a 3rd party internet service provider, then
you will need to coordinate with the server administrator to setup the
logins and permissions, becuase these configurations require server admin
rights. If your ISP provides this functionality through their website
management tool, then that's great, but that would be exceptional.
"nathan001" <nathan@.thelosthorizon.com> wrote in message
news:1143473709.083112.37370@.i40g2000cwc.googlegroups.com...
>I have a web based application that could have many clients/users.
> Should I create a user account for each client browsing the web site.
> They can only access certain data after they have been verified from a
> user table. They use a common database login to access the data. This
> is planned to be a public free site. So hopefully the client count
> will be high.
>

Tuesday, February 14, 2012

Database Link

Hi!
Is it possible to use database links on MS SQL-Server 2000, like on Oracle? If its possibe, what is the syntax and can i create a database link from Microsoft SQL Server 2000 to Oracle?
NickI think what you are talking about is a Linked server . Look up more on linked servers in Books Online.And ... Yes ... you can create a linked server to Oracle

Database Level Triggers in SQL 2000? File Writing?

Hello,

Is there any ability to do database-level triggers in SQL 2000? I have a SQL 2000 database, and I was asked if we could create a trigger that whenever anyone touches the data in a database, to create an entry in an event log? If not, I have a main table I can put a trigger on; however, my question is how do you write to a file in a trigger as well?

Thanks.

No, you need to do it individually table by table.

The same in SQL 2005.

Also think how your 'log' table will look like as layout of all tables is different

|||

bmains:

s there any ability to do database-level triggers in SQL 2000?

I'm afraid the database level triggers are introduced in SQL 2005 only. So, you can't create a database level trigger in SQL 2000. See if below link can be useful.

http://www.microsoft.com/technet/security/prodtech/sqlserver/sql2kaud.mspx

Hope this will help.