Tuesday, March 27, 2012
Create table on multiple Filegroups .. is it possible ?
CREATE TABLE T1
( cola int PRIMARY KEY,
colb char(8) )
ON FG1,FG2,FG3Are you confused between files and filegroups? Have a read in bol about them.
The answer to the question you have posed is no - you have a clustered index
which resides on the data filegroup.
But I don't think it's the question you wanted to ask.
"Hassan" wrote:
> Can i create a table/index that spans multilple FGs such as
> CREATE TABLE T1
> ( cola int PRIMARY KEY,
> colb char(8) )
> ON FG1,FG2,FG3
>
>|||As Nigel says, it isn't possible. Why do you ask? The purpose of
filegroups is to provide a logical entity on which to place data. The
PHYSICAL placement of data is determined by the location of files,
rather than filegroups. So it should be possible to achieve whatever
configuration you need using a single filegroup per object.
--
David Portas
SQL Server MVP
--
Wednesday, March 21, 2012
Create SQL 2000 user accounts with a script
> script? We have a database on a development server that is overwritten
> every night. I would like to be able to create a script to create the
> user
> accounts needed. Any help or guidance would be appreciated. Thank you.
> scott
Sure - lookup sp_addlogin and sp_grantdbaccess in BOL. It's likely that you
only need to grant existing logins access to the recreated database. I also
suggest reviewing sp_change_users_login - this will allow to synchronize the
users in the restored database with the correct login.Is it possible to create multiple user accounts within SQL 2000 via a
script? We have a database on a development server that is overwritten
every night. I would like to be able to create a script to create the user
accounts needed. Any help or guidance would be appreciated. Thank you.
scott|||> Is it possible to create multiple user accounts within SQL 2000 via a
> script? We have a database on a development server that is overwritten
> every night. I would like to be able to create a script to create the
> user
> accounts needed. Any help or guidance would be appreciated. Thank you.
> scott
Sure - lookup sp_addlogin and sp_grantdbaccess in BOL. It's likely that you
only need to grant existing logins access to the recreated database. I also
suggest reviewing sp_change_users_login - this will allow to synchronize the
users in the restored database with the correct login.|||It's very easy to write a script to do this, and then to set up a SQL Job to
run the script sortly after the database is replaced.
Arnie Rowland, YACE*
"To be successful, your heart must accompany your knowledge."
*Yet Another certification Exam
"spburke" <spburke@.discussions.microsoft.com> wrote in message
news:4B6B03EC-1227-4009-B7E5-EF8260BAA502@.microsoft.com...
> Is it possible to create multiple user accounts within SQL 2000 via a
> script? We have a database on a development server that is overwritten
> every night. I would like to be able to create a script to create the
> user
> accounts needed. Any help or guidance would be appreciated. Thank you.
> scott|||It's very easy to write a script to do this, and then to set up a SQL Job to
run the script sortly after the database is replaced.
Arnie Rowland, YACE*
"To be successful, your heart must accompany your knowledge."
*Yet Another certification Exam
"spburke" <spburke@.discussions.microsoft.com> wrote in message
news:4B6B03EC-1227-4009-B7E5-EF8260BAA502@.microsoft.com...
> Is it possible to create multiple user accounts within SQL 2000 via a
> script? We have a database on a development server that is overwritten
> every night. I would like to be able to create a script to create the
> user
> accounts needed. Any help or guidance would be appreciated. Thank you.
> scott|||scott,
email me at jrvickers@.hotmail.com (subject:msdn) and i'll email you back the
VBSCript file I use to create server databases and accounts for my network.
I
use it in conjunction with creating user accounts on our w2k3 AD Domain.
Jamie.
"spburke" wrote:
> Is it possible to create multiple user accounts within SQL 2000 via a
> script? We have a database on a development server that is overwritten
> every night. I would like to be able to create a script to create the use
r
> accounts needed. Any help or guidance would be appreciated. Thank you.
> scott
create same Database connection on multiple computers
is there a possibility to create automaticaly a ODBC database connection on
the multiple client computers (equal for all of them), in ex. on windows
2000 Profesional or XP?
And secont thing. Is there a possibility to automaticaly change all of the
ODBC connections without changing one by one?
Thanks for help.
Marcin
yes it is possible. Just create(or modify) the regkey from
HKEY_LOCAL_MACHINE
SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources\
SOFTWARE\ODBC\ODBC.INI\
You can do very easy a program to do all this change. I've made one, and it
works well
Gabriel Anton
Software Developer
"#'ak" <mkrzyz@.beretta.pl> wrote in message
news:cgfjtn$4v3$1@.atlantis.news.tpi.pl...
> Hi,
> is there a possibility to create automaticaly a ODBC database connection
on
> the multiple client computers (equal for all of them), in ex. on windows
> 2000 Profesional or XP?
> And secont thing. Is there a possibility to automaticaly change all of the
> ODBC connections without changing one by one?
> Thanks for help.
> Marcin
>
sql
create same Database connection on multiple computers
is there a possibility to create automaticaly a ODBC database connection on
the multiple client computers (equal for all of them), in ex. on windows
2000 Profesional or XP?
And secont thing. Is there a possibility to automaticaly change all of the
ODBC connections without changing one by one?
Thanks for help.
Marcinyes it is possible. Just create(or modify) the regkey from
HKEY_LOCAL_MACHINE
SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources\
SOFTWARE\ODBC\ODBC.INI\
You can do very easy a program to do all this change. I've made one, and it
works well
Gabriel Anton
Software Developer
----
--
"#'ak" <mkrzyz@.beretta.pl> wrote in message
news:cgfjtn$4v3$1@.atlantis.news.tpi.pl...
> Hi,
> is there a possibility to create automaticaly a ODBC database connection
on
> the multiple client computers (equal for all of them), in ex. on windows
> 2000 Profesional or XP?
> And secont thing. Is there a possibility to automaticaly change all of the
> ODBC connections without changing one by one?
> Thanks for help.
> Marcin
>
Wednesday, March 7, 2012
create multiple views
I want to create multiple views in one run in the query analyzer, but it
won't work. I've the following sqlcode in the analyzer:
create view test1 as select.......
create view test2 as select......
etc.
What is wrong with this code?
On Thu, 5 Aug 2004 08:09:02 -0700, Ezekil wrote:
>Hi,
>I want to create multiple views in one run in the query analyzer, but it
>won't work. I've the following sqlcode in the analyzer:
>create view test1 as select.......
>create view test2 as select......
>etc.
>What is wrong with this code?
Hi Ezekil,
The CREATE VIEW statement must be the first in a batch. So your code will
run if you add batch seperators:
create view test1 as select.......
GO
create view test2 as select......
GO
etc.
Best, Hugo
(Remove _NO_ and _SPAM_ to get my e-mail address)
create multiple views
I want to create multiple views in one run in the query analyzer, but it
won't work. I've the following sqlcode in the analyzer:
create view test1 as select.......
create view test2 as select......
etc.
What is wrong with this code?On Thu, 5 Aug 2004 08:09:02 -0700, Ezekil wrote:
>Hi,
>I want to create multiple views in one run in the query analyzer, but it
>won't work. I've the following sqlcode in the analyzer:
>create view test1 as select.......
>create view test2 as select......
>etc.
>What is wrong with this code?
Hi Ezekil,
The CREATE VIEW statement must be the first in a batch. So your code will
run if you add batch seperators:
create view test1 as select.......
GO
create view test2 as select......
GO
etc.
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)
create multiple stored proc thru script
I am using an MSDE database.
During installation, i intend to use a a script file which creates all tables and stored procedures using ADODB in InstallShield.
But i get the error
"CREATE PROCEDURE must be the first statement in a batch update". Moreover "GO" is not recognized by ADODB.
How can i create the stored procedures ?
regards,
henryCall osql to execute the script?|||Hi Brett,
I am using osql to execute the script successfully. But i am still wondering how to do this through ADODB.
Thanks and regards,
henry
Create Multiple Store Procedures in 1 SQL statement
Hi guys , may I know is that possible to create multiple store procedures in 1 time using 1 SQL statement? Thx for the assistance.
Best Regards,
Hans
I can't get your Question..
Need more information
|||I hope you need to write sp like this way.
/*
sp1
*/
CREATE PROC MultipleStoreProcedures;1
AS
BEGIN
SELECT [CategoryID], [CategoryName], [Description], [Picture]
FROM [Northwind].[dbo].[Categories]
END
GO
/*
sp2
*/
CREATE PROC MultipleStoreProcedures;2
AS
BEGIN
SELECT [CustomerID], [CompanyName], [ContactName], [ContactTitle], [Address], [City], [Region], [PostalCode], [Country], [Phone], [Fax]
FROM [Northwind].[dbo].[Customers]
END
GO
**
--execute sp1
exec MultipleStoreProcedures;1
--execute sp2
exec MultipleStoreProcedures;2
**
thx. it helps. :) However, if using 2005 for creating, then the 'GO' statement will be dissappear when u modify the store procedure. But it seems ok anyway. Thx alot.
Best Regards,
Hans
|||The 'GO' isn't part of a T-SQL statement, it's just a marker that identifies where the end of batch is.
So, the above is, if you save it all as one file, and run it all at the same time, still two batches ( or statements if you will ), but it looks like it's working for you wanted anyway =:o)
/Kenneth