Showing posts with label production. Show all posts
Showing posts with label production. Show all posts

Thursday, March 29, 2012

Datatype problem: development vs production servers

This is driving me nuts: On my development machine the code runs finebut generates an error on the production server. Both are running SQLServer 2000 and ASP.NET 1.1

The datatype of the field in question isdatetime.
The webform has a calendar for a user to select and automaticallyinsert the date into the textbox. The update command in the webform is:
cmdInsert.Parameters.Add("@.citation_date", CDate(txtDate.Text))

This works without a hitch on my development system, but on the production server it generates the following error:
Cast from string "19-12-1997" to type 'Date' is not valid.

WHY?Sad [:(]
It has to do with the locale information (country, language, etc.) for the computer. Check to make sure the server is set to whatever you're using on your local development PC. I'm not familiar with setting/changing these since I only use U.S. format and English.|||

jcasp wrote:

It has to do with the locale information (country,language, etc.) for the computer. Check to make sure the serveris set to whatever you're using on your local development PC. I'mnot familiar with setting/changing these since I only use U.S. formatand English.

You are right. I'm inputting U.S format of date for the time being until I've figured a way around it. Thanks!|||Use YYYY-MM-DD format, then it doesn't matter what culture you are in.

Thursday, March 8, 2012

Datafiles placement in filegroup

I'm working with a production database connecting remotely. All the datafile
s, index files and log is placed on the same disk but in different filegroup
names based on separate physical files. But I expect if I place the index f
iles or/add log files sep
arate from the datafiles I mean in different disk it will improve the perfor
mance.
If my expectation is correct then can I change the place of the index and lo
g files in separate location while the database is on-line yes the database
is implemented with log-shipping too.
Please evaluate my query and do give a proper suggestion.
Thanks in advance
Sunilsurely it will improve the performance if the log files are placed seperate
from the data files (different disks).
for the indexes u can delete the existing index and recreate it specifying
the new location.
"Sunil" <anonymous@.discussions.microsoft.com> wrote in message
news:4690C174-4988-4737-82D9-7C0ED08FDF5D@.microsoft.com...
quote:

> I'm working with a production database connecting remotely. All the

datafiles, index files and log is placed on the same disk but in different
filegroup names based on separate physical files. But I expect if I place
the index files or/add log files separate from the datafiles I mean in
different disk it will improve the performance.
quote:

> If my expectation is correct then can I change the place of the index and

log files in separate location while the database is on-line yes the
database is implemented with log-shipping too.
quote:

>
> Please evaluate my query and do give a proper suggestion.
>
> Thanks in advance
> Sunil
>

Datafiles placement in filegroup

I'm working with a production database connecting remotely. All the datafiles, index files and log is placed on the same disk but in different filegroup names based on separate physical files. But I expect if I place the index files or/add log files separate from the datafiles I mean in different disk it will improve the performance.
If my expectation is correct then can I change the place of the index and log files in separate location while the database is on-line yes the database is implemented with log-shipping too.
Please evaluate my query and do give a proper suggestion.
Thanks in advance
Sunilsurely it will improve the performance if the log files are placed seperate
from the data files (different disks).
for the indexes u can delete the existing index and recreate it specifying
the new location.
"Sunil" <anonymous@.discussions.microsoft.com> wrote in message
news:4690C174-4988-4737-82D9-7C0ED08FDF5D@.microsoft.com...
> I'm working with a production database connecting remotely. All the
datafiles, index files and log is placed on the same disk but in different
filegroup names based on separate physical files. But I expect if I place
the index files or/add log files separate from the datafiles I mean in
different disk it will improve the performance.
> If my expectation is correct then can I change the place of the index and
log files in separate location while the database is on-line yes the
database is implemented with log-shipping too.
>
> Please evaluate my query and do give a proper suggestion.
>
> Thanks in advance
> Sunil
>|||You are mostly correct.
Creating new files doesn't automatically improve
performace, it also depends upon the raid configuration of
the disk its going on.
For instance putting a log file on a RAID 0 disk will make
it faster than putting it on a raid 5 disk.
Although its different for every type of application a
normal implementation with cost constraints its to put the
log files on a raid 0 or raid 0+1 with the data files on
raid 5.
J
>--Original Message--
>I'm working with a production database connecting
remotely. All the datafiles, index files and log is placed
on the same disk but in different filegroup names based on
separate physical files. But I expect if I place the index
files or/add log files separate from the datafiles I
mean in different disk it will improve the performance.
>If my expectation is correct then can I change the place
of the index and log files in separate location while the
database is on-line yes the database is implemented with
log-shipping too.
>
>Please evaluate my query and do give a proper suggestion.
>
>Thanks in advance
>Sunil
>.
>

Wednesday, March 7, 2012

DataDir empty

Hi,

The DataDir content has been removed on my production server and I lost all my cubes.

Any ideas to explain this issue ? Do i only need to recreate my cubes or this directory contains other files necessary to run SS2005 ?

Cheers, JL

If you restart the SSAS service with an empty DataDir it will add all the required system files and startup with no databases installed. Then you will either need to redeploy your project and reprocess, or restore a backup.|||

furmangg,

Thanks for your reply ; it was due to a disk issue but things are ok now.

Cheers, JL.

DataDir empty

Hi,

The DataDir content has been removed on my production server and I lost all my cubes.

Any ideas to explain this issue ? Do i only need to recreate my cubes or this directory contains other files necessary to run SS2005 ?

Cheers, JL

If you restart the SSAS service with an empty DataDir it will add all the required system files and startup with no databases installed. Then you will either need to redeploy your project and reprocess, or restore a backup.|||

furmangg,

Thanks for your reply ; it was due to a disk issue but things are ok now.

Cheers, JL.

Sunday, February 26, 2012

Databases, logins and jobs on standby server

I have restored my production server master database to the standby server.
I then ran a series of scripts I found at KB246133:
http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q246133#4
I found that my standby server showed itself as a remote server. I created
linked servers between standby and production; I executed sp_dropserver
'(production server name)' and then sp_addserver (standby server name).
SP_dropserver resulted in a message that said that logins existed for this
server. When I look in the sysservers table on the standby server I have
two entries: one for the production server and one for the standby server.
I've also created a backup device on both the production and standby server
which are the same. The backup file from production is copied to standby so
that the restore can be done on the standby server.
My scripts to copy the backup file and restore the database work fine from
QA on the standby server. However, when I try to execute them as part of a
job, I get failures. The step which copies the database over says:
Could not relay results of procedure 'CopyDatabase_DukeAccount' from remote
server 'NCNSV1010'. [SQLSTATE 42000] (Error 7221) [SQLSTATE 01000] (Error
7312). The step failed.
I am confused why SQL thinks that NCNSV1010 is the remote server since it is
actually the local server that this job is executing on. Additionally, the
backup file IS actually copied over successfully.
The step which restores the database to the standby server, which is the
local server, from the backup device says:
RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013)
Cannot open backup device
'd:\mssql\backup\dukeaccount\DukeAccount_Full.bak'. Device error or device
off-line. See the SQL Server error log for more details. [SQLSTATE 42000]
(Error 3201). The step failed.
However, when I open the backup device to view contents, the just copied
backup file is visible in it.
Both servers are running W2K SP4, SQL2K SP2 (with security patch) Standard
Edition.
Does anyone have any idea what is wrong here? Do I need to drop the logins
for the (production server name) that exist on the standby server? If I do
that, will I then have to run the process again to transfer the logins? I
can't seem to drop the production server from the sysservers table if they
have logins. I could manually drop it from the table, but I don't know what
repurcussions that may have.
I need to figure this out because I must automate this process to run daily,
then the T-Logs many times a day, and I'll be doing this for quite a few
databases on these machines.
Thanks in advance.
Deborah> I found that my standby server showed itself as a remote server. I
created
> linked servers between standby and production; I executed sp_dropserver
> '(production server name)' and then sp_addserver (standby server name).
Seems you forgot to specify the ,local option to sp_addserver.
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Deborah Bohannon" <dbohannon@.nationalDONOTSENDHEREcareanetwork.com> wrote
in message news:eb2bk2FsDHA.1884@.TK2MSFTNGP10.phx.gbl...
> I have restored my production server master database to the standby
server.
> I then ran a series of scripts I found at KB246133:
> http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q246133#4
> I found that my standby server showed itself as a remote server. I
created
> linked servers between standby and production; I executed sp_dropserver
> '(production server name)' and then sp_addserver (standby server name).
> SP_dropserver resulted in a message that said that logins existed for this
> server. When I look in the sysservers table on the standby server I have
> two entries: one for the production server and one for the standby
server.
> I've also created a backup device on both the production and standby
server
> which are the same. The backup file from production is copied to standby
so
> that the restore can be done on the standby server.
> My scripts to copy the backup file and restore the database work fine from
> QA on the standby server. However, when I try to execute them as part of
a
> job, I get failures. The step which copies the database over says:
> Could not relay results of procedure 'CopyDatabase_DukeAccount' from
remote
> server 'NCNSV1010'. [SQLSTATE 42000] (Error 7221) [SQLSTATE 01000]
(Error
> 7312). The step failed.
> I am confused why SQL thinks that NCNSV1010 is the remote server since it
is
> actually the local server that this job is executing on. Additionally,
the
> backup file IS actually copied over successfully.
> The step which restores the database to the standby server, which is the
> local server, from the backup device says:
> RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013)
> Cannot open backup device
> 'd:\mssql\backup\dukeaccount\DukeAccount_Full.bak'. Device error or device
> off-line. See the SQL Server error log for more details. [SQLSTATE 42000]
> (Error 3201). The step failed.
> However, when I open the backup device to view contents, the just copied
> backup file is visible in it.
> Both servers are running W2K SP4, SQL2K SP2 (with security patch) Standard
> Edition.
> Does anyone have any idea what is wrong here? Do I need to drop the
logins
> for the (production server name) that exist on the standby server? If I
do
> that, will I then have to run the process again to transfer the logins? I
> can't seem to drop the production server from the sysservers table if they
> have logins. I could manually drop it from the table, but I don't know
what
> repurcussions that may have.
> I need to figure this out because I must automate this process to run
daily,
> then the T-Logs many times a day, and I'll be doing this for quite a few
> databases on these machines.
> Thanks in advance.
> Deborah
>
>|||Tibor,
You are absolutely right, I hadn't specified local.
Thank you!
Deborah
"Tibor Karaszi" <tibor.please_reply_to_public_forum.karaszi@.cornerstone.se>
wrote in message news:Om179$YsDHA.1996@.TK2MSFTNGP09.phx.gbl...
> > I found that my standby server showed itself as a remote server. I
> created
> > linked servers between standby and production; I executed sp_dropserver
> > '(production server name)' and then sp_addserver (standby server name).
> Seems you forgot to specify the ,local option to sp_addserver.
> --
> Tibor Karaszi, SQL Server MVP
> Archive at:
>
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
>
> "Deborah Bohannon" <dbohannon@.nationalDONOTSENDHEREcareanetwork.com> wrote
> in message news:eb2bk2FsDHA.1884@.TK2MSFTNGP10.phx.gbl...
> > I have restored my production server master database to the standby
> server.
> > I then ran a series of scripts I found at KB246133:
> > http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q246133#4
> >
> > I found that my standby server showed itself as a remote server. I
> created
> > linked servers between standby and production; I executed sp_dropserver
> > '(production server name)' and then sp_addserver (standby server name).
> > SP_dropserver resulted in a message that said that logins existed for
this
> > server. When I look in the sysservers table on the standby server I
have
> > two entries: one for the production server and one for the standby
> server.
> >
> > I've also created a backup device on both the production and standby
> server
> > which are the same. The backup file from production is copied to
standby
> so
> > that the restore can be done on the standby server.
> >
> > My scripts to copy the backup file and restore the database work fine
from
> > QA on the standby server. However, when I try to execute them as part
of
> a
> > job, I get failures. The step which copies the database over says:
> >
> > Could not relay results of procedure 'CopyDatabase_DukeAccount' from
> remote
> > server 'NCNSV1010'. [SQLSTATE 42000] (Error 7221) [SQLSTATE 01000]
> (Error
> > 7312). The step failed.
> >
> > I am confused why SQL thinks that NCNSV1010 is the remote server since
it
> is
> > actually the local server that this job is executing on. Additionally,
> the
> > backup file IS actually copied over successfully.
> >
> > The step which restores the database to the standby server, which is the
> > local server, from the backup device says:
> >
> > RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000] (Error
3013)
> > Cannot open backup device
> > 'd:\mssql\backup\dukeaccount\DukeAccount_Full.bak'. Device error or
device
> > off-line. See the SQL Server error log for more details. [SQLSTATE
42000]
> > (Error 3201). The step failed.
> >
> > However, when I open the backup device to view contents, the just copied
> > backup file is visible in it.
> >
> > Both servers are running W2K SP4, SQL2K SP2 (with security patch)
Standard
> > Edition.
> >
> > Does anyone have any idea what is wrong here? Do I need to drop the
> logins
> > for the (production server name) that exist on the standby server? If I
> do
> > that, will I then have to run the process again to transfer the logins?
I
> > can't seem to drop the production server from the sysservers table if
they
> > have logins. I could manually drop it from the table, but I don't know
> what
> > repurcussions that may have.
> >
> > I need to figure this out because I must automate this process to run
> daily,
> > then the T-Logs many times a day, and I'll be doing this for quite a few
> > databases on these machines.
> >
> > Thanks in advance.
> > Deborah
> >
> >
> >
>

