Showing posts with label program. Show all posts
Showing posts with label program. Show all posts

Tuesday, March 27, 2012

Deleting Model, MSDBData, Master Databases

Can I safely remove the model, msdbdata and/or the master
databases from SQL2000 (they may actually have been from
SQL7) without affecting the program operation and
population? I am incredibly low on storage (that is whole
other subject) and have already removed the northwind
database. Thanks...
hi carl,
These are system database, do not touch them.
Delete the pubs and northwind databases, they are sample databases provided by SQL Server.
Dont touch model, master, tempdb or msdb.
Vishal Parkar
vgparkar@.yahoo.co.in
sql

Deleting Model, MSDBData, Master Databases

Can I safely remove the model, msdbdata and/or the master
databases from SQL2000 (they may actually have been from
SQL7) without affecting the program operation and
population? I am incredibly low on storage (that is whole
other subject) and have already removed the northwind
database. Thanks...No... Unlike Northwind and Pubs, the three you mentioned are quite
important.
"Carl" <cgrau@.lakelandbank.com> wrote in message
news:19db501c41cd6$c2bfdf30$a101280a@.phx
.gbl...
> Can I safely remove the model, msdbdata and/or the master
> databases from SQL2000 (they may actually have been from
> SQL7) without affecting the program operation and
> population? I am incredibly low on storage (that is whole
> other subject) and have already removed the northwind
> database. Thanks...

Deleting Model, MSDBData, Master Databases

Can I safely remove the model, msdbdata and/or the master
databases from SQL2000 (they may actually have been from
SQL7) without affecting the program operation and
population? I am incredibly low on storage (that is whole
other subject) and have already removed the northwind
database. Thanks...
No... Unlike Northwind and Pubs, the three you mentioned are quite
important.
"Carl" <cgrau@.lakelandbank.com> wrote in message
news:19db501c41cd6$c2bfdf30$a101280a@.phx.gbl...
> Can I safely remove the model, msdbdata and/or the master
> databases from SQL2000 (they may actually have been from
> SQL7) without affecting the program operation and
> population? I am incredibly low on storage (that is whole
> other subject) and have already removed the northwind
> database. Thanks...

Saturday, February 25, 2012

delete tables

I′m new with SQL. I have a CA product that creates every day 44 tables, awa
ys with the same name (RCXXXXX). But this program don′t delete this tables
after generate its. I need to delete this tables automatic whent they became
7 days old. Any one can he
lp?
Thanks,
LudTake a look in Books Online about 'cursors'. You can build a cursor against
all the user tables by reading from INFORMATION_SCHEMA.TABLES .
You can then build dynamic sql string and execute it like this from inside
the cursor.
exec('drop table xxx')
Brian Moran
Principal Mentor
Solid Quality Learning
SQL Server MVP
http://www.solidqualitylearning.com
"Lud" <anonymous@.discussions.microsoft.com> wrote in message
news:9F3258D6-2B18-4899-B137-1D4E73C609BD@.microsoft.com...
> Im new with SQL. I have a CA product that creates every day 44 tables,
aways with the same name (RCXXXXX). But this program dont delete this
tables after generate its. I need to delete this tables automatic whent they
became 7 days old. Any one can help?
> Thanks,
> Lud|||Lud,
The below query would give the creation date of the tables whose name starts
with RC
SELECT crdate
FROM sysobjects
WHERE type='U'
AND [name] LIKE 'RC%'
You can schedule a sql job which will find the old ones (use DATEDIFF) and
drop them.
Dinesh
SQL Server MVP
--
--
SQL Server FAQ at
http://www.tkdinesh.com
"Lud" <anonymous@.discussions.microsoft.com> wrote in message
news:9F3258D6-2B18-4899-B137-1D4E73C609BD@.microsoft.com...
> Im new with SQL. I have a CA product that creates every day 44 tables,
aways with the same name (RCXXXXX). But this program dont delete this
tables after generate its. I need to delete this tables automatic whent they
became 7 days old. Any one can help?
> Thanks,
> Lud

delete tables

I´m new with SQL. I have a CA product that creates every day 44 tables, aways with the same name (RCXXXXX). But this program don´t delete this tables after generate its. I need to delete this tables automatic whent they became 7 days old. Any one can help?
Thanks,
LudTake a look in Books Online about 'cursors'. You can build a cursor against
all the user tables by reading from INFORMATION_SCHEMA.TABLES .
You can then build dynamic sql string and execute it like this from inside
the cursor.
exec('drop table xxx')
--
Brian Moran
Principal Mentor
Solid Quality Learning
SQL Server MVP
http://www.solidqualitylearning.com
"Lud" <anonymous@.discussions.microsoft.com> wrote in message
news:9F3258D6-2B18-4899-B137-1D4E73C609BD@.microsoft.com...
> I´m new with SQL. I have a CA product that creates every day 44 tables,
aways with the same name (RCXXXXX). But this program don´t delete this
tables after generate its. I need to delete this tables automatic whent they
became 7 days old. Any one can help?
> Thanks,
> Lud|||Lud,
The below query would give the creation date of the tables whose name starts
with RC
SELECT crdate
FROM sysobjects
WHERE type='U'
AND [name] LIKE 'RC%'
You can schedule a sql job which will find the old ones (use DATEDIFF) and
drop them.
--
Dinesh
SQL Server MVP
--
--
SQL Server FAQ at
http://www.tkdinesh.com
"Lud" <anonymous@.discussions.microsoft.com> wrote in message
news:9F3258D6-2B18-4899-B137-1D4E73C609BD@.microsoft.com...
> I´m new with SQL. I have a CA product that creates every day 44 tables,
aways with the same name (RCXXXXX). But this program don´t delete this
tables after generate its. I need to delete this tables automatic whent they
became 7 days old. Any one can help?
> Thanks,
> Lud

delete tables

I′m new with SQL. I have a CA product that creates every day 44 tables, aways with the same name (RCXXXXX). But this program don′t delete this tables after generate its. I need to delete this tables automatic whent they became 7 days old. Any one can he
lp?
Thanks,
Lud
Take a look in Books Online about 'cursors'. You can build a cursor against
all the user tables by reading from INFORMATION_SCHEMA.TABLES .
You can then build dynamic sql string and execute it like this from inside
the cursor.
exec('drop table xxx')
Brian Moran
Principal Mentor
Solid Quality Learning
SQL Server MVP
http://www.solidqualitylearning.com
"Lud" <anonymous@.discussions.microsoft.com> wrote in message
news:9F3258D6-2B18-4899-B137-1D4E73C609BD@.microsoft.com...
> Im new with SQL. I have a CA product that creates every day 44 tables,
aways with the same name (RCXXXXX). But this program dont delete this
tables after generate its. I need to delete this tables automatic whent they
became 7 days old. Any one can help?
> Thanks,
> Lud
|||Lud,
The below query would give the creation date of the tables whose name starts
with RC
SELECT crdate
FROM sysobjects
WHERE type='U'
AND [name] LIKE 'RC%'
You can schedule a sql job which will find the old ones (use DATEDIFF) and
drop them.
Dinesh
SQL Server MVP
--
SQL Server FAQ at
http://www.tkdinesh.com
"Lud" <anonymous@.discussions.microsoft.com> wrote in message
news:9F3258D6-2B18-4899-B137-1D4E73C609BD@.microsoft.com...
> Im new with SQL. I have a CA product that creates every day 44 tables,
aways with the same name (RCXXXXX). But this program dont delete this
tables after generate its. I need to delete this tables automatic whent they
became 7 days old. Any one can help?
> Thanks,
> Lud