Thursday, March 29, 2012
Copy Permissions
I've copied tables and views from one SQL Server to another, but the
permissions for each user/role are not copied.
How come.
Thanks,
B.Bart
--
EXEC databasename..sp_helpuser 'username'
SELECT OBJECT_NAME(id),*
FROM databasename..syspermissions
WHERE grantee=USER_ID('username')
If you use BACKUP/RESTORE command to copy your tables/views so please
search on internet for "sp_help_revlogin" two stored procedures provided by
MS to copy logins beween SQL Servers
"Bart Steur" <solnews@.xs4all.nl> wrote in message
news:OtwLA6myFHA.460@.TK2MSFTNGP15.phx.gbl...
> Hi,
> I've copied tables and views from one SQL Server to another, but the
> permissions for each user/role are not copied.
> How come.
> Thanks,
> B.
>
Copy Permissions
I've copied tables and views from one SQL Server to another, but the
permissions for each user/role are not copied.
How come.
Thanks,
B.
Bart
EXEC databasename..sp_helpuser 'username'
SELECT OBJECT_NAME(id),*
FROM databasename..syspermissions
WHERE grantee=USER_ID('username')
If you use BACKUP/RESTORE command to copy your tables/views so please
search on internet for "sp_help_revlogin" two stored procedures provided by
MS to copy logins beween SQL Servers
"Bart Steur" <solnews@.xs4all.nl> wrote in message
news:OtwLA6myFHA.460@.TK2MSFTNGP15.phx.gbl...
> Hi,
> I've copied tables and views from one SQL Server to another, but the
> permissions for each user/role are not copied.
> How come.
> Thanks,
> B.
>
Copy paste from Excel - should this work?
Now I'm worried as I showed this bodge to a colleague and he is using
it a lot! I found that you can copy paste directly from Excel into the
Enterprise Manager GUI (we're on v8.0, sql server 2000).
The way I do it is say you had some Excel data in cols B-D, highlight A
as well (leaving this column blank), click the arrow on the new row at
the bottom of your table (a table with 3 columns matching B-D) in
Enterprise Manager and voila a paste option appears in the right hand
mouse button menu.
Why? What is this blank column doing? Is it causing any harm
internally to the db to insert nulls (or empty excel strings more
correctly?) in this column?
Any help / warnings much appreciated!
CT
Hi
I don't seem to be able to get this to happen, maybe I am missing something!
What version of SQL Server are you using and are your client tools at the
same version?
If you need to regularly import files into SQL Server you may want to look
at using DTS to do this, you can have jobs that regularly check any files
dropped into a directory and upload them check out
http://www.sqldts.com/default.aspx for lots of information on how to do this.
John
"cheesey_toastie" wrote:
> Hi,
> Now I'm worried as I showed this bodge to a colleague and he is using
> it a lot! I found that you can copy paste directly from Excel into the
> Enterprise Manager GUI (we're on v8.0, sql server 2000).
> The way I do it is say you had some Excel data in cols B-D, highlight A
> as well (leaving this column blank), click the arrow on the new row at
> the bottom of your table (a table with 3 columns matching B-D) in
> Enterprise Manager and voila a paste option appears in the right hand
> mouse button menu.
> Why? What is this blank column doing? Is it causing any harm
> internally to the db to insert nulls (or empty excel strings more
> correctly?) in this column?
> Any help / warnings much appreciated!
> CT
>
|||Hi John,
Its SQL Server 2000 (sp4), the client tools are Enterprise Manager V8.0
I do use the DTS for files but sometimes this is quicker!! As I said
my main concern was accidently showing a user how to do this and now I
wonder what it is doing internally (if anything). I'm confused you cant
replicate this behaviour. We do have a later version of SQL server on
a test environment - I'll try it there and see if it still works.
CT
John Bell wrote:[vbcol=seagreen]
> Hi
> I don't seem to be able to get this to happen, maybe I am missing something!
> What version of SQL Server are you using and are your client tools at the
> same version?
> If you need to regularly import files into SQL Server you may want to look
> at using DTS to do this, you can have jobs that regularly check any files
> dropped into a directory and upload them check out
> http://www.sqldts.com/default.aspx for lots of information on how to do this.
> John
> "cheesey_toastie" wrote:
|||Hi
You can check to see if at least one of the file versions the exes for the
tools match the version returned by SELECT @.@.VERSION to see if the tools are
up to date. You may also want to post the ddl for your table.
From what you say an extra column is appearing when you choose paste from
the menus, if after you have pasted and saved the values the table
definition has not changed then I would expect things to be ok.
John
"cheesey_toastie" <bletchley_scum@.yahoo.co.uk> wrote in message
news:1160209997.605041.124600@.m73g2000cwd.googlegr oups.com...
> Hi John,
> Its SQL Server 2000 (sp4), the client tools are Enterprise Manager V8.0
> I do use the DTS for files but sometimes this is quicker!! As I said
> my main concern was accidently showing a user how to do this and now I
> wonder what it is doing internally (if anything). I'm confused you cant
> replicate this behaviour. We do have a later version of SQL server on
> a test environment - I'll try it there and see if it still works.
> CT
> John Bell wrote:
>
Copy paste from Excel - should this work?
Now I'm worried as I showed this bodge to a colleague and he is using
it a lot! I found that you can copy paste directly from Excel into the
Enterprise Manager GUI (we're on v8.0, sql server 2000).
The way I do it is say you had some Excel data in cols B-D, highlight A
as well (leaving this column blank), click the arrow on the new row at
the bottom of your table (a table with 3 columns matching B-D) in
Enterprise Manager and voila a paste option appears in the right hand
mouse button menu.
Why? What is this blank column doing? Is it causing any harm
internally to the db to insert nulls (or empty excel strings more
correctly?) in this column?
Any help / warnings much appreciated!
CTHi
I don't seem to be able to get this to happen, maybe I am missing something!
What version of SQL Server are you using and are your client tools at the
same version?
If you need to regularly import files into SQL Server you may want to look
at using DTS to do this, you can have jobs that regularly check any files
dropped into a directory and upload them check out
http://www.sqldts.com/default.aspx for lots of information on how to do this
.
John
"cheesey_toastie" wrote:
> Hi,
> Now I'm worried as I showed this bodge to a colleague and he is using
> it a lot! I found that you can copy paste directly from Excel into the
> Enterprise Manager GUI (we're on v8.0, sql server 2000).
> The way I do it is say you had some Excel data in cols B-D, highlight A
> as well (leaving this column blank), click the arrow on the new row at
> the bottom of your table (a table with 3 columns matching B-D) in
> Enterprise Manager and voila a paste option appears in the right hand
> mouse button menu.
> Why? What is this blank column doing? Is it causing any harm
> internally to the db to insert nulls (or empty excel strings more
> correctly?) in this column?
> Any help / warnings much appreciated!
> CT
>|||Hi John,
Its SQL Server 2000 (sp4), the client tools are Enterprise Manager V8.0
I do use the DTS for files but sometimes this is quicker!! As I said
my main concern was accidently showing a user how to do this and now I
wonder what it is doing internally (if anything). I'm confused you cant
replicate this behaviour. We do have a later version of SQL server on
a test environment - I'll try it there and see if it still works.
CT
John Bell wrote:[vbcol=seagreen]
> Hi
> I don't seem to be able to get this to happen, maybe I am missing somethin
g!
> What version of SQL Server are you using and are your client tools at the
> same version?
> If you need to regularly import files into SQL Server you may want to look
> at using DTS to do this, you can have jobs that regularly check any files
> dropped into a directory and upload them check out
> http://www.sqldts.com/default.aspx for lots of information on how to do th
is.
> John
> "cheesey_toastie" wrote:
>|||Hi
You can check to see if at least one of the file versions the exes for the
tools match the version returned by SELECT @.@.VERSION to see if the tools are
up to date. You may also want to post the ddl for your table.
From what you say an extra column is appearing when you choose paste from
the menus, if after you have pasted and saved the values the table
definition has not changed then I would expect things to be ok.
John
"cheesey_toastie" <bletchley_scum@.yahoo.co.uk> wrote in message
news:1160209997.605041.124600@.m73g2000cwd.googlegroups.com...
> Hi John,
> Its SQL Server 2000 (sp4), the client tools are Enterprise Manager V8.0
> I do use the DTS for files but sometimes this is quicker!! As I said
> my main concern was accidently showing a user how to do this and now I
> wonder what it is doing internally (if anything). I'm confused you cant
> replicate this behaviour. We do have a later version of SQL server on
> a test environment - I'll try it there and see if it still works.
> CT
> John Bell wrote:
>
Copy paste from Excel - should this work?
Now I'm worried as I showed this bodge to a colleague and he is using
it a lot! I found that you can copy paste directly from Excel into the
Enterprise Manager GUI (we're on v8.0, sql server 2000).
The way I do it is say you had some Excel data in cols B-D, highlight A
as well (leaving this column blank), click the arrow on the new row at
the bottom of your table (a table with 3 columns matching B-D) in
Enterprise Manager and voila a paste option appears in the right hand
mouse button menu.
Why? What is this blank column doing? Is it causing any harm
internally to the db to insert nulls (or empty excel strings more
correctly?) in this column?
Any help / warnings much appreciated!
CTHi
I don't seem to be able to get this to happen, maybe I am missing something!
What version of SQL Server are you using and are your client tools at the
same version?
If you need to regularly import files into SQL Server you may want to look
at using DTS to do this, you can have jobs that regularly check any files
dropped into a directory and upload them check out
http://www.sqldts.com/default.aspx for lots of information on how to do this.
John
"cheesey_toastie" wrote:
> Hi,
> Now I'm worried as I showed this bodge to a colleague and he is using
> it a lot! I found that you can copy paste directly from Excel into the
> Enterprise Manager GUI (we're on v8.0, sql server 2000).
> The way I do it is say you had some Excel data in cols B-D, highlight A
> as well (leaving this column blank), click the arrow on the new row at
> the bottom of your table (a table with 3 columns matching B-D) in
> Enterprise Manager and voila a paste option appears in the right hand
> mouse button menu.
> Why? What is this blank column doing? Is it causing any harm
> internally to the db to insert nulls (or empty excel strings more
> correctly?) in this column?
> Any help / warnings much appreciated!
> CT
>|||Hi John,
Its SQL Server 2000 (sp4), the client tools are Enterprise Manager V8.0
I do use the DTS for files but sometimes this is quicker!! As I said
my main concern was accidently showing a user how to do this and now I
wonder what it is doing internally (if anything). I'm confused you cant
replicate this behaviour. We do have a later version of SQL server on
a test environment - I'll try it there and see if it still works.
CT
John Bell wrote:
> Hi
> I don't seem to be able to get this to happen, maybe I am missing something!
> What version of SQL Server are you using and are your client tools at the
> same version?
> If you need to regularly import files into SQL Server you may want to look
> at using DTS to do this, you can have jobs that regularly check any files
> dropped into a directory and upload them check out
> http://www.sqldts.com/default.aspx for lots of information on how to do this.
> John
> "cheesey_toastie" wrote:
> > Hi,
> >
> > Now I'm worried as I showed this bodge to a colleague and he is using
> > it a lot! I found that you can copy paste directly from Excel into the
> > Enterprise Manager GUI (we're on v8.0, sql server 2000).
> >
> > The way I do it is say you had some Excel data in cols B-D, highlight A
> > as well (leaving this column blank), click the arrow on the new row at
> > the bottom of your table (a table with 3 columns matching B-D) in
> > Enterprise Manager and voila a paste option appears in the right hand
> > mouse button menu.
> >
> > Why? What is this blank column doing? Is it causing any harm
> > internally to the db to insert nulls (or empty excel strings more
> > correctly?) in this column?
> >
> > Any help / warnings much appreciated!
> >
> > CT
> >
> >|||Hi
You can check to see if at least one of the file versions the exes for the
tools match the version returned by SELECT @.@.VERSION to see if the tools are
up to date. You may also want to post the ddl for your table.
From what you say an extra column is appearing when you choose paste from
the menus, if after you have pasted and saved the values the table
definition has not changed then I would expect things to be ok.
John
"cheesey_toastie" <bletchley_scum@.yahoo.co.uk> wrote in message
news:1160209997.605041.124600@.m73g2000cwd.googlegroups.com...
> Hi John,
> Its SQL Server 2000 (sp4), the client tools are Enterprise Manager V8.0
> I do use the DTS for files but sometimes this is quicker!! As I said
> my main concern was accidently showing a user how to do this and now I
> wonder what it is doing internally (if anything). I'm confused you cant
> replicate this behaviour. We do have a later version of SQL server on
> a test environment - I'll try it there and see if it still works.
> CT
> John Bell wrote:
>> Hi
>> I don't seem to be able to get this to happen, maybe I am missing
>> something!
>> What version of SQL Server are you using and are your client tools at the
>> same version?
>> If you need to regularly import files into SQL Server you may want to
>> look
>> at using DTS to do this, you can have jobs that regularly check any files
>> dropped into a directory and upload them check out
>> http://www.sqldts.com/default.aspx for lots of information on how to do
>> this.
>> John
>> "cheesey_toastie" wrote:
>> > Hi,
>> >
>> > Now I'm worried as I showed this bodge to a colleague and he is using
>> > it a lot! I found that you can copy paste directly from Excel into the
>> > Enterprise Manager GUI (we're on v8.0, sql server 2000).
>> >
>> > The way I do it is say you had some Excel data in cols B-D, highlight A
>> > as well (leaving this column blank), click the arrow on the new row at
>> > the bottom of your table (a table with 3 columns matching B-D) in
>> > Enterprise Manager and voila a paste option appears in the right hand
>> > mouse button menu.
>> >
>> > Why? What is this blank column doing? Is it causing any harm
>> > internally to the db to insert nulls (or empty excel strings more
>> > correctly?) in this column?
>> >
>> > Any help / warnings much appreciated!
>> >
>> > CT
>> >
>> >
>sqlsql
Copy or insert Columns from a table in another Database, How?
I thought it is easily done, but no. I have 3 columns of hundreds of data i
n a table in another Database within thesame server that i want to move to m
y production Database. I have tried Select into, copy, insert method... wit
hout success.
Please help.
ThanksHi,
If the structure of the table in production database is identical then use
Insert into
Insert into productiondatabase..table_name(col1,col2,col3) select
col1,col2,col3 from devdb..table
Above command will fail incase the same table have any other column which
will not allow "NOT NULL"
I have tried Select into, copy, insert method... without success.
Tell the error you are getting.
Thanks
Hari
MCDBA
"Ototofioto" <anonymous@.discussions.microsoft.com> wrote in message
news:6ED03A97-26F9-483A-93B9-3BFB8F28C87D@.microsoft.com...
> Hallo,
> I thought it is easily done, but no. I have 3 columns of hundreds of data
in a table in another Database within thesame server that i want to move to
my production Database. I have tried Select into, copy, insert method...
without success.
> Please help.
> Thanks
Copy one row from tableA to tableB
parameter @.ID without having to list each column name in an insert
statement. Is this possible?
Thanks,
lqI forgot to mention all column names and data types are identical in
tblA and tblB except for the UniqueID which is PK in tblA and not PK in
tblB.
lq|||Sure,
INSERT INTO tblB
SELECT *
FROM tblA
WHERE UniqueID = @.ID
Stu|||laurenq uantrell (laurenquantrell@.hotmail.com) writes:
> I want to copy all columns from tblA into tblB where tblA.UniqueID =
> parameter @.ID without having to list each column name in an insert
> statement. Is this possible?
Under some circumstances, yes.
Then again, in application code, I think it is very bad practice to say:
INSERT tbl2 SELECT * FROM tbl1
SELECT * itself is bad practice, so are INSERT statements without listing
of target columns.
Why are this bad:
* You cannot see if a column is actually used.
* If the table defintion changes, the result of the SELECT changes.
* And for INSERT it is likely to result in the INSERT statment failing.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp
Copy one db with jobs to another hard drive
I'm replaced our current hard drive with another and I need to know the
best way to transfer all the sql data with jobs.
Going from:
NT4 Server running SQL Server 7
to:
W2K Server running SQL Server 7
I need to transfer all sql data including jobs to the new hard drive.
Can I just copy all the dbs (Master, User defined, etc) to the new hard
drive and be set?
What's the best way to handle this.
Thank you,
BillWilliam,
Go with Backup and Restore procedure.
--
Dejan Sarka, SQL Server MVP
Please reply only to the newsgroups.
"William Oliveri" <wuji@.bigvalley.net> wrote in message
news:eV2PpPFkDHA.2652@.TK2MSFTNGP09.phx.gbl...
> Hi all,
> I'm replaced our current hard drive with another and I need to know the
> best way to transfer all the sql data with jobs.
> Going from:
> NT4 Server running SQL Server 7
> to:
> W2K Server running SQL Server 7
> I need to transfer all sql data including jobs to the new hard drive.
> Can I just copy all the dbs (Master, User defined, etc) to the new hard
> drive and be set?
> What's the best way to handle this.
> Thank you,
> Bill
>|||> Can I just copy all the dbs (Master, User defined, etc) to the new hard
> drive and be set?
>
No there are two ways:
1)
detach/attach
take care that no user is connected (kill SPID´s or : alter database
set restricted_user with rollback immediate)
all files you have to move you find at sysfiles (master)
exec sp_detach_db DBName
copy or move the files
at the new Server:
exec sp_attach_db DBName, FileName1, FileName2...FileName16
e.g exec sp_attach_db 'MyDB',
'e:\SQLData\MyDB.mdf','e:\SQLLog\MyDB.ldf'
2)
Backup/Restore
Backup Database DBName To Disk='PathName'
then on the new machine:
Restore Database DBName
from Disk = 'PathName'
with move 'MyDB' TO 'g:\SQLData\MyDB.mdf',
move 'MyDb_log' TO 'g:\SQLLog\MyDB.ldf'
hope this was helpful
Peter
Copy one coulm to another
I have one table that has CUST_NO, LICENSE_NO and LOGIN. CUST_NO is unique.
I need to copy whatever is in LICENSE_NO field to LOGIN field. How can I do
this?
Thanks for your help.If you want to update all values in the LOGIN column, then it should be as
simple as this:
UPDATE MyTable
SET LOGIN = LICENSE_NO
HTH,
Plamen Ratchev
http://www.SQLStudio.com|||If I understand what you are trying to do...
update t1
set LOGIN=LICENSE_NO
--
Jason Massie
Web: http://statisticsio.com
RSS: http://feeds.feedburner.com/statisticsio
"Shan" <Shan@.discussions.microsoft.com> wrote in message
news:13B60DE7-BE32-426B-9EFB-1FA8B8010871@.microsoft.com...
> Hi Everyone.
> I have one table that has CUST_NO, LICENSE_NO and LOGIN. CUST_NO is
> unique.
> I need to copy whatever is in LICENSE_NO field to LOGIN field. How can I
> do
> this?
> Thanks for your help.|||"Shan" <Shan@.discussions.microsoft.com> wrote in message
news:13B60DE7-BE32-426B-9EFB-1FA8B8010871@.microsoft.com...
> Hi Everyone.
> I have one table that has CUST_NO, LICENSE_NO and LOGIN. CUST_NO is
> unique.
> I need to copy whatever is in LICENSE_NO field to LOGIN field. How can I
> do
> this?
> Thanks for your help.
UPDATE FOO set LOGIN=LICENSE_NO
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html|||Thanks very much. Works great.
"Plamen Ratchev" wrote:
> If you want to update all values in the LOGIN column, then it should be as
> simple as this:
> UPDATE MyTable
> SET LOGIN = LICENSE_NO
> HTH,
> Plamen Ratchev
> http://www.SQLStudio.com
>
Copy one coulm to another
I have one table that has CUST_NO, LICENSE_NO and LOGIN. CUST_NO is unique.
I need to copy whatever is in LICENSE_NO field to LOGIN field. How can I do
this?
Thanks for your help.
If you want to update all values in the LOGIN column, then it should be as
simple as this:
UPDATE MyTable
SET LOGIN = LICENSE_NO
HTH,
Plamen Ratchev
http://www.SQLStudio.com
|||If I understand what you are trying to do...
update t1
set LOGIN=LICENSE_NO
Jason Massie
Web: http://statisticsio.com
RSS: http://feeds.feedburner.com/statisticsio
"Shan" <Shan@.discussions.microsoft.com> wrote in message
news:13B60DE7-BE32-426B-9EFB-1FA8B8010871@.microsoft.com...
> Hi Everyone.
> I have one table that has CUST_NO, LICENSE_NO and LOGIN. CUST_NO is
> unique.
> I need to copy whatever is in LICENSE_NO field to LOGIN field. How can I
> do
> this?
> Thanks for your help.
|||"Shan" <Shan@.discussions.microsoft.com> wrote in message
news:13B60DE7-BE32-426B-9EFB-1FA8B8010871@.microsoft.com...
> Hi Everyone.
> I have one table that has CUST_NO, LICENSE_NO and LOGIN. CUST_NO is
> unique.
> I need to copy whatever is in LICENSE_NO field to LOGIN field. How can I
> do
> this?
> Thanks for your help.
UPDATE FOO set LOGIN=LICENSE_NO
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html
|||Thanks very much. Works great.
"Plamen Ratchev" wrote:
> If you want to update all values in the LOGIN column, then it should be as
> simple as this:
> UPDATE MyTable
> SET LOGIN = LICENSE_NO
> HTH,
> Plamen Ratchev
> http://www.SQLStudio.com
>
sqlsql
Copy one column to another
update Mapping Set SID = (select SMappingID from Mapping where SMappingID is not null)
I don't know if I should be doing this in a loop (which I'm not totally familiar with using) or if there is a better way to copy these values. If it helps my columns are -
ID (int, Not Null, PK)
SID (int, Not Null, FK)
PartID (int, Not Null, FK)
CompID (int, Not Null)
SMappingID (int, Null)
Quote:
Originally Posted by NamelessNumberheadMan
I have a table I need to make changes to. Dropping columns isn't my problem, but before I drop one of the columns I need to copy the values that aren't null to another existing column in the same table. So for psuedo-code it would be something like:
update Mapping Set SID = (select SMappingID from Mapping where SMappingID is not null)
I don't know if I should be doing this in a loop (which I'm not totally familiar with using) or if there is a better way to copy these values. If it helps my columns are -
ID (int, Not Null, PK)
SID (int, Not Null, FK)
PartID (int, Not Null, FK)
CompID (int, Not Null)
SMappingID (int, Null)
try:
update Mapping Set SID = SMappingID
where SMappingID IS NOT NULL|||
Quote:
Originally Posted by NamelessNumberheadMan
I have a table I need to make changes to. Dropping columns isn't my problem, but before I drop one of the columns I need to copy the values that aren't null to another existing column in the same table. So for psuedo-code it would be something like:
update Mapping Set SID = (select SMappingID from Mapping where SMappingID is not null)
I don't know if I should be doing this in a loop (which I'm not totally familiar with using) or if there is a better way to copy these values. If it helps my columns are -
ID (int, Not Null, PK)
SID (int, Not Null, FK)
PartID (int, Not Null, FK)
CompID (int, Not Null)
SMappingID (int, Null)
The query is simple:
UPDATE TABLENAME
SET NEWCOLUMN = SOURCECOLUMN WHERE SOURCECOLUMN IS NOT NULL.
Thanks.
copy on condition
i have two tables A and B with the same fields,
If the id field of table B equals id field in Table A i need to update th edata for that id row.
If the id field doesn;t match then i need to insert a new record in tale A for that id
that is i need to perform insertion or updation into table A depending on table B data
Can anyone give me some idea how to start?
UPDATE A SET col1 = b.col1, col2 = b.col2, ... FROM A INNER JOIN B on A.pkcol = B.pkcol
INERT INTO A (pkcol, col1, col2, col3)
SELECT pkcol, col1, col2, col3
FROM B
WHERE pkcol NOT IN (SELECT pkcol FROM A)|||
Thank you very much Alex!
One more question, I have millions of data in the table, will the 2 queries work well for such huge data
.I mean performance wise. I have created indexes .
copy of table from another database into your database
We copy a table from a progress database into our sql server database that we use as a read-only table. We perform this action through a job.
Is there a way to have a read only table from another database that is put into your database that will always be insinc with the original copy to use as a read only copy, that as the original table is updated, it will proprogate to your copied table?
Would setting up a package to import the data from the other database on a schedule work? In SQL Server, you can do an import and you have the option to save the import as a package and schedule it to run at your discretion.
|||If you require the tables be kept in sync, then the easiest way would be to use a link from the source to the destination server, and have triggers on the source populate the destination. This does carry a performance penalty, of course.
A more performant solution would be to have the triggers on the source write their updates to an update table on the same database, and poll it for changes every 5 minutes or so, but you're not guaranteed to have the DBs in sync then.
Copy of SQLServer software
news:Xns93C7596DBAD52curtsympaticoca@.207.35.177.13 4...
> Does anybody know where a copy of the MS-SQLServer software is posted?
Umm, you can go to http://www.microsoft.com/sql/evalua...ial/default.asp
and get a trial version.
Copy of RS??
Hi there
We are running SQL server 2000 on a windows server 2000 OS, we are also using the Evaluation edition of RS, can you tell me if the full version is on the SQL server 2000 cd, or the Windows Server 2000 cd?
thanks
tim
SQL RS is a part of SQL Server, so you'll find the install bits on the SQL Server CD. If you bought the CD before Reporting Services was released - you'll have to order a CD from Microsoft.|||Hi there, thanks for the reply
How do I order from Microsoft and will there be a charge?
Thanks
Tim
copy of existing table and data
SELECT * INTO NEW_TABLE FROM OLD_TABLE
THis will copy the table structure and data into NEW_TABLE. You may need to
craete the Indexes manually to NEW_TABLE.
Thanks
Hari
"SANJAY PAWAR" <sanju@.nisiki.net> wrote in message
news:%23n7D6speHHA.3960@.TK2MSFTNGP02.phx.gbl...
> My query is very simple, I am new to SQL.
> I want to create copy of existing table and data.
> Pls suggest a command !
> Thanks in advance
> Sanjay
>
Also...
As well as indexes Primary Keys, Foreign Keys, CHECK constraints are not
transferred, but Identities are!!! E.g
CREATE TABLE MyMaster ( id int not null identity constraint PK_MyMaster
PRIMARY KEY,
Value int not null )
CREATE TABLE Mydetail (
id int not null identity constraint PK_Mydetail PRIMARY KEY,
master_id int not null constraint FK_MyMaster FOREIGN KEY REFERENCES
MyMaster ( id ),
Value int not null CONSTRAINT CK_value CHECK ( value > 10 ))
INSERT INTO MyMaster ( value )
SELECT 1
UNION ALL SELECT 2
UNION ALL SELECT 3
UNION ALL SELECT 4
INSERT INTO Mydetail ( Master_id, value )
SELECT 1, 100
UNION ALL SELECT 2, 20
UNION ALL SELECT 3, 30
UNION ALL SELECT 4, 40
UNION ALL SELECT 4, 400
SELECT * INTO MyOtherMaster FROM MyMaster
EXEC sp_help MyMaster
EXEC sp_help MyOtherMaster
SELECT * INTO MyOtherDetail FROM MyDetail
EXEC sp_help MyDetail
EXEC sp_help MyOtherDetail
John
"Hari Prasad" wrote:
> Hello,
> SELECT * INTO NEW_TABLE FROM OLD_TABLE
> THis will copy the table structure and data into NEW_TABLE. You may need to
> craete the Indexes manually to NEW_TABLE.
> Thanks
> Hari
>
> "SANJAY PAWAR" <sanju@.nisiki.net> wrote in message
> news:%23n7D6speHHA.3960@.TK2MSFTNGP02.phx.gbl...
>
>
copy of existing table and data
I want to create copy of existing table and data.
Pls suggest a command !
Thanks in advance
SanjayEverything in the database? If so, I suggest backup and restore. If not, che
ck out some of the tools
at http://www.karaszi.com/SQLServer/in...rate_script.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"SANJAY PAWAR" <sanju@.nisiki.net> wrote in message news:%23n7D6speHHA.3960@.TK2MSFTNGP02.phx.
gbl...
> My query is very simple, I am new to SQL.
> I want to create copy of existing table and data.
> Pls suggest a command !
> Thanks in advance
> Sanjay
>|||Hello,
SELECT * INTO NEW_TABLE FROM OLD_TABLE
THis will copy the table structure and data into NEW_TABLE. You may need to
craete the Indexes manually to NEW_TABLE.
Thanks
Hari
"SANJAY PAWAR" <sanju@.nisiki.net> wrote in message
news:%23n7D6speHHA.3960@.TK2MSFTNGP02.phx.gbl...
> My query is very simple, I am new to SQL.
> I want to create copy of existing table and data.
> Pls suggest a command !
> Thanks in advance
> Sanjay
>|||Thanks for the prompt response.
I think, i have failed to pass on my message.
I want to create a new table using existing table with its structure and
records.
Sanjay
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OYKfdypeHHA.4300@.TK2MSFTNGP02.phx.gbl...
> Everything in the database? If so, I suggest backup and restore. If not,
> check out some of the tools at
> http://www.karaszi.com/SQLServer/in...rate_script.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "SANJAY PAWAR" <sanju@.nisiki.net> wrote in message
> news:%23n7D6speHHA.3960@.TK2MSFTNGP02.phx.gbl...
>|||Also...
As well as indexes Primary Keys, Foreign Keys, CHECK constraints are not
transferred, but Identities are!!! E.g
CREATE TABLE MyMaster ( id int not null identity constraint PK_MyMaster
PRIMARY KEY,
Value int not null )
CREATE TABLE Mydetail (
id int not null identity constraint PK_Mydetail PRIMARY KEY,
master_id int not null constraint FK_MyMaster FOREIGN KEY REFERENCES
MyMaster ( id ),
Value int not null CONSTRAINT CK_value CHECK ( value > 10 ))
INSERT INTO MyMaster ( value )
SELECT 1
UNION ALL SELECT 2
UNION ALL SELECT 3
UNION ALL SELECT 4
INSERT INTO Mydetail ( Master_id, value )
SELECT 1, 100
UNION ALL SELECT 2, 20
UNION ALL SELECT 3, 30
UNION ALL SELECT 4, 40
UNION ALL SELECT 4, 400
SELECT * INTO MyOtherMaster FROM MyMaster
EXEC sp_help MyMaster
EXEC sp_help MyOtherMaster
SELECT * INTO MyOtherDetail FROM MyDetail
EXEC sp_help MyDetail
EXEC sp_help MyOtherDetail
John
"Hari Prasad" wrote:
> Hello,
> SELECT * INTO NEW_TABLE FROM OLD_TABLE
> THis will copy the table structure and data into NEW_TABLE. You may need t
o
> craete the Indexes manually to NEW_TABLE.
> Thanks
> Hari
>
> "SANJAY PAWAR" <sanju@.nisiki.net> wrote in message
> news:%23n7D6speHHA.3960@.TK2MSFTNGP02.phx.gbl...
>
>
copy of existing table and data
I want to create copy of existing table and data.
Pls suggest a command !
Thanks in advance
SanjayEverything in the database? If so, I suggest backup and restore. If not, check out some of the tools
at http://www.karaszi.com/SQLServer/info_generate_script.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"SANJAY PAWAR" <sanju@.nisiki.net> wrote in message news:%23n7D6speHHA.3960@.TK2MSFTNGP02.phx.gbl...
> My query is very simple, I am new to SQL.
> I want to create copy of existing table and data.
> Pls suggest a command !
> Thanks in advance
> Sanjay
>|||Hello,
SELECT * INTO NEW_TABLE FROM OLD_TABLE
THis will copy the table structure and data into NEW_TABLE. You may need to
craete the Indexes manually to NEW_TABLE.
Thanks
Hari
"SANJAY PAWAR" <sanju@.nisiki.net> wrote in message
news:%23n7D6speHHA.3960@.TK2MSFTNGP02.phx.gbl...
> My query is very simple, I am new to SQL.
> I want to create copy of existing table and data.
> Pls suggest a command !
> Thanks in advance
> Sanjay
>|||Thanks for the prompt response.
I think, i have failed to pass on my message.
I want to create a new table using existing table with its structure and
records.
Sanjay
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OYKfdypeHHA.4300@.TK2MSFTNGP02.phx.gbl...
> Everything in the database? If so, I suggest backup and restore. If not,
> check out some of the tools at
> http://www.karaszi.com/SQLServer/info_generate_script.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "SANJAY PAWAR" <sanju@.nisiki.net> wrote in message
> news:%23n7D6speHHA.3960@.TK2MSFTNGP02.phx.gbl...
>> My query is very simple, I am new to SQL.
>> I want to create copy of existing table and data.
>> Pls suggest a command !
>> Thanks in advance
>> Sanjay
>|||Also...
As well as indexes Primary Keys, Foreign Keys, CHECK constraints are not
transferred, but Identities are!!! E.g
CREATE TABLE MyMaster ( id int not null identity constraint PK_MyMaster
PRIMARY KEY,
Value int not null )
CREATE TABLE Mydetail (
id int not null identity constraint PK_Mydetail PRIMARY KEY,
master_id int not null constraint FK_MyMaster FOREIGN KEY REFERENCES
MyMaster ( id ),
Value int not null CONSTRAINT CK_value CHECK ( value > 10 ))
INSERT INTO MyMaster ( value )
SELECT 1
UNION ALL SELECT 2
UNION ALL SELECT 3
UNION ALL SELECT 4
INSERT INTO Mydetail ( Master_id, value )
SELECT 1, 100
UNION ALL SELECT 2, 20
UNION ALL SELECT 3, 30
UNION ALL SELECT 4, 40
UNION ALL SELECT 4, 400
SELECT * INTO MyOtherMaster FROM MyMaster
EXEC sp_help MyMaster
EXEC sp_help MyOtherMaster
SELECT * INTO MyOtherDetail FROM MyDetail
EXEC sp_help MyDetail
EXEC sp_help MyOtherDetail
John
"Hari Prasad" wrote:
> Hello,
> SELECT * INTO NEW_TABLE FROM OLD_TABLE
> THis will copy the table structure and data into NEW_TABLE. You may need to
> craete the Indexes manually to NEW_TABLE.
> Thanks
> Hari
>
> "SANJAY PAWAR" <sanju@.nisiki.net> wrote in message
> news:%23n7D6speHHA.3960@.TK2MSFTNGP02.phx.gbl...
> > My query is very simple, I am new to SQL.
> >
> > I want to create copy of existing table and data.
> > Pls suggest a command !
> >
> > Thanks in advance
> > Sanjay
> >
>
>
copy of a group on same page
also, i want to add an underlay with "VOID" on the checks at the page footer after the fist page. any ideas?
JosoCan you show us the expected report format?sqlsql
Copy of a database with new filenames
Using sp_detach_db and sp_attach_db I can get
database B on files A.mdf and A.ldf
Is there a way to get database B on B.mdf and B.ldf
not going through the copying of individual objects.
Thanks in advance
SergeiHi,
1. Backup the database A (backup database A to disk='c:\a_db.bak' with init
2. Restore database B from disk='C:\a_db.bak' with move 'logfilename' to
'path\b.mdf',
move 'loglogname' to 'path\b.ldf'
Replace path with your actual path name.
Thanks
Hari
MCDBA
"Sergei" <sergei@.kbotd.ru> wrote in message
news:#y#LzBA3DHA.560@.TK2MSFTNGP11.phx.gbl...
> I have database A on files A.mdf and A.ldf
> Using sp_detach_db and sp_attach_db I can get
> database B on files A.mdf and A.ldf
> Is there a way to get database B on B.mdf and B.ldf
> not going through the copying of individual objects.
> Thanks in advance
> Sergei|||Check books on line for the backup with MOVE to statement, it's straight
forward and useful
--
Regards,
Dandy Weyn
MCSE, MCSA, MCDBA, MCT
www.dandyman.net
"Sergei" <sergei@.kbotd.ru> wrote in message
news:%23y%23LzBA3DHA.560@.TK2MSFTNGP11.phx.gbl...
> I have database A on files A.mdf and A.ldf
> Using sp_detach_db and sp_attach_db I can get
> database B on files A.mdf and A.ldf
> Is there a way to get database B on B.mdf and B.ldf
> not going through the copying of individual objects.
> Thanks in advance
> Sergei|||To add to the other responses, you can also rename the file to the desired
names before the attach.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Sergei" <sergei@.kbotd.ru> wrote in message
news:%23y%23LzBA3DHA.560@.TK2MSFTNGP11.phx.gbl...
> I have database A on files A.mdf and A.ldf
> Using sp_detach_db and sp_attach_db I can get
> database B on files A.mdf and A.ldf
> Is there a way to get database B on B.mdf and B.ldf
> not going through the copying of individual objects.
> Thanks in advance
> Sergei