Friday, February 17, 2012

Database will not restore from backup

have a production database running on SQL 2000 Enterprise with service pack
3, that until monday had a DTS package copying to another SQL Server for
development work. On monday a developer ran the package manually and it
failed with the error message "bulk copy transaction failed" error code
80045707. Since then it will not copy the database to the other SQL instance.
Tried to restore the databse on the same SQL instance to another database
name but the restore hangs with the message "loading".
I cannot put the database in into restricted access with SQL Enterprise
Management.
I have run DBCC DBCHECK and get no error reported.
Any suggestions?
Regards
Drew
I can do a restore of the database but still cannot run the DTS package to
copy the database even on the same server.
"drew" wrote:

> have a production database running on SQL 2000 Enterprise with service pack
> 3, that until monday had a DTS package copying to another SQL Server for
> development work. On monday a developer ran the package manually and it
> failed with the error message "bulk copy transaction failed" error code
> 80045707. Since then it will not copy the database to the other SQL instance.
> Tried to restore the databse on the same SQL instance to another database
> name but the restore hangs with the message "loading".
> I cannot put the database in into restricted access with SQL Enterprise
> Management.
> I have run DBCC DBCHECK and get no error reported.
>
> Any suggestions?
>
> Regards
> Drew
|||Hi,
Can you execute the Restore database using Query analyzer .
1. Using Restore filelistonly command identify the logical file names of the
database backup file
RESTORE FILELISTONLY from disk='c:\backup\dbname.bak'
2. With the output of the above query use RESTORE database
RESTORE DATABASE <newdbname> from disk='c:\backup\dbname.bak'
WITH move 'logical_mdf_filename' to 'new physical name with path',
move 'logical_ldf_filename' to 'new physical log name withpa
th',stats=10
Stats=10 will show the progress of restore.
Thanks
Hari
MCDBA
"drew" <drew@.discussions.microsoft.com> wrote in message
news:78023771-E516-4373-A1D3-BC922A4397D4@.microsoft.com...
> have a production database running on SQL 2000 Enterprise with service
> pack
> 3, that until monday had a DTS package copying to another SQL Server for
> development work. On monday a developer ran the package manually and it
> failed with the error message "bulk copy transaction failed" error code>
> 80045707. Since then it will not copy the database to the other SQL
> instance.
> Tried to restore the databse on the same SQL instance to another database
> name but the restore hangs with the message "loading".
> I cannot put the database in into restricted access with SQL Enterprise
> Management.
> I have run DBCC DBCHECK and get no error reported.
>
> Any suggestions?
>
> Regards
> Drew
|||I have managed to get the backup working. I am now trying to figure out why
the DTS package is failing. The paackage stops at the same table each time so
I will try and copy the database between servers less that table to see if
that clears the problem.
Thanks Drew
"Hari Prasad" wrote:

