Showing posts with label exclude. Show all posts
Showing posts with label exclude. Show all posts

Wednesday, March 21, 2012

QUOTED_IDENTIFIER and SQL DMO

I am trying to dump out scripts for stored procedure and wondering how
I could exclude 'SET QUOTED_IDENTIFIER ON/OFF' option from the output.
I gather this option becomes part of stored procedure script on
creation time...!
I couldn't find any flags in SQL DMO that could be used to ignore this
option.
Please help...
Thanks
Sandiyanhi Sandiyan,
"sandiyan" <sandiyan@.yahoo.co.uk> ha scritto nel messaggio
news:69e9c64b.0404150614.632ccd9d@.posting.google.com...
> I am trying to dump out scripts for stored procedure and wondering how
> I could exclude 'SET QUOTED_IDENTIFIER ON/OFF' option from the output.
> I gather this option becomes part of stored procedure script on
> creation time...!
> I couldn't find any flags in SQL DMO that could be used to ignore this
> option.
> Please help...
i think the Object scripting constant
SQLDMO_SCRIPT_TYPE.SQLDMOScript_UseQuotedIdentifiers shoul'd be your case...
SQLDMOScript_UseQuotedIdentifiers , vaule= -1, description=Use quote
characters to delimit identifier parts when scripting object names
--
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.7.0 - DbaMgr ver 0.53.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply|||> i think the Object scripting constant
> SQLDMO_SCRIPT_TYPE.SQLDMOScript_UseQuotedIdentifiers shoul'd be your case...
> SQLDMOScript_UseQuotedIdentifiers , vaule= -1, description=Use quote
> characters to delimit identifier parts when scripting object names
Thanks. I tried this and it didn't work.
Help...
regards,
Sandiyan.

Wednesday, March 7, 2012

quick count of all tables in a database

How can I get a quick count of all tables in a database? Is there a way to do this? Can the table count exclude system tables?

What about this:

SELECT COUNT(*) FROM sys.tables WHERE is_ms_shipped=0

One problem is that "sysdiagrams" is not marked as is_ms_shipped=1. If you don't want to include it, add name <>'sysdiagrams' condition.

|||SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE LIKE 'BASE%'

Saturday, February 25, 2012

Quick ? on Backup

Is there a way to run a T-SQL or scheduled task backup, to incorporate only
some tables? I want to do a backup of a DB, but exclude a table or two. Is
that possible? If so, where do I get the info on it?
Thanks.Hi,
Not directly.
Since Filegroup backup is possible you can create seperate file groups and
create the required tables to backup in the seperate file group. So as you
can backup the file group.
Thnks
Hari
MCDBA
"CQL User" <foo@.cqlcorp.com> wrote in message
news:OvZCa7UKEHA.1192@.TK2MSFTNGP11.phx.gbl...
> Is there a way to run a T-SQL or scheduled task backup, to incorporate
only
> some tables? I want to do a backup of a DB, but exclude a table or two.
Is
> that possible? If so, where do I get the info on it?
> Thanks.
>

Quick ? on Backup

Is there a way to run a T-SQL or scheduled task backup, to incorporate only
some tables? I want to do a backup of a DB, but exclude a table or two. Is
that possible? If so, where do I get the info on it?
Thanks.Hi,
Not directly.
Since Filegroup backup is possible you can create seperate file groups and
create the required tables to backup in the seperate file group. So as you
can backup the file group.
Thnks
Hari
MCDBA
"CQL User" <foo@.cqlcorp.com> wrote in message
news:OvZCa7UKEHA.1192@.TK2MSFTNGP11.phx.gbl...
> Is there a way to run a T-SQL or scheduled task backup, to incorporate
only
> some tables? I want to do a backup of a DB, but exclude a table or two.
Is
> that possible? If so, where do I get the info on it?
> Thanks.
>

Quick ? on Backup

Is there a way to run a T-SQL or scheduled task backup, to incorporate only
some tables? I want to do a backup of a DB, but exclude a table or two. Is
that possible? If so, where do I get the info on it?
Thanks.
Hi,
Not directly.
Since Filegroup backup is possible you can create seperate file groups and
create the required tables to backup in the seperate file group. So as you
can backup the file group.
Thnks
Hari
MCDBA
"CQL User" <foo@.cqlcorp.com> wrote in message
news:OvZCa7UKEHA.1192@.TK2MSFTNGP11.phx.gbl...
> Is there a way to run a T-SQL or scheduled task backup, to incorporate
only
> some tables? I want to do a backup of a DB, but exclude a table or two.
Is
> that possible? If so, where do I get the info on it?
> Thanks.
>