Hi,
I want to restrict the access to enterprise manager from the developer
computer. They need the access the develpment machine so they require
enterprise manager on their machines. But i do not want them to access
the production database from their workstation enterprise manager. Also
because they are developers they know the username/password for the
production database.
If there is any tool or utility which check who is login in and from
which program and than it can accept or reject the connection would ba
great help.
Regards,
Puneet
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
"Puneet Parashar" <parashar22@.hotmail.com> wrote in message
news:#tPxEX5YEHA.3432@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I want to restrict the access to enterprise manager from the developer
> computer. They need the access the develpment machine so they require
> enterprise manager on their machines. But i do not want them to access
> the production database from their workstation enterprise manager. Also
> because they are developers they know the username/password for the
> production database.
> If there is any tool or utility which check who is login in and from
> which program and than it can accept or reject the connection would ba
> great help.
>
> Regards,
> Puneet
> *** Sent via Devdex http://www.devdex.com ***
> Don't just participate in USENET...get rewarded for it!
|||Hi,
Check the sql server security in BOL.
1) Delete the guest user account from the database.
2) Restrict the users and give the permissions only to the specific
databases which they need.
"Puneet Parashar" <parashar22@.hotmail.com> wrote in message
news:#tPxEX5YEHA.3432@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I want to restrict the access to enterprise manager from the developer
> computer. They need the access the develpment machine so they require
> enterprise manager on their machines. But i do not want them to access
> the production database from their workstation enterprise manager. Also
> because they are developers they know the username/password for the
> production database.
> If there is any tool or utility which check who is login in and from
> which program and than it can accept or reject the connection would ba
> great help.
>
> Regards,
> Puneet
> *** Sent via Devdex http://www.devdex.com ***
> Don't just participate in USENET...get rewarded for it!
Showing posts with label manager. Show all posts
Showing posts with label manager. Show all posts
Friday, March 30, 2012
Restrict User Access in MSSQL 2000
Hi,
I have few SQL user who has permissions on different databases. When they are accessing MSSQL server from Enterprise Manager they can see all Databases but can not access them and they can change file size allocated to them. I want to restrict this and they can only see database belongs to respective user and restrict user to change allocated size. Please help me with this as I am not able to find the solution.
Thanks & Regards,
Gaurav
You cannot restrict the users in SQL Server 2000 from seeing the available databases (this can be done in SQL Server 2005 by revoking VIEW ANY DATABASE to the public server role).
Also, a database owner will be able to change the file size for the databases he owns; you cannot prevent this.
Thanks
Laurentiu
Restrict remote admin
Hello,
Is it possible to restrict remote admin of SQL Server? I
would like to prevent anybody with Enterprise Manager on
their workstation from connecting and accessing the
databases.
Ideally I would like to prevent all Enterprise Manager
access except from the server using the local Enterprise
Manager.
Is this possible. I could not find anything on MS
knowledge base about this.
Thanks"AL" <anonymous@.discussions.microsoft.com> wrote in message
news:a5f101c3eb6e$90c6bf60$a401280a@.phx.gbl...
By remote admin, do you mean someone with sysadmin rights on SQL Server, or
someone with admin rights on the server? The former you can't prevent,
unless you deny access to the server itself.
If the latter, be sure you are using Windows Authentication, secure your SQL
Server logins and database permissions. You can add your own custom group in
SQL Server assign sysadmin rights to that group, place a strong password on
the sa account, finally remove the builtin\administrators group.
Stevesql
Is it possible to restrict remote admin of SQL Server? I
would like to prevent anybody with Enterprise Manager on
their workstation from connecting and accessing the
databases.
Ideally I would like to prevent all Enterprise Manager
access except from the server using the local Enterprise
Manager.
Is this possible. I could not find anything on MS
knowledge base about this.
Thanks"AL" <anonymous@.discussions.microsoft.com> wrote in message
news:a5f101c3eb6e$90c6bf60$a401280a@.phx.gbl...
quote:
> Is it possible to restrict remote admin of SQL Server? I
> would like to prevent anybody with Enterprise Manager on
> their workstation from connecting and accessing the
> databases.
> Ideally I would like to prevent all Enterprise Manager
> access except from the server using the local Enterprise
> Manager.
> Is this possible. I could not find anything on MS
> knowledge base about this.
By remote admin, do you mean someone with sysadmin rights on SQL Server, or
someone with admin rights on the server? The former you can't prevent,
unless you deny access to the server itself.
If the latter, be sure you are using Windows Authentication, secure your SQL
Server logins and database permissions. You can add your own custom group in
SQL Server assign sysadmin rights to that group, place a strong password on
the sa account, finally remove the builtin\administrators group.
Stevesql
restrict enterprise manager to see all the databases
Hi,
my question is about security, but I am sure it has something to do
with the server configuration. It is about normal users other than SA.
In the server, multiple users, and each user has ownership of a
seperate database. When any of these users connect to the sql server
via Enterprise Manager, they are able to see all the databases, not
only they owned, also other databases they do not have ownership of.
Not that, they can see the tables or the data, but this still
bothers the user(s). How can I restrict the normal users to see only
their database(s) when they logged in thru enterprise manager with
their username and password ?
I aplogize if this quesiton has asked before and answered. If so,
please direct me to the correct link, I could not seek it.
Thank you.
Hi,
As far as I know there is a no way to restrict this in enterprise manager.
You can only hide system databases and system tables
from SQL Server's Registration Properties.
Thanks
Hari
SQL Server MVP
"murtix van basten" <murtix@.gmail.com> wrote in message
news:1158899177.310068.275240@.d34g2000cwd.googlegr oups.com...
> Hi,
> my question is about security, but I am sure it has something to do
> with the server configuration. It is about normal users other than SA.
> In the server, multiple users, and each user has ownership of a
> seperate database. When any of these users connect to the sql server
> via Enterprise Manager, they are able to see all the databases, not
> only they owned, also other databases they do not have ownership of.
> Not that, they can see the tables or the data, but this still
> bothers the user(s). How can I restrict the normal users to see only
> their database(s) when they logged in thru enterprise manager with
> their username and password ?
> I aplogize if this quesiton has asked before and answered. If so,
> please direct me to the correct link, I could not seek it.
> Thank you.
>
|||murtix van basten wrote:
> Hi,
> my question is about security, but I am sure it has something to do
> with the server configuration. It is about normal users other than SA.
> In the server, multiple users, and each user has ownership of a
> seperate database. When any of these users connect to the sql server
> via Enterprise Manager, they are able to see all the databases, not
> only they owned, also other databases they do not have ownership of.
> Not that, they can see the tables or the data, but this still
> bothers the user(s). How can I restrict the normal users to see only
> their database(s) when they logged in thru enterprise manager with
> their username and password ?
> I aplogize if this quesiton has asked before and answered. If so,
> please direct me to the correct link, I could not seek it.
> Thank you.
>
Can't do this with Enterprise Manager...
Tracy McKibben
MCDBA
http://www.realsqlguy.com
|||Thank you for the answers.
Tracy McKibben wrote:
> murtix van basten wrote:
> Can't do this with Enterprise Manager...
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
my question is about security, but I am sure it has something to do
with the server configuration. It is about normal users other than SA.
In the server, multiple users, and each user has ownership of a
seperate database. When any of these users connect to the sql server
via Enterprise Manager, they are able to see all the databases, not
only they owned, also other databases they do not have ownership of.
Not that, they can see the tables or the data, but this still
bothers the user(s). How can I restrict the normal users to see only
their database(s) when they logged in thru enterprise manager with
their username and password ?
I aplogize if this quesiton has asked before and answered. If so,
please direct me to the correct link, I could not seek it.
Thank you.
Hi,
As far as I know there is a no way to restrict this in enterprise manager.
You can only hide system databases and system tables
from SQL Server's Registration Properties.
Thanks
Hari
SQL Server MVP
"murtix van basten" <murtix@.gmail.com> wrote in message
news:1158899177.310068.275240@.d34g2000cwd.googlegr oups.com...
> Hi,
> my question is about security, but I am sure it has something to do
> with the server configuration. It is about normal users other than SA.
> In the server, multiple users, and each user has ownership of a
> seperate database. When any of these users connect to the sql server
> via Enterprise Manager, they are able to see all the databases, not
> only they owned, also other databases they do not have ownership of.
> Not that, they can see the tables or the data, but this still
> bothers the user(s). How can I restrict the normal users to see only
> their database(s) when they logged in thru enterprise manager with
> their username and password ?
> I aplogize if this quesiton has asked before and answered. If so,
> please direct me to the correct link, I could not seek it.
> Thank you.
>
|||murtix van basten wrote:
> Hi,
> my question is about security, but I am sure it has something to do
> with the server configuration. It is about normal users other than SA.
> In the server, multiple users, and each user has ownership of a
> seperate database. When any of these users connect to the sql server
> via Enterprise Manager, they are able to see all the databases, not
> only they owned, also other databases they do not have ownership of.
> Not that, they can see the tables or the data, but this still
> bothers the user(s). How can I restrict the normal users to see only
> their database(s) when they logged in thru enterprise manager with
> their username and password ?
> I aplogize if this quesiton has asked before and answered. If so,
> please direct me to the correct link, I could not seek it.
> Thank you.
>
Can't do this with Enterprise Manager...
Tracy McKibben
MCDBA
http://www.realsqlguy.com
|||Thank you for the answers.
Tracy McKibben wrote:
> murtix van basten wrote:
> Can't do this with Enterprise Manager...
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
restrict enterprise manager to see all the databases
Hi,
my question is about security, but I am sure it has something to do
with the server configuration. It is about normal users other than SA.
In the server, multiple users, and each user has ownership of a
seperate database. When any of these users connect to the sql server
via Enterprise Manager, they are able to see all the databases, not
only they owned, also other databases they do not have ownership of.
Not that, they can see the tables or the data, but this still
bothers the user(s). How can I restrict the normal users to see only
their database(s) when they logged in thru enterprise manager with
their username and password ?
I aplogize if this quesiton has asked before and answered. If so,
please direct me to the correct link, I could not seek it.
Thank you.Hi,
As far as I know there is a no way to restrict this in enterprise manager.
You can only hide system databases and system tables
from SQL Server's Registration Properties.
Thanks
Hari
SQL Server MVP
"murtix van basten" <murtix@.gmail.com> wrote in message
news:1158899177.310068.275240@.d34g2000cwd.googlegroups.com...
> Hi,
> my question is about security, but I am sure it has something to do
> with the server configuration. It is about normal users other than SA.
> In the server, multiple users, and each user has ownership of a
> seperate database. When any of these users connect to the sql server
> via Enterprise Manager, they are able to see all the databases, not
> only they owned, also other databases they do not have ownership of.
> Not that, they can see the tables or the data, but this still
> bothers the user(s). How can I restrict the normal users to see only
> their database(s) when they logged in thru enterprise manager with
> their username and password ?
> I aplogize if this quesiton has asked before and answered. If so,
> please direct me to the correct link, I could not seek it.
> Thank you.
>|||murtix van basten wrote:
> Hi,
> my question is about security, but I am sure it has something to do
> with the server configuration. It is about normal users other than SA.
> In the server, multiple users, and each user has ownership of a
> seperate database. When any of these users connect to the sql server
> via Enterprise Manager, they are able to see all the databases, not
> only they owned, also other databases they do not have ownership of.
> Not that, they can see the tables or the data, but this still
> bothers the user(s). How can I restrict the normal users to see only
> their database(s) when they logged in thru enterprise manager with
> their username and password ?
> I aplogize if this quesiton has asked before and answered. If so,
> please direct me to the correct link, I could not seek it.
> Thank you.
>
Can't do this with Enterprise Manager...
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Thank you for the answers.
Tracy McKibben wrote:
> murtix van basten wrote:
> > Hi,
> >
> > my question is about security, but I am sure it has something to do
> > with the server configuration. It is about normal users other than SA.
> >
> > In the server, multiple users, and each user has ownership of a
> > seperate database. When any of these users connect to the sql server
> > via Enterprise Manager, they are able to see all the databases, not
> > only they owned, also other databases they do not have ownership of.
> >
> > Not that, they can see the tables or the data, but this still
> > bothers the user(s). How can I restrict the normal users to see only
> > their database(s) when they logged in thru enterprise manager with
> > their username and password ?
> >
> > I aplogize if this quesiton has asked before and answered. If so,
> > please direct me to the correct link, I could not seek it.
> >
> > Thank you.
> >
> Can't do this with Enterprise Manager...
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
my question is about security, but I am sure it has something to do
with the server configuration. It is about normal users other than SA.
In the server, multiple users, and each user has ownership of a
seperate database. When any of these users connect to the sql server
via Enterprise Manager, they are able to see all the databases, not
only they owned, also other databases they do not have ownership of.
Not that, they can see the tables or the data, but this still
bothers the user(s). How can I restrict the normal users to see only
their database(s) when they logged in thru enterprise manager with
their username and password ?
I aplogize if this quesiton has asked before and answered. If so,
please direct me to the correct link, I could not seek it.
Thank you.Hi,
As far as I know there is a no way to restrict this in enterprise manager.
You can only hide system databases and system tables
from SQL Server's Registration Properties.
Thanks
Hari
SQL Server MVP
"murtix van basten" <murtix@.gmail.com> wrote in message
news:1158899177.310068.275240@.d34g2000cwd.googlegroups.com...
> Hi,
> my question is about security, but I am sure it has something to do
> with the server configuration. It is about normal users other than SA.
> In the server, multiple users, and each user has ownership of a
> seperate database. When any of these users connect to the sql server
> via Enterprise Manager, they are able to see all the databases, not
> only they owned, also other databases they do not have ownership of.
> Not that, they can see the tables or the data, but this still
> bothers the user(s). How can I restrict the normal users to see only
> their database(s) when they logged in thru enterprise manager with
> their username and password ?
> I aplogize if this quesiton has asked before and answered. If so,
> please direct me to the correct link, I could not seek it.
> Thank you.
>|||murtix van basten wrote:
> Hi,
> my question is about security, but I am sure it has something to do
> with the server configuration. It is about normal users other than SA.
> In the server, multiple users, and each user has ownership of a
> seperate database. When any of these users connect to the sql server
> via Enterprise Manager, they are able to see all the databases, not
> only they owned, also other databases they do not have ownership of.
> Not that, they can see the tables or the data, but this still
> bothers the user(s). How can I restrict the normal users to see only
> their database(s) when they logged in thru enterprise manager with
> their username and password ?
> I aplogize if this quesiton has asked before and answered. If so,
> please direct me to the correct link, I could not seek it.
> Thank you.
>
Can't do this with Enterprise Manager...
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Thank you for the answers.
Tracy McKibben wrote:
> murtix van basten wrote:
> > Hi,
> >
> > my question is about security, but I am sure it has something to do
> > with the server configuration. It is about normal users other than SA.
> >
> > In the server, multiple users, and each user has ownership of a
> > seperate database. When any of these users connect to the sql server
> > via Enterprise Manager, they are able to see all the databases, not
> > only they owned, also other databases they do not have ownership of.
> >
> > Not that, they can see the tables or the data, but this still
> > bothers the user(s). How can I restrict the normal users to see only
> > their database(s) when they logged in thru enterprise manager with
> > their username and password ?
> >
> > I aplogize if this quesiton has asked before and answered. If so,
> > please direct me to the correct link, I could not seek it.
> >
> > Thank you.
> >
> Can't do this with Enterprise Manager...
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
restrict enterprise manager to see all the databases
Hi,
my question is about security, but I am sure it has something to do
with the server configuration. It is about normal users other than SA.
In the server, multiple users, and each user has ownership of a
seperate database. When any of these users connect to the sql server
via Enterprise Manager, they are able to see all the databases, not
only they owned, also other databases they do not have ownership of.
Not that, they can see the tables or the data, but this still
bothers the user(s). How can I restrict the normal users to see only
their database(s) when they logged in thru enterprise manager with
their username and password ?
I aplogize if this quesiton has asked before and answered. If so,
please direct me to the correct link, I could not seek it.
Thank you.Hi,
As far as I know there is a no way to restrict this in enterprise manager.
You can only hide system databases and system tables
from SQL Server's Registration Properties.
Thanks
Hari
SQL Server MVP
"murtix van basten" <murtix@.gmail.com> wrote in message
news:1158899177.310068.275240@.d34g2000cwd.googlegroups.com...
> Hi,
> my question is about security, but I am sure it has something to do
> with the server configuration. It is about normal users other than SA.
> In the server, multiple users, and each user has ownership of a
> seperate database. When any of these users connect to the sql server
> via Enterprise Manager, they are able to see all the databases, not
> only they owned, also other databases they do not have ownership of.
> Not that, they can see the tables or the data, but this still
> bothers the user(s). How can I restrict the normal users to see only
> their database(s) when they logged in thru enterprise manager with
> their username and password ?
> I aplogize if this quesiton has asked before and answered. If so,
> please direct me to the correct link, I could not seek it.
> Thank you.
>|||murtix van basten wrote:
> Hi,
> my question is about security, but I am sure it has something to do
> with the server configuration. It is about normal users other than SA.
> In the server, multiple users, and each user has ownership of a
> seperate database. When any of these users connect to the sql server
> via Enterprise Manager, they are able to see all the databases, not
> only they owned, also other databases they do not have ownership of.
> Not that, they can see the tables or the data, but this still
> bothers the user(s). How can I restrict the normal users to see only
> their database(s) when they logged in thru enterprise manager with
> their username and password ?
> I aplogize if this quesiton has asked before and answered. If so,
> please direct me to the correct link, I could not seek it.
> Thank you.
>
Can't do this with Enterprise Manager...
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Thank you for the answers.
Tracy McKibben wrote:
> murtix van basten wrote:
> Can't do this with Enterprise Manager...
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
my question is about security, but I am sure it has something to do
with the server configuration. It is about normal users other than SA.
In the server, multiple users, and each user has ownership of a
seperate database. When any of these users connect to the sql server
via Enterprise Manager, they are able to see all the databases, not
only they owned, also other databases they do not have ownership of.
Not that, they can see the tables or the data, but this still
bothers the user(s). How can I restrict the normal users to see only
their database(s) when they logged in thru enterprise manager with
their username and password ?
I aplogize if this quesiton has asked before and answered. If so,
please direct me to the correct link, I could not seek it.
Thank you.Hi,
As far as I know there is a no way to restrict this in enterprise manager.
You can only hide system databases and system tables
from SQL Server's Registration Properties.
Thanks
Hari
SQL Server MVP
"murtix van basten" <murtix@.gmail.com> wrote in message
news:1158899177.310068.275240@.d34g2000cwd.googlegroups.com...
> Hi,
> my question is about security, but I am sure it has something to do
> with the server configuration. It is about normal users other than SA.
> In the server, multiple users, and each user has ownership of a
> seperate database. When any of these users connect to the sql server
> via Enterprise Manager, they are able to see all the databases, not
> only they owned, also other databases they do not have ownership of.
> Not that, they can see the tables or the data, but this still
> bothers the user(s). How can I restrict the normal users to see only
> their database(s) when they logged in thru enterprise manager with
> their username and password ?
> I aplogize if this quesiton has asked before and answered. If so,
> please direct me to the correct link, I could not seek it.
> Thank you.
>|||murtix van basten wrote:
> Hi,
> my question is about security, but I am sure it has something to do
> with the server configuration. It is about normal users other than SA.
> In the server, multiple users, and each user has ownership of a
> seperate database. When any of these users connect to the sql server
> via Enterprise Manager, they are able to see all the databases, not
> only they owned, also other databases they do not have ownership of.
> Not that, they can see the tables or the data, but this still
> bothers the user(s). How can I restrict the normal users to see only
> their database(s) when they logged in thru enterprise manager with
> their username and password ?
> I aplogize if this quesiton has asked before and answered. If so,
> please direct me to the correct link, I could not seek it.
> Thank you.
>
Can't do this with Enterprise Manager...
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Thank you for the answers.
Tracy McKibben wrote:
> murtix van basten wrote:
> Can't do this with Enterprise Manager...
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
Wednesday, March 7, 2012
restoring from .bak file
Tried restoring a database from .bak file through Enterprise Manager and also by usng the following code :
RESTORE DATABASE DBB
FROM DISK = 'c:\DBA.BAK'
WITH
REPLACE,
RECOVERY,
MOVE 'ap0data' TO 'c:\mssql\data\apm_data.mdf',
MOVE 'ap0Log' TO 'c:\mssql\data\apm_log.ldf'
But, I get an error :
Server: Msg 3156, Level 16, State 2, Line 1
The file 'd:\mssql7\data\apm.mdf' cannot be used by RESTORE. Consider using the WITH MOVE option to identify a valid location for the file.
I have got the two filenames i.e."ap0data" and "ap0log" by using the command "restore fileslistonly from disk = c:\dba.bak".
Can anyone help me to do the things rigtly ?This should work !!!
RESTORE DATABASE DBB
FROM DISK = 'c:\DBA.BAK'
WITH MOVE 'ap0data' TO 'c:\mssql\data\apm_data.mdf',
MOVE 'ap0Log' TO 'c:\mssql\data\apm_log.ldf'|||Thanks for your help.
I tried the code, but got error:
Server: Msg 3154, Level 16, State 1, Line 1
The backup set holds a backup of a database other than the existing 'apm' database.
I don't have the original database. I have just created a blank database and I am trying to restore.|||RESTORE FILELISTONLY
FROM 'c:\DBA.BAK'
RESTORE FILELISTONLY
FROM 'c:\DBA.BAK' WITH FILE = 2
Run these two and get back with the results|||RESTORE FILELISTONLY
FROM 'c:\DBA.BAK'
RESTORE FILELISTONLY
FROM 'c:\DBA.BAK' WITH FILE = 2
Server: Msg 4038, Level 16, State 1, Line 1
Cannot find file ID 2 on device 'c:\windows\desktop\cmpbk.BAK'.|||Try this :
RESTORE DATABASE DBB FROM DISK = N'c:\DBA.BAK' WITH FILE = 1,
RECOVERY , REPLACE ,
MOVE N'ap0data' TO N'c:\mssql\data\apm_data.mdf',
MOVE N'ap0Log' TO N'c:\mssql\data\apm_log.ldf'|||Tried :
Server: Msg 3156, Level 16, State 2, Line 1
The file 'c:\mssql\data\apm_data.mdf' cannot be used by RESTORE. Consider using the WITH MOVE option to identify a valid location for the file.|||sp_helpdb dbb
?|||name = apm
db_size = 2.00mb
owner = sa
bdid = 8
status = select into/bulkocopy, trun. log on chkpt
name = apm_data
fileid = 1
filename = c:\mssql7\data\apm_data.mdf
filegroup = primary
maxsize = unlimited
growth = 10%
usage = data only
name = apm_log
fileid = 2
filename = c:\mssql7\data\apm_log.ldf
filegroup = null
maxsize = unlimited
growth = 10%
usage = log only|||am clutching at straws now
RESTORE DATABASE TestDB FROM DISK = N'c:\DBA.BAK' WITH
MOVE N'ap0data' TO N'c:\mssql\data\apb1_data1.mdf',
MOVE N'ap0Log' TO N'c:\mssql\data\apb1_log1.ldf'
i mean try restoring to a completely new database ... let the restore statements create the db|||Hey, It worked.
Thank you very much, Sir|||now you can use the sp_renamedb command to change it to the name you want.
RESTORE DATABASE DBB
FROM DISK = 'c:\DBA.BAK'
WITH
REPLACE,
RECOVERY,
MOVE 'ap0data' TO 'c:\mssql\data\apm_data.mdf',
MOVE 'ap0Log' TO 'c:\mssql\data\apm_log.ldf'
But, I get an error :
Server: Msg 3156, Level 16, State 2, Line 1
The file 'd:\mssql7\data\apm.mdf' cannot be used by RESTORE. Consider using the WITH MOVE option to identify a valid location for the file.
I have got the two filenames i.e."ap0data" and "ap0log" by using the command "restore fileslistonly from disk = c:\dba.bak".
Can anyone help me to do the things rigtly ?This should work !!!
RESTORE DATABASE DBB
FROM DISK = 'c:\DBA.BAK'
WITH MOVE 'ap0data' TO 'c:\mssql\data\apm_data.mdf',
MOVE 'ap0Log' TO 'c:\mssql\data\apm_log.ldf'|||Thanks for your help.
I tried the code, but got error:
Server: Msg 3154, Level 16, State 1, Line 1
The backup set holds a backup of a database other than the existing 'apm' database.
I don't have the original database. I have just created a blank database and I am trying to restore.|||RESTORE FILELISTONLY
FROM 'c:\DBA.BAK'
RESTORE FILELISTONLY
FROM 'c:\DBA.BAK' WITH FILE = 2
Run these two and get back with the results|||RESTORE FILELISTONLY
FROM 'c:\DBA.BAK'
RESTORE FILELISTONLY
FROM 'c:\DBA.BAK' WITH FILE = 2
Server: Msg 4038, Level 16, State 1, Line 1
Cannot find file ID 2 on device 'c:\windows\desktop\cmpbk.BAK'.|||Try this :
RESTORE DATABASE DBB FROM DISK = N'c:\DBA.BAK' WITH FILE = 1,
RECOVERY , REPLACE ,
MOVE N'ap0data' TO N'c:\mssql\data\apm_data.mdf',
MOVE N'ap0Log' TO N'c:\mssql\data\apm_log.ldf'|||Tried :
Server: Msg 3156, Level 16, State 2, Line 1
The file 'c:\mssql\data\apm_data.mdf' cannot be used by RESTORE. Consider using the WITH MOVE option to identify a valid location for the file.|||sp_helpdb dbb
?|||name = apm
db_size = 2.00mb
owner = sa
bdid = 8
status = select into/bulkocopy, trun. log on chkpt
name = apm_data
fileid = 1
filename = c:\mssql7\data\apm_data.mdf
filegroup = primary
maxsize = unlimited
growth = 10%
usage = data only
name = apm_log
fileid = 2
filename = c:\mssql7\data\apm_log.ldf
filegroup = null
maxsize = unlimited
growth = 10%
usage = log only|||am clutching at straws now
RESTORE DATABASE TestDB FROM DISK = N'c:\DBA.BAK' WITH
MOVE N'ap0data' TO N'c:\mssql\data\apb1_data1.mdf',
MOVE N'ap0Log' TO N'c:\mssql\data\apb1_log1.ldf'
i mean try restoring to a completely new database ... let the restore statements create the db|||Hey, It worked.
Thank you very much, Sir|||now you can use the sp_renamedb command to change it to the name you want.
Saturday, February 25, 2012
Restoring database...
Hi!!!
Database and all information about it was deleted (from Enterprise Manager)
but earlier a backup hade been made.
How can I restore this database?
Thanks!
TimurTimur
Assuming that you are running SQL Server 2000 (or 7.0), make sure that the
account you do the restore from has CREATE DATABASE rights (which sysadmin
will have) and do a RESTORE.
If you are on 6.5 the job is harder. Reply if that is your problem.
Russell Fields
"" <tim_@.pochtamt.ru> wrote in message
news:uEa7dhC7DHA.3704@.tk2msftngp13.phx.gbl...
Manager)
Database and all information about it was deleted (from Enterprise Manager)
but earlier a backup hade been made.
How can I restore this database?
Thanks!
TimurTimur
Assuming that you are running SQL Server 2000 (or 7.0), make sure that the
account you do the restore from has CREATE DATABASE rights (which sysadmin
will have) and do a RESTORE.
If you are on 6.5 the job is harder. Reply if that is your problem.
Russell Fields
"" <tim_@.pochtamt.ru> wrote in message
news:uEa7dhC7DHA.3704@.tk2msftngp13.phx.gbl...
quote:
> Hi!!!
> Database and all information about it was deleted (from Enterprise
Manager)
quote:
> but earlier a backup hade been made.
> How can I restore this database?
> Thanks!
> Timur
>
Restoring database...
Hi!!!
Database and all information about it was deleted (from Enterprise Manager)
but earlier a backup hade been made.
How can I restore this database?
Thanks!
TimurTimur
Assuming that you are running SQL Server 2000 (or 7.0), make sure that the
account you do the restore from has CREATE DATABASE rights (which sysadmin
will have) and do a RESTORE.
If you are on 6.5 the job is harder. Reply if that is your problem.
Russell Fields
"ôÉÍÕÒ" <tim_@.pochtamt.ru> wrote in message
news:uEa7dhC7DHA.3704@.tk2msftngp13.phx.gbl...
> Hi!!!
> Database and all information about it was deleted (from Enterprise
Manager)
> but earlier a backup hade been made.
> How can I restore this database?
> Thanks!
> Timur
>|||Provided that the backup was taken with a maintenance plan
or with enterprise manager this would be easy. In
Enterprise Manager, you can expand databases under the sql
server name, right click on any database, select All
Tasks, and click Restore Database. On the general tab in
the Restore as database field select the name of the
database you want to restore or type in the database name
if it isn't there. Next to restore you have 3 radio
buttons, Database, Filegroups or files, and From device.
Select the restore method from one of these buttons. If
you have in fact taken a backup prior to deleting the
database then this should be straightforward. You can
also use the restore database command from within query
analyzer. For the proper syntax see Books OnLine for this
method.
Tim Bridges
MCSE, MCDBA
SQL Server DBA
>--Original Message--
>Hi!!!
>Database and all information about it was deleted (from
Enterprise Manager)
>but earlier a backup hade been made.
>How can I restore this database?
>Thanks!
>Timur
>
>.
>
Database and all information about it was deleted (from Enterprise Manager)
but earlier a backup hade been made.
How can I restore this database?
Thanks!
TimurTimur
Assuming that you are running SQL Server 2000 (or 7.0), make sure that the
account you do the restore from has CREATE DATABASE rights (which sysadmin
will have) and do a RESTORE.
If you are on 6.5 the job is harder. Reply if that is your problem.
Russell Fields
"ôÉÍÕÒ" <tim_@.pochtamt.ru> wrote in message
news:uEa7dhC7DHA.3704@.tk2msftngp13.phx.gbl...
> Hi!!!
> Database and all information about it was deleted (from Enterprise
Manager)
> but earlier a backup hade been made.
> How can I restore this database?
> Thanks!
> Timur
>|||Provided that the backup was taken with a maintenance plan
or with enterprise manager this would be easy. In
Enterprise Manager, you can expand databases under the sql
server name, right click on any database, select All
Tasks, and click Restore Database. On the general tab in
the Restore as database field select the name of the
database you want to restore or type in the database name
if it isn't there. Next to restore you have 3 radio
buttons, Database, Filegroups or files, and From device.
Select the restore method from one of these buttons. If
you have in fact taken a backup prior to deleting the
database then this should be straightforward. You can
also use the restore database command from within query
analyzer. For the proper syntax see Books OnLine for this
method.
Tim Bridges
MCSE, MCDBA
SQL Server DBA
>--Original Message--
>Hi!!!
>Database and all information about it was deleted (from
Enterprise Manager)
>but earlier a backup hade been made.
>How can I restore this database?
>Thanks!
>Timur
>
>.
>
Subscribe to:
Posts (Atom)