> Hi,
> Can you execute the Restore database using Query analyzer .
> 1. Using Restore filelistonly command identify the logical file names of the
> database backup file
> RESTORE FILELISTONLY from disk='c:\backup\dbname.bak'
> 2. With the output of the above query use RESTORE database
> RESTORE DATABASE <newdbname> from disk='c:\backup\dbname.bak'
> WITH move 'logical_mdf_filename' to 'new physical name with path',
> move 'logical_ldf_filename' to 'new physical log name withpa
> th',stats=10
> Stats=10 will show the progress of restore.
> Thanks
> Hari
> MCDBA
>
> "drew" <drew@.discussions.microsoft.com> wrote in message
> news:78023771-E516-4373-A1D3-BC922A4397D4@.microsoft.com...
>
>

Database will not restore from backup

have a production database running on SQL 2000 Enterprise with service pack
3, that until monday had a DTS package copying to another SQL Server for
development work. On monday a developer ran the package manually and it
failed with the error message "bulk copy transaction failed" error code
80045707. Since then it will not copy the database to the other SQL instance.
Tried to restore the databse on the same SQL instance to another database
name but the restore hangs with the message "loading".
I cannot put the database in into restricted access with SQL Enterprise
Management.
I have run DBCC DBCHECK and get no error reported.
Any suggestions?
Regards
DrewI can do a restore of the database but still cannot run the DTS package to
copy the database even on the same server.
"drew" wrote:
> have a production database running on SQL 2000 Enterprise with service pack
> 3, that until monday had a DTS package copying to another SQL Server for
> development work. On monday a developer ran the package manually and it
> failed with the error message "bulk copy transaction failed" error code
> 80045707. Since then it will not copy the database to the other SQL instance.
> Tried to restore the databse on the same SQL instance to another database
> name but the restore hangs with the message "loading".
> I cannot put the database in into restricted access with SQL Enterprise
> Management.
> I have run DBCC DBCHECK and get no error reported.
>
> Any suggestions?
>
> Regards
> Drew|||Hi,
Can you execute the Restore database using Query analyzer .
1. Using Restore filelistonly command identify the logical file names of the
database backup file
RESTORE FILELISTONLY from disk='c:\backup\dbname.bak'
2. With the output of the above query use RESTORE database
RESTORE DATABASE <newdbname> from disk='c:\backup\dbname.bak'
WITH move 'logical_mdf_filename' to 'new physical name with path',
move 'logical_ldf_filename' to 'new physical log name withpa
th',stats=10
Stats=10 will show the progress of restore.
Thanks
Hari
MCDBA
"drew" <drew@.discussions.microsoft.com> wrote in message
news:78023771-E516-4373-A1D3-BC922A4397D4@.microsoft.com...
> have a production database running on SQL 2000 Enterprise with service
> pack
> 3, that until monday had a DTS package copying to another SQL Server for
> development work. On monday a developer ran the package manually and it
> failed with the error message "bulk copy transaction failed" error code>
> 80045707. Since then it will not copy the database to the other SQL
> instance.
> Tried to restore the databse on the same SQL instance to another database
> name but the restore hangs with the message "loading".
> I cannot put the database in into restricted access with SQL Enterprise
> Management.
> I have run DBCC DBCHECK and get no error reported.
>
> Any suggestions?
>
> Regards
> Drew|||I have managed to get the backup working. I am now trying to figure out why
the DTS package is failing. The paackage stops at the same table each time so
I will try and copy the database between servers less that table to see if
that clears the problem.
Thanks Drew
"Hari Prasad" wrote:
> Hi,
> Can you execute the Restore database using Query analyzer .
> 1. Using Restore filelistonly command identify the logical file names of the
> database backup file
> RESTORE FILELISTONLY from disk='c:\backup\dbname.bak'
> 2. With the output of the above query use RESTORE database
> RESTORE DATABASE <newdbname> from disk='c:\backup\dbname.bak'
> WITH move 'logical_mdf_filename' to 'new physical name with path',
> move 'logical_ldf_filename' to 'new physical log name withpa
> th',stats=10
> Stats=10 will show the progress of restore.
> Thanks
> Hari
> MCDBA
>
> "drew" <drew@.discussions.microsoft.com> wrote in message
> news:78023771-E516-4373-A1D3-BC922A4397D4@.microsoft.com...
> > have a production database running on SQL 2000 Enterprise with service
> > pack
> > 3, that until monday had a DTS package copying to another SQL Server for
> > development work. On monday a developer ran the package manually and it
> > failed with the error message "bulk copy transaction failed" error code>
> > 80045707. Since then it will not copy the database to the other SQL
> > instance.
> >
> > Tried to restore the databse on the same SQL instance to another database
> > name but the restore hangs with the message "loading".
> >
> > I cannot put the database in into restricted access with SQL Enterprise
> > Management.
> >
> > I have run DBCC DBCHECK and get no error reported.
> >
> >
> >
> > Any suggestions?
> >
> >
> > Regards
> >
> > Drew
>
>

