Wednesday, March 28, 2012
How do auto rename datafiles on a multiple restore?
i have a SQL 2005 question.
I create multiple databases from a specific backup file.
I want the database to rename the data & log files automatically if
they already exist (due to the prior creation). I know it is possible,
I do not know how to configure it.
YanivYaniv,shalom
Take a look at
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/15f8affd-8f39-4021-b092-
0379fc6983da.htm
"ALTER DATABASE" topic in the BOL
<yaniv.harpaz@.gmail.com> wrote in message
news:1153657523.137164.319050@.i42g2000cwa.googlegroups.com...
> Hello,
> i have a SQL 2005 question.
> I create multiple databases from a specific backup file.
> I want the database to rename the data & log files automatically if
> they already exist (due to the prior creation). I know it is possible,
> I do not know how to configure it.
> Yaniv
>|||Hi Uri, thanks for the answer.
Could you gimme a focus (which option are you referring to)?
Shouldn't that be on the instance level?
Yaniv
Uri Dimant wrote:[vbcol=seagreen]
> Yaniv,shalom
> Take a look at
> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/15f8affd-8f39-4021-b09
2-0379fc6983da.htm
> "ALTER DATABASE" topic in the BOL
>
>
> <yaniv.harpaz@.gmail.com> wrote in message
> news:1153657523.137164.319050@.i42g2000cwa.googlegroups.com...|||<yaniv.harpaz@.gmail.com> wrote in message
news:1153657523.137164.319050@.i42g2000cwa.googlegroups.com...
> Hello,
> i have a SQL 2005 question.
> I create multiple databases from a specific backup file.
> I want the database to rename the data & log files automatically if
> they already exist (due to the prior creation). I know it is possible,
> I do not know how to configure it.
>
Check out RESTORE DATABASE ... WITH MOVE in BOL
David|||That's what I am using currently.
I want to be able automatically restore any file I get,
without manually rename each logical file into a new physical one.
David Browne wrote:
> <yaniv.harpaz@.gmail.com> wrote in message
> news:1153657523.137164.319050@.i42g2000cwa.googlegroups.com...
>
> Check out RESTORE DATABASE ... WITH MOVE in BOL
>
> David|||<yaniv.harpaz@.gmail.com> wrote in message
news:1153673350.370810.24470@.s13g2000cwa.googlegroups.com...
> That's what I am using currently.
> I want to be able automatically restore any file I get,
> without manually rename each logical file into a new physical one.
Not clear then exactly what you're missing then.
Build the string for the file name and use dynamic SQL to execute it.
> David Browne wrote:
>|||I wanted to know if I can manage without it.
Restore and let the server generate the data & log files automatically
on the default locations.
Greg D. Moore (Strider) wrote:[vbcol=seagreen]
> <yaniv.harpaz@.gmail.com> wrote in message
> news:1153673350.370810.24470@.s13g2000cwa.googlegroups.com...
> Not clear then exactly what you're missing then.
> Build the string for the file name and use dynamic SQL to execute it.
>|||<yaniv.harpaz@.gmail.com> wrote in message
news:1153739359.238308.167670@.m73g2000cwd.googlegroups.com...
> I wanted to know if I can manage without it.
> Restore and let the server generate the data & log files automatically
> on the default locations.
No. The restore process restores the database to the location indicated
within the backup.
The only way I'm aware of changing this is the WITH MOVE option.
> Greg D. Moore (Strider) wrote:
if[vbcol=seagreen]
possible,[vbcol=seagreen]
>|||I am trying this on one of my servers and it is working and on the
other it doesn't. how come?
I am using the same backup file.
create database "George_1Month001"
go
restore database "George_1Month001" from
disk='c:\MSSQL\BackupFiles\Ver141-Sample' with replace
go
-- Restore into a new database
create database "George_1Month002"
go
restore database "George_1Month002" from
disk='c:\MSSQL\BackupFiles\Ver141-Sample' with replace
go
-- Restore into a new database
create database "George_1Month003"
go
restore database "George_1Month003" from
disk='c:\MSSQL\BackupFiles\Ver141-Sample' with replace
go
Greg D. Moore (Strider) wrote:[vbcol=seagreen]
> <yaniv.harpaz@.gmail.com> wrote in message
> news:1153739359.238308.167670@.m73g2000cwd.googlegroups.com...
> No. The restore process restores the database to the location indicated
> within the backup.
> The only way I'm aware of changing this is the WITH MOVE option.
>
> if
> possible,|||yaniv.harpaz@.gmail.com wrote:
> I am trying this on one of my servers and it is working and on the
> other it doesn't. how come?
> I am using the same backup file.
> create database "George_1Month001"
> go
> restore database "George_1Month001" from
> disk='c:\MSSQL\BackupFiles\Ver141-Sample' with replace
> go
> -- Restore into a new database
> create database "George_1Month002"
> go
> restore database "George_1Month002" from
> disk='c:\MSSQL\BackupFiles\Ver141-Sample' with replace
> go
> -- Restore into a new database
> create database "George_1Month003"
> go
> restore database "George_1Month003" from
> disk='c:\MSSQL\BackupFiles\Ver141-Sample' with replace
> go
>
>
Could you post the error message(s) you get ?
Regards
Steen Schlter Persson
Databaseadministrator / Systemadministrator
How do auto rename datafiles on a multiple restore?
i have a SQL 2005 question.
I create multiple databases from a specific backup file.
I want the database to rename the data & log files automatically if
they already exist (due to the prior creation). I know it is possible,
I do not know how to configure it.
YanivYaniv,shalom
Take a look at
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/15f8affd-8f39-4021-b092-0379fc6983da.htm
"ALTER DATABASE" topic in the BOL
<yaniv.harpaz@.gmail.com> wrote in message
news:1153657523.137164.319050@.i42g2000cwa.googlegroups.com...
> Hello,
> i have a SQL 2005 question.
> I create multiple databases from a specific backup file.
> I want the database to rename the data & log files automatically if
> they already exist (due to the prior creation). I know it is possible,
> I do not know how to configure it.
> Yaniv
>|||Hi Uri, thanks for the answer.
Could you gimme a focus (which option are you referring to)?
Shouldn't that be on the instance level?
Yaniv
Uri Dimant wrote:
> Yaniv,shalom
> Take a look at
> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/15f8affd-8f39-4021-b092-0379fc6983da.htm
> "ALTER DATABASE" topic in the BOL
>
>
> <yaniv.harpaz@.gmail.com> wrote in message
> news:1153657523.137164.319050@.i42g2000cwa.googlegroups.com...
> > Hello,
> > i have a SQL 2005 question.
> > I create multiple databases from a specific backup file.
> >
> > I want the database to rename the data & log files automatically if
> > they already exist (due to the prior creation). I know it is possible,
> > I do not know how to configure it.
> >
> > Yaniv
> >|||<yaniv.harpaz@.gmail.com> wrote in message
news:1153657523.137164.319050@.i42g2000cwa.googlegroups.com...
> Hello,
> i have a SQL 2005 question.
> I create multiple databases from a specific backup file.
> I want the database to rename the data & log files automatically if
> they already exist (due to the prior creation). I know it is possible,
> I do not know how to configure it.
>
Check out RESTORE DATABASE ... WITH MOVE in BOL
David|||That's what I am using currently.
I want to be able automatically restore any file I get,
without manually rename each logical file into a new physical one.
David Browne wrote:
> <yaniv.harpaz@.gmail.com> wrote in message
> news:1153657523.137164.319050@.i42g2000cwa.googlegroups.com...
> > Hello,
> > i have a SQL 2005 question.
> > I create multiple databases from a specific backup file.
> >
> > I want the database to rename the data & log files automatically if
> > they already exist (due to the prior creation). I know it is possible,
> > I do not know how to configure it.
> >
>
> Check out RESTORE DATABASE ... WITH MOVE in BOL
>
> David|||<yaniv.harpaz@.gmail.com> wrote in message
news:1153673350.370810.24470@.s13g2000cwa.googlegroups.com...
> That's what I am using currently.
> I want to be able automatically restore any file I get,
> without manually rename each logical file into a new physical one.
Not clear then exactly what you're missing then.
Build the string for the file name and use dynamic SQL to execute it.
> David Browne wrote:
> > <yaniv.harpaz@.gmail.com> wrote in message
> > news:1153657523.137164.319050@.i42g2000cwa.googlegroups.com...
> > > Hello,
> > > i have a SQL 2005 question.
> > > I create multiple databases from a specific backup file.
> > >
> > > I want the database to rename the data & log files automatically if
> > > they already exist (due to the prior creation). I know it is possible,
> > > I do not know how to configure it.
> > >
> >
> >
> > Check out RESTORE DATABASE ... WITH MOVE in BOL
> >
> >
> > David
>|||I wanted to know if I can manage without it.
Restore and let the server generate the data & log files automatically
on the default locations.
Greg D. Moore (Strider) wrote:
> <yaniv.harpaz@.gmail.com> wrote in message
> news:1153673350.370810.24470@.s13g2000cwa.googlegroups.com...
> > That's what I am using currently.
> > I want to be able automatically restore any file I get,
> > without manually rename each logical file into a new physical one.
> Not clear then exactly what you're missing then.
> Build the string for the file name and use dynamic SQL to execute it.
>
> >
> > David Browne wrote:
> > > <yaniv.harpaz@.gmail.com> wrote in message
> > > news:1153657523.137164.319050@.i42g2000cwa.googlegroups.com...
> > > > Hello,
> > > > i have a SQL 2005 question.
> > > > I create multiple databases from a specific backup file.
> > > >
> > > > I want the database to rename the data & log files automatically if
> > > > they already exist (due to the prior creation). I know it is possible,
> > > > I do not know how to configure it.
> > > >
> > >
> > >
> > > Check out RESTORE DATABASE ... WITH MOVE in BOL
> > >
> > >
> > > David
> >|||<yaniv.harpaz@.gmail.com> wrote in message
news:1153739359.238308.167670@.m73g2000cwd.googlegroups.com...
> I wanted to know if I can manage without it.
> Restore and let the server generate the data & log files automatically
> on the default locations.
No. The restore process restores the database to the location indicated
within the backup.
The only way I'm aware of changing this is the WITH MOVE option.
> Greg D. Moore (Strider) wrote:
> > <yaniv.harpaz@.gmail.com> wrote in message
> > news:1153673350.370810.24470@.s13g2000cwa.googlegroups.com...
> > > That's what I am using currently.
> > > I want to be able automatically restore any file I get,
> > > without manually rename each logical file into a new physical one.
> >
> > Not clear then exactly what you're missing then.
> >
> > Build the string for the file name and use dynamic SQL to execute it.
> >
> >
> > >
> > > David Browne wrote:
> > > > <yaniv.harpaz@.gmail.com> wrote in message
> > > > news:1153657523.137164.319050@.i42g2000cwa.googlegroups.com...
> > > > > Hello,
> > > > > i have a SQL 2005 question.
> > > > > I create multiple databases from a specific backup file.
> > > > >
> > > > > I want the database to rename the data & log files automatically
if
> > > > > they already exist (due to the prior creation). I know it is
possible,
> > > > > I do not know how to configure it.
> > > > >
> > > >
> > > >
> > > > Check out RESTORE DATABASE ... WITH MOVE in BOL
> > > >
> > > >
> > > > David
> > >
>|||I am trying this on one of my servers and it is working and on the
other it doesn't. how come?
I am using the same backup file.
create database "George_1Month001"
go
restore database "George_1Month001" from
disk='c:\MSSQL\BackupFiles\Ver141-Sample' with replace
go
-- Restore into a new database
create database "George_1Month002"
go
restore database "George_1Month002" from
disk='c:\MSSQL\BackupFiles\Ver141-Sample' with replace
go
-- Restore into a new database
create database "George_1Month003"
go
restore database "George_1Month003" from
disk='c:\MSSQL\BackupFiles\Ver141-Sample' with replace
go
Greg D. Moore (Strider) wrote:
> <yaniv.harpaz@.gmail.com> wrote in message
> news:1153739359.238308.167670@.m73g2000cwd.googlegroups.com...
> > I wanted to know if I can manage without it.
> > Restore and let the server generate the data & log files automatically
> > on the default locations.
> No. The restore process restores the database to the location indicated
> within the backup.
> The only way I'm aware of changing this is the WITH MOVE option.
>
> >
> > Greg D. Moore (Strider) wrote:
> > > <yaniv.harpaz@.gmail.com> wrote in message
> > > news:1153673350.370810.24470@.s13g2000cwa.googlegroups.com...
> > > > That's what I am using currently.
> > > > I want to be able automatically restore any file I get,
> > > > without manually rename each logical file into a new physical one.
> > >
> > > Not clear then exactly what you're missing then.
> > >
> > > Build the string for the file name and use dynamic SQL to execute it.
> > >
> > >
> > > >
> > > > David Browne wrote:
> > > > > <yaniv.harpaz@.gmail.com> wrote in message
> > > > > news:1153657523.137164.319050@.i42g2000cwa.googlegroups.com...
> > > > > > Hello,
> > > > > > i have a SQL 2005 question.
> > > > > > I create multiple databases from a specific backup file.
> > > > > >
> > > > > > I want the database to rename the data & log files automatically
> if
> > > > > > they already exist (due to the prior creation). I know it is
> possible,
> > > > > > I do not know how to configure it.
> > > > > >
> > > > >
> > > > >
> > > > > Check out RESTORE DATABASE ... WITH MOVE in BOL
> > > > >
> > > > >
> > > > > David
> > > >
> >|||yaniv.harpaz@.gmail.com wrote:
> I am trying this on one of my servers and it is working and on the
> other it doesn't. how come?
> I am using the same backup file.
> create database "George_1Month001"
> go
> restore database "George_1Month001" from
> disk='c:\MSSQL\BackupFiles\Ver141-Sample' with replace
> go
> -- Restore into a new database
> create database "George_1Month002"
> go
> restore database "George_1Month002" from
> disk='c:\MSSQL\BackupFiles\Ver141-Sample' with replace
> go
> -- Restore into a new database
> create database "George_1Month003"
> go
> restore database "George_1Month003" from
> disk='c:\MSSQL\BackupFiles\Ver141-Sample' with replace
> go
>
>
Could you post the error message(s) you get ?
Regards
Steen Schlüter Persson
Databaseadministrator / Systemadministrator|||for Example -
Msg 1834, Level 16, State 1, Line 1
The file 'c:\MSSQL\data\CleanDB_1001371.mdf' cannot be overwritten. It
is being used by database 'Cyprus_1Month002'.
Msg 3156, Level 16, State 4, Line 1
File 'CleanDB_1001371' cannot be restored to
'c:\MSSQL\data\CleanDB_1001371.mdf'. Use WITH MOVE to identify a valid
location for the file.
Msg 1834, Level 16, State 1, Line 1
The file 'c:\MSSQL\data\CleanDB_1001371_log.LDF' cannot be overwritten.
It is being used by database 'Cyprus_1Month002'.
Msg 3156, Level 16, State 4, Line 1
File 'CleanDB_1001371_log' cannot be restored to
'c:\MSSQL\data\CleanDB_1001371_log.LDF'. Use WITH MOVE to identify a
valid location for the file.
Msg 3119, Level 16, State 1, Line 1
Problems were identified while planning for the RESTORE statement.
Previous messages provide details.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
Steen Persson (DK) wrote:
> yaniv.harpaz@.gmail.com wrote:
> > I am trying this on one of my servers and it is working and on the
> > other it doesn't. how come?
> > I am using the same backup file.
> >
> > create database "George_1Month001"
> > go
> >
> > restore database "George_1Month001" from
> > disk=3D'c:\MSSQL\BackupFiles\Ver141-Sample' with replace
> > go
> >
> > -- Restore into a new database
> > create database "George_1Month002"
> > go
> >
> > restore database "George_1Month002" from
> > disk=3D'c:\MSSQL\BackupFiles\Ver141-Sample' with replace
> > go
> >
> > -- Restore into a new database
> > create database "George_1Month003"
> > go
> >
> > restore database "George_1Month003" from
> > disk=3D'c:\MSSQL\BackupFiles\Ver141-Sample' with replace
> > go
> >
> >
> >
> Could you post the error message(s) you get ?
>
> --
> Regards
> Steen Schl=FCter Persson
> Databaseadministrator / Systemadministrator|||yaniv.harpaz@.gmail.com wrote:
> for Example -
> Msg 1834, Level 16, State 1, Line 1
> The file 'c:\MSSQL\data\CleanDB_1001371.mdf' cannot be overwritten. It
> is being used by database 'Cyprus_1Month002'.
> Msg 3156, Level 16, State 4, Line 1
> File 'CleanDB_1001371' cannot be restored to
> 'c:\MSSQL\data\CleanDB_1001371.mdf'. Use WITH MOVE to identify a valid
> location for the file.
> Msg 1834, Level 16, State 1, Line 1
> The file 'c:\MSSQL\data\CleanDB_1001371_log.LDF' cannot be overwritten.
> It is being used by database 'Cyprus_1Month002'.
> Msg 3156, Level 16, State 4, Line 1
> File 'CleanDB_1001371_log' cannot be restored to
> 'c:\MSSQL\data\CleanDB_1001371_log.LDF'. Use WITH MOVE to identify a
> valid location for the file.
> Msg 3119, Level 16, State 1, Line 1
> Problems were identified while planning for the RESTORE statement.
> Previous messages provide details.
> Msg 3013, Level 16, State 1, Line 1
> RESTORE DATABASE is terminating abnormally.
>
But then you have the solution in the error message - use the MOVE
option. SQL server tries to restore to the original files but those
files are in use by another database.
Look up RESTORE command in Books On Line - that will give you all the
options and syntax you need.
Regards
Steen Schlüter Persson
Databaseadministrator / Systemadministrator|||have a look at one of the prior posts I wrote.
I want it to take place automatically, without manually telling the SQL
Server which physical path the data files should have.
there is one server in which I can do it, but I do not know what is the
difference in the configuration. this one works:
create database "George_1Month001"
go
restore database "George_1Month001" from
disk=3D'c:\MSSQL\BackupFiles\Ver141-Sample' with replace
go
-- Restore into a new database
create database "George_1Month002"
go
restore database "George_1Month002" from
disk=3D'c:\MSSQL\BackupFiles\Ver141-Sample' with replace
go
Steen Persson (DK) wrote:
> yaniv.harpaz@.gmail.com wrote:
> > for Example -
> > Msg 1834, Level 16, State 1, Line 1
> > The file 'c:\MSSQL\data\CleanDB_1001371.mdf' cannot be overwritten. It
> > is being used by database 'Cyprus_1Month002'.
> > Msg 3156, Level 16, State 4, Line 1
> > File 'CleanDB_1001371' cannot be restored to
> > 'c:\MSSQL\data\CleanDB_1001371.mdf'. Use WITH MOVE to identify a valid
> > location for the file.
> > Msg 1834, Level 16, State 1, Line 1
> > The file 'c:\MSSQL\data\CleanDB_1001371_log.LDF' cannot be overwritten.
> > It is being used by database 'Cyprus_1Month002'.
> > Msg 3156, Level 16, State 4, Line 1
> > File 'CleanDB_1001371_log' cannot be restored to
> > 'c:\MSSQL\data\CleanDB_1001371_log.LDF'. Use WITH MOVE to identify a
> > valid location for the file.
> > Msg 3119, Level 16, State 1, Line 1
> > Problems were identified while planning for the RESTORE statement.
> > Previous messages provide details.
> > Msg 3013, Level 16, State 1, Line 1
> > RESTORE DATABASE is terminating abnormally.
> >
> >
> But then you have the solution in the error message - use the MOVE
> option. SQL server tries to restore to the original files but those
> files are in use by another database.
> Look up RESTORE command in Books On Line - that will give you all the
> options and syntax you need.
>
> --
> Regards
> Steen Schl=FCter Persson
> Databaseadministrator / Systemadministrator|||yaniv.harpaz@.gmail.com wrote:
> have a look at one of the prior posts I wrote.
> I want it to take place automatically, without manually telling the SQL
> Server which physical path the data files should have.
> there is one server in which I can do it, but I do not know what is the
> difference in the configuration. this one works:
> create database "George_1Month001"
> go
> restore database "George_1Month001" from
> disk='c:\MSSQL\BackupFiles\Ver141-Sample' with replace
> go
> -- Restore into a new database
> create database "George_1Month002"
> go
> restore database "George_1Month002" from
> disk='c:\MSSQL\BackupFiles\Ver141-Sample' with replace
> go
>
There must be a difference in these 2 servers. The errormessage you
posted, says that the mdf file can't be overwritten because it's used by
another database. Try to check if any other database on that server, is
using that mdf file. What about the disk an directory layout - is that
the same on both servers?
Regards
Steen Schlüter Persson
Databaseadministrator / Systemadministrator
Monday, March 12, 2012
How can we limit the data regions in a specific report page?
Hi, all experts here,
Thank you very much for your kind attention.
I wanna know how can we limit the data regions in a specific report page. How can we achieve this? Really need help.
Thanks a lot in advance for any guidance and advices for that.
With best regards,
Yours sincerely,
Hiya,
Would please any expert here give me any guidance and advices for that?
Thanks a lot.
With best regards,
Yours sincerely,
Friday, March 9, 2012
How can one edit the sysusers table under SQL 2005?
have it under sysusers table. When we do a restore or a copy,
we used to go into that table rename the user and go into SQL security
and create that user and assign the DB, we no longer can do that.
How can one edit the sysusers table under SQL 2005?
Please help...
Hi
It is strongly recommended to not alter system tables directly
How about CREATE USER command?
Also search om internet for two stored procedures('sp_help_revlogin') that
provided by MS transfer the USERS wi6th their oridinal SID
"API Conektia" <api@.online.nospam> wrote in message
news:zezu4tlp82yz.1l9ba905uokev.dlg@.40tude.net...
> ur database needs to run under a specific user, so we
> have it under sysusers table. When we do a restore or a copy,
> we used to go into that table rename the user and go into SQL security
> and create that user and assign the DB, we no longer can do that.
> How can one edit the sysusers table under SQL 2005?
> Please help...
|||You can no longer view the systables in SQL2005 they are hidden now. Look for
compatibility Views in BOL
Regards
"API Conektia" wrote:
> ur database needs to run under a specific user, so we
> have it under sysusers table. When we do a restore or a copy,
> we used to go into that table rename the user and go into SQL security
> and create that user and assign the DB, we no longer can do that.
> How can one edit the sysusers table under SQL 2005?
> Please help...
>
|||BOL? I can see the table by doing a select * from sysusers, but not thru
the GUI.
I fixed my issue doing:
USE BD;
GO
EXEC sp_change_users_login 'Auto_Fix', 'myuser', NULL, 'myuser';
GO
thanks for all replies
On Wed, 22 Feb 2006 04:51:26 -0800, Zekske wrote:
[vbcol=seagreen]
> You can no longer view the systables in SQL2005 they are hidden now. Look for
> compatibility Views in BOL
> Regards
> "API Conektia" wrote:
|||BOL is Books Online - the SQL Server help file.
Sysusers is not a table in 2005 - it's a view provided for
backwards compatibility. It's listed under the system views
in the GUI. You have to use the built in procedures,
functions or other supported methods to modify system data
in 2005 - no more hacking system tables.
-Sue
On Wed, 22 Feb 2006 15:08:14 +0100, API Conektia
<api@.online.nospam> wrote:
[vbcol=seagreen]
>BOL? I can see the table by doing a select * from sysusers, but not thru
>the GUI.
>I fixed my issue doing:
>USE BD;
>GO
>EXEC sp_change_users_login 'Auto_Fix', 'myuser', NULL, 'myuser';
>GO
>thanks for all replies
>
>On Wed, 22 Feb 2006 04:51:26 -0800, Zekske wrote:
How can one edit the sysusers table under SQL 2005?
have it under sysusers table. When we do a restore or a copy,
we used to go into that table rename the user and go into SQL security
and create that user and assign the DB, we no longer can do that.
How can one edit the sysusers table under SQL 2005?
Please help...Hi
It is strongly recommended to not alter system tables directly
How about CREATE USER command?
Also search om internet for two stored procedures('sp_help_revlogin') that
provided by MS transfer the USERS wi6th their oridinal SID
"API Conektia" <api@.online.nospam> wrote in message
news:zezu4tlp82yz.1l9ba905uokev.dlg@.40tude.net...
> ur database needs to run under a specific user, so we
> have it under sysusers table. When we do a restore or a copy,
> we used to go into that table rename the user and go into SQL security
> and create that user and assign the DB, we no longer can do that.
> How can one edit the sysusers table under SQL 2005?
> Please help...|||You can no longer view the systables in SQL2005 they are hidden now. Look for
compatibility Views in BOL
Regards
"API Conektia" wrote:
> ur database needs to run under a specific user, so we
> have it under sysusers table. When we do a restore or a copy,
> we used to go into that table rename the user and go into SQL security
> and create that user and assign the DB, we no longer can do that.
> How can one edit the sysusers table under SQL 2005?
> Please help...
>|||BOL? I can see the table by doing a select * from sysusers, but not thru
the GUI.
I fixed my issue doing:
USE BD;
GO
EXEC sp_change_users_login 'Auto_Fix', 'myuser', NULL, 'myuser';
GO
thanks for all replies
On Wed, 22 Feb 2006 04:51:26 -0800, Zekske wrote:
> You can no longer view the systables in SQL2005 they are hidden now. Look for
> compatibility Views in BOL
> Regards
> "API Conektia" wrote:
>> ur database needs to run under a specific user, so we
>> have it under sysusers table. When we do a restore or a copy,
>> we used to go into that table rename the user and go into SQL security
>> and create that user and assign the DB, we no longer can do that.
>> How can one edit the sysusers table under SQL 2005?
>> Please help...|||BOL is Books Online - the SQL Server help file.
Sysusers is not a table in 2005 - it's a view provided for
backwards compatibility. It's listed under the system views
in the GUI. You have to use the built in procedures,
functions or other supported methods to modify system data
in 2005 - no more hacking system tables.
-Sue
On Wed, 22 Feb 2006 15:08:14 +0100, API Conektia
<api@.online.nospam> wrote:
>BOL? I can see the table by doing a select * from sysusers, but not thru
>the GUI.
>I fixed my issue doing:
>USE BD;
>GO
>EXEC sp_change_users_login 'Auto_Fix', 'myuser', NULL, 'myuser';
>GO
>thanks for all replies
>
>On Wed, 22 Feb 2006 04:51:26 -0800, Zekske wrote:
>> You can no longer view the systables in SQL2005 they are hidden now. Look for
>> compatibility Views in BOL
>> Regards
>> "API Conektia" wrote:
>> ur database needs to run under a specific user, so we
>> have it under sysusers table. When we do a restore or a copy,
>> we used to go into that table rename the user and go into SQL security
>> and create that user and assign the DB, we no longer can do that.
>> How can one edit the sysusers table under SQL 2005?
>> Please help...
How can one edit the sysusers table under SQL 2005?
have it under sysusers table. When we do a restore or a copy,
we used to go into that table rename the user and go into SQL security
and create that user and assign the DB, we no longer can do that.
How can one edit the sysusers table under SQL 2005?
Please help...Hi
It is strongly recommended to not alter system tables directly
How about CREATE USER command?
Also search om internet for two stored procedures('sp_help_revlogin') that
provided by MS transfer the USERS wi6th their oridinal SID
"API Conektia" <api@.online.nospam> wrote in message
news:zezu4tlp82yz.1l9ba905uokev.dlg@.40tude.net...
> ur database needs to run under a specific user, so we
> have it under sysusers table. When we do a restore or a copy,
> we used to go into that table rename the user and go into SQL security
> and create that user and assign the DB, we no longer can do that.
> How can one edit the sysusers table under SQL 2005?
> Please help...|||You can no longer view the systables in SQL2005 they are hidden now. Look fo
r
compatibility Views in BOL
Regards
"API Conektia" wrote:
> ur database needs to run under a specific user, so we
> have it under sysusers table. When we do a restore or a copy,
> we used to go into that table rename the user and go into SQL security
> and create that user and assign the DB, we no longer can do that.
> How can one edit the sysusers table under SQL 2005?
> Please help...
>|||BOL? I can see the table by doing a select * from sysusers, but not thru
the GUI.
I fixed my issue doing:
USE BD;
GO
EXEC sp_change_users_login 'Auto_Fix', 'myuser', NULL, 'myuser';
GO
thanks for all replies
On Wed, 22 Feb 2006 04:51:26 -0800, Zekske wrote:
[vbcol=seagreen]
> You can no longer view the systables in SQL2005 they are hidden now. Look
for
> compatibility Views in BOL
> Regards
> "API Conektia" wrote:
>|||BOL is Books Online - the SQL Server help file.
Sysusers is not a table in 2005 - it's a view provided for
backwards compatibility. It's listed under the system views
in the GUI. You have to use the built in procedures,
functions or other supported methods to modify system data
in 2005 - no more hacking system tables.
-Sue
On Wed, 22 Feb 2006 15:08:14 +0100, API Conektia
<api@.online.nospam> wrote:
[vbcol=seagreen]
>BOL? I can see the table by doing a select * from sysusers, but not thru
>the GUI.
>I fixed my issue doing:
>USE BD;
>GO
>EXEC sp_change_users_login 'Auto_Fix', 'myuser', NULL, 'myuser';
>GO
>thanks for all replies
>
>On Wed, 22 Feb 2006 04:51:26 -0800, Zekske wrote:
>
Sunday, February 19, 2012
How can I trace all Stored Procedure calls?
that would list all the SQL calls adressed towards a specific SQL Server 2005
database.
Any idea?
Thanks in advance
SH1
Have you looked at SQL Server Profiler? You could create a server-side
trace...
Aaron Bertrand
SQL Server MVP
"SH1" <SH1@.discussions.microsoft.com> wrote in message
news:354EEB97-63AA-4D08-9C7B-76DBA7AB5217@.microsoft.com...
> Hi. I was wondering if there would be any way to activate a spy or a log
> that would list all the SQL calls adressed towards a specific SQL Server
> 2005
> database.
> Any idea?
> Thanks in advance
> --
> SH1
|||Never heard about this. Looks like it would do the job. I searched how to
lauch it, but the "performance tools" menu is not available in my SQL Server
2005 menu. I guess I've got SQL Server 2005 Express edition version and that
this feature is not provided with it. I will take a look to it.
I guess I will have to alter all the stored I have into the database to add
an insert statement along with a date on a new table to trace what has been
called. Not great for stored procedures updates!
Thank you for your help Aaron
SH1
"Aaron Bertrand [SQL Server MVP]" wrote:
> Have you looked at SQL Server Profiler? You could create a server-side
> trace...
> --
> Aaron Bertrand
> SQL Server MVP
>
>
> "SH1" <SH1@.discussions.microsoft.com> wrote in message
> news:354EEB97-63AA-4D08-9C7B-76DBA7AB5217@.microsoft.com...
>
>
|||I haven't worked with Express, but perhaps it is only the Profiler tool which is missing. You might
be able to still do server-side traces. These aren't as easy to work with, but for a long running
trace, you'd want it to be a server side trace in the end anyhow. So, in the end, what you are
missing is the ability to use the Profiler tool to configure a trace, and then have that tool to
script out the procedure calls to kick off this trace as a server-side trace.
Having said above, if it is possible to log from inside the relevant procedures, I'd probably go for
that instead of a server-side trace.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"SH1" <SH1@.discussions.microsoft.com> wrote in message
news:D9D50EAF-CE3E-4D3D-8FF1-A795BFA8590B@.microsoft.com...[vbcol=seagreen]
> Never heard about this. Looks like it would do the job. I searched how to
> lauch it, but the "performance tools" menu is not available in my SQL Server
> 2005 menu. I guess I've got SQL Server 2005 Express edition version and that
> this feature is not provided with it. I will take a look to it.
> I guess I will have to alter all the stored I have into the database to add
> an insert statement along with a date on a new table to trace what has been
> called. Not great for stored procedures updates!
> Thank you for your help Aaron
> --
> SH1
>
> "Aaron Bertrand [SQL Server MVP]" wrote:
How can I trace all Stored Procedure calls?
that would list all the SQL calls adressed towards a specific SQL Server 2005
database.
Any idea?
Thanks in advance
--
SH1Have you looked at SQL Server Profiler? You could create a server-side
trace...
--
Aaron Bertrand
SQL Server MVP
"SH1" <SH1@.discussions.microsoft.com> wrote in message
news:354EEB97-63AA-4D08-9C7B-76DBA7AB5217@.microsoft.com...
> Hi. I was wondering if there would be any way to activate a spy or a log
> that would list all the SQL calls adressed towards a specific SQL Server
> 2005
> database.
> Any idea?
> Thanks in advance
> --
> SH1|||Never heard about this. Looks like it would do the job. I searched how to
lauch it, but the "performance tools" menu is not available in my SQL Server
2005 menu. I guess I've got SQL Server 2005 Express edition version and that
this feature is not provided with it. I will take a look to it.
I guess I will have to alter all the stored I have into the database to add
an insert statement along with a date on a new table to trace what has been
called. Not great for stored procedures updates!
Thank you for your help Aaron
--
SH1
"Aaron Bertrand [SQL Server MVP]" wrote:
> Have you looked at SQL Server Profiler? You could create a server-side
> trace...
> --
> Aaron Bertrand
> SQL Server MVP
>
>
> "SH1" <SH1@.discussions.microsoft.com> wrote in message
> news:354EEB97-63AA-4D08-9C7B-76DBA7AB5217@.microsoft.com...
> > Hi. I was wondering if there would be any way to activate a spy or a log
> > that would list all the SQL calls adressed towards a specific SQL Server
> > 2005
> > database.
> >
> > Any idea?
> >
> > Thanks in advance
> > --
> > SH1
>
>|||I haven't worked with Express, but perhaps it is only the Profiler tool which is missing. You might
be able to still do server-side traces. These aren't as easy to work with, but for a long running
trace, you'd want it to be a server side trace in the end anyhow. So, in the end, what you are
missing is the ability to use the Profiler tool to configure a trace, and then have that tool to
script out the procedure calls to kick off this trace as a server-side trace.
Having said above, if it is possible to log from inside the relevant procedures, I'd probably go for
that instead of a server-side trace.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"SH1" <SH1@.discussions.microsoft.com> wrote in message
news:D9D50EAF-CE3E-4D3D-8FF1-A795BFA8590B@.microsoft.com...
> Never heard about this. Looks like it would do the job. I searched how to
> lauch it, but the "performance tools" menu is not available in my SQL Server
> 2005 menu. I guess I've got SQL Server 2005 Express edition version and that
> this feature is not provided with it. I will take a look to it.
> I guess I will have to alter all the stored I have into the database to add
> an insert statement along with a date on a new table to trace what has been
> called. Not great for stored procedures updates!
> Thank you for your help Aaron
> --
> SH1
>
> "Aaron Bertrand [SQL Server MVP]" wrote:
>> Have you looked at SQL Server Profiler? You could create a server-side
>> trace...
>> --
>> Aaron Bertrand
>> SQL Server MVP
>>
>>
>> "SH1" <SH1@.discussions.microsoft.com> wrote in message
>> news:354EEB97-63AA-4D08-9C7B-76DBA7AB5217@.microsoft.com...
>> > Hi. I was wondering if there would be any way to activate a spy or a log
>> > that would list all the SQL calls adressed towards a specific SQL Server
>> > 2005
>> > database.
>> >
>> > Any idea?
>> >
>> > Thanks in advance
>> > --
>> > SH1
>>
How can I trace all Stored Procedure calls?
that would list all the SQL calls adressed towards a specific SQL Server 200
5
database.
Any idea?
Thanks in advance
--
SH1Have you looked at SQL Server Profiler? You could create a server-side
trace...
Aaron Bertrand
SQL Server MVP
"SH1" <SH1@.discussions.microsoft.com> wrote in message
news:354EEB97-63AA-4D08-9C7B-76DBA7AB5217@.microsoft.com...
> Hi. I was wondering if there would be any way to activate a spy or a log
> that would list all the SQL calls adressed towards a specific SQL Server
> 2005
> database.
> Any idea?
> Thanks in advance
> --
> SH1|||Never heard about this. Looks like it would do the job. I searched how to
lauch it, but the "performance tools" menu is not available in my SQL Server
2005 menu. I guess I've got SQL Server 2005 Express edition version and tha
t
this feature is not provided with it. I will take a look to it.
I guess I will have to alter all the stored I have into the database to add
an insert statement along with a date on a new table to trace what has been
called. Not great for stored procedures updates!
Thank you for your help Aaron
--
SH1
"Aaron Bertrand [SQL Server MVP]" wrote:
> Have you looked at SQL Server Profiler? You could create a server-side
> trace...
> --
> Aaron Bertrand
> SQL Server MVP
>
>
> "SH1" <SH1@.discussions.microsoft.com> wrote in message
> news:354EEB97-63AA-4D08-9C7B-76DBA7AB5217@.microsoft.com...
>
>|||I haven't worked with Express, but perhaps it is only the Profiler tool whic
h is missing. You might
be able to still do server-side traces. These aren't as easy to work with, b
ut for a long running
trace, you'd want it to be a server side trace in the end anyhow. So, in the
end, what you are
missing is the ability to use the Profiler tool to configure a trace, and th
en have that tool to
script out the procedure calls to kick off this trace as a server-side trace
.
Having said above, if it is possible to log from inside the relevant procedu
res, I'd probably go for
that instead of a server-side trace.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"SH1" <SH1@.discussions.microsoft.com> wrote in message
news:D9D50EAF-CE3E-4D3D-8FF1-A795BFA8590B@.microsoft.com...[vbcol=seagreen]
> Never heard about this. Looks like it would do the job. I searched how t
o
> lauch it, but the "performance tools" menu is not available in my SQL Serv
er
> 2005 menu. I guess I've got SQL Server 2005 Express edition version and t
hat
> this feature is not provided with it. I will take a look to it.
> I guess I will have to alter all the stored I have into the database to ad
d
> an insert statement along with a date on a new table to trace what has bee
n
> called. Not great for stored procedures updates!
> Thank you for your help Aaron
> --
> SH1
>
> "Aaron Bertrand [SQL Server MVP]" wrote:
>
How can I tell which CTP I have?
Thanks for your help!
Here's my complete SQL Server version info:
Microsoft SQL Server Management Studio (expires in 365 days)
9.00.1116.00
Microsoft Analysis Services Client Tools 2000.090.1116.00
Microsoft Data Access Components (MDAC) 2000.085.1117.00
(xpsp_sp2_rtm.040803-2158)
Microsoft MSXML 2.6 3.0 5.0 6.0
Microsoft Internet Explorer 6.0.2900.2180
Microsoft .NET Framework 2.0.50215.44
Operating System 5.1.26001187.07 is June.
1116 is April.