Database Versioning?

Hi,

Could someone point me in the right direction? I have an internal development database and a production database. Is there an easy way to replicate the changes that have been made to the development version on the production server without modifying the actual data in the tables? So, if I add a new user in my development version I offcourse don't want to see it pop up in the live version. But adding/deleting/updating a new table or column should.

And if possible I'd also like to know how you could do the following: Let's say we have an OrderDetail table containing information about the purchased product. Let's say I'd like to add a new column 'total' to skip calculation on the database every time I want to know the totals. It should be able to initialise the value by doing 'times ordered * price' for every existing row. Is that possible as well?

Srry for the noob questions Smile

edit: Using MSSQL 2005

There are tools like Red-Gate Compare and Visual Studio for Database Professionals that might be helpful for this situation.

Check out "Computed Columns" in the Books Online.

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||http://www.red-gate.com/

And ApexSQL has a tool for this too, I believe.
http://www.apexsql.com/sql_tools_script.asp

HTH...

Joe|||

Also, check out Visual Studio 2005 Team Edition for Database Professionals.

http://msdn2.microsoft.com/en-us/teamsystem/aa718807.aspx

Database Versioning?

Hi,

Could someone point me in the right direction? I have an internal development database and a production database. Is there an easy way to replicate the changes that have been made to the development version on the production server without modifying the actual data in the tables? So, if I add a new user in my development version I offcourse don't want to see it pop up in the live version. But adding/deleting/updating a new table or column should.

And if possible I'd also like to know how you could do the following: Let's say we have an OrderDetail table containing information about the purchased product. Let's say I'd like to add a new column 'total' to skip calculation on the database every time I want to know the totals. It should be able to initialise the value by doing 'times ordered * price' for every existing row. Is that possible as well?

Srry for the noob questions Smile

edit: Using MSSQL 2005

There are tools like Red-Gate Compare and Visual Studio for Database Professionals that might be helpful for this situation.

Check out "Computed Columns" in the Books Online.

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||http://www.red-gate.com/

And ApexSQL has a tool for this too, I believe.
http://www.apexsql.com/sql_tools_script.asp

HTH...

Joe|||

Also, check out Visual Studio 2005 Team Edition for Database Professionals.

http://msdn2.microsoft.com/en-us/teamsystem/aa718807.aspx

Database Users Appear to be Corrupt

We had a hardware error on our production machine and had to replace it with
our backup machine. Both machines are running SQL Server 2000 on Windows
2000. I used the SQL Server database backup file from production to restore
the backup server.
I know about the sid's being out of sync between the logins and the database
users. I used our standard procedures to re-align them but must have done
something wrong. Now when I run sp_change_users_login 'Report', the list is
empty. I can see the users listed under the database using the enterprise
manager and the users can access the database but I fear that some table
somewhere pertaining to users is corrupted.You should be ok. The Report option of
sp_change_users_login only lists logins that are out of
sync. If you don't get any back from
sp_change_users_login 'Report', then they should all be in
sync.
This is taken directly from BOL pertaining to the Report
option:
"Lists the users, and their corresponding security
identifiers (SID), that are in the current database, not
linked to any login."
>--Original Message--
>We had a hardware error on our production machine and had
to replace it with
>our backup machine. Both machines are running SQL Server
2000 on Windows
>2000. I used the SQL Server database backup file from
production to restore
>the backup server.
>I know about the sid's being out of sync between the
logins and the database
>users. I used our standard procedures to re-align them
but must have done
>something wrong. Now when I run
sp_change_users_login 'Report', the list is
>empty. I can see the users listed under the database
using the enterprise
>manager and the users can access the database but I fear
that some table
>somewhere pertaining to users is corrupted.
>
>.
>|||Hi Robert,
Thank you for using MSDN Newsgroup! It's my pleasure to assist you with your issue.
As Van has pointed out, no report from sp_change_ueses_login means no sync problem of
the corresponding SID and everything seems fine on your side.
It is also recommended you try Database Consistency Checker (DBCC) statements after you
backup and restore your database.
You can use DBCC CHECKDB to check the allocation and structural integrity of the whole
database, or use DBCC CHECKALLOC / DBCC CHECKTABLE to check the individual objects
(including some suspicious tables).
For more information, please refer to Books Online on the topic "DBCC CHECKDB" and
"DBCC CHECKTABLE".
Robert, does this answer your question? If there is anything more we can do to assist you,
please feel free to post it in the group
Best regards,
Billy Yao
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 users after restore

We restore a production database (with around 50 users) to
a Training database on another SQL 2000 Server.
However, we find that those users on the Training Database
disappear (All has been lost except SA). However, from
one Database Role, it shows that those users (around 50)
still are members of that role.
Is it sensible for those database users disappear (As
there is no corresponding SQL Server Login created for
them) OR how can I get back those users ?
ThanksThey have a mis-match to the id for the logins in master..syslogins. Use sp_change_users_locing to
fix. There's a free GUI for that available at http://www.dbmaint.com/free_utilities.asp.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as ugroup=microsoft.public.sqlserver
"Roger Lee" <rogerlee@.nospam.com> wrote in message news:093501c36601$7bec4cb0$a301280a@.phx.gbl...
> We restore a production database (with around 50 users) to
> a Training database on another SQL 2000 Server.
> However, we find that those users on the Training Database
> disappear (All has been lost except SA). However, from
> one Database Role, it shows that those users (around 50)
> still are members of that role.
> Is it sensible for those database users disappear (As
> there is no corresponding SQL Server Login created for
> them) OR how can I get back those users ?
> Thanks|||>--Original Message--
>We restore a production database (with around 50 users)
to
>a Training database on another SQL 2000 Server.
>However, we find that those users on the Training
Database
>disappear (All has been lost except SA). However, from
>one Database Role, it shows that those users (around 50)
>still are members of that role.
>Is it sensible for those database users disappear (As
>there is no corresponding SQL Server Login created for
>them) OR how can I get back those users ?
>Thanks
>.
>You can copy across users/logins from the other DB using
DTS.