Showing posts with label existing. Show all posts
Showing posts with label existing. Show all posts

Thursday, March 29, 2012

Create as Clustered Index Error

Hi,
I am getting an error message when I try to make an already existing,
unique index, clustered. I have other databases with the same core
design, some will allow the clustered index to be created, others
display the same error. Could anyone tell me what the error message is
refering to?
Details are:
SQL2000 SP3
The column is of data type varchar.
I am using Enterprise Manager and trying to change the index through the
design - properties window.
There are no nulls in this column.
There are relationships with six other tables, all bound to this column.
Enforce relationship for replication and Enforce relationship for
INSERTs and UPDATEs are checked.
Error Message:
'Tracks' table
- Unable to create index 'PK_Tracks'.
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]
[Microsoft][ODBC SQL Server Driver][SQL Server]Location:
statisti.cpp:3222
Expression: cbStmtTxtLen/sizeof(WCHAR) <= cwchStmtTxtLen
SPID: 51
Process ID: 828
Many thanks
Gareth KingGareth King (QBVBKADUOIUJ@.spammotel.com) writes:
> I am getting an error message when I try to make an already existing,
> unique index, clustered. I have other databases with the same core
> design, some will allow the clustered index to be created, others
> display the same error. Could anyone tell me what the error message is
> refering to?
> Details are:
> SQL2000 SP3
> The column is of data type varchar.
> I am using Enterprise Manager and trying to change the index through the
> design - properties window.
> There are no nulls in this column.
> There are relationships with six other tables, all bound to this column.
> Enforce relationship for replication and Enforce relationship for
> INSERTs and UPDATEs are checked.
> Error Message:
> 'Tracks' table
> - Unable to create index 'PK_Tracks'.
> ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]
> [Microsoft][ODBC SQL Server Driver][SQL Server]Location:
> statisti.cpp:3222
> Expression: cbStmtTxtLen/sizeof(WCHAR) <= cwchStmtTxtLen
> SPID: 51
> Process ID: 828
That seems like an assertion error. An assertion error is a check
that the programmer adds to his code, to be sure that some condition
is true at this point. If they are not, he aborts, because if he
continued he could cause a big mess.
Or more concisely: this is a bug in SQL Server.
What you could try if you want to create this index as quick as
possible, is to configure SQL Server to only use one single processor
and then run the CREATE INDEX statement. These errors are often due
to problems with parallelism.
If that does not work out, I would suggest that you open a case with
Microsoft. Since this is a bug in SQL Server, any expenses you may
be charged initially, should be refunded.
--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp

Tuesday, March 27, 2012

Create a Testing Database out of existing DB

Hello All,

I was wondering if anybody can help me with the following question:

I'm working on the application where the Database, it's table (2) and several stored procedures are involved. The database is SQL Server 2000. It's also very old and involves a lot of operations, stored proc and so on. I just need to re-write a piece of the app which is using existing stored proc. Most of them are DELETE, INSERT and so on. I don't want to work with real stage DB and need to make a copy of the Database to my Dev box. So I tried:

* Right click, All Tasks, Export Data into the newly created database on my dev box.

That doesn't work, every time I try doing it, it fails somewhere in the middle of the process. I'm thinking it happens because of complexity of the database. I tried several options there already. Still nothing. I need the whole databse to be copied because I'm not sure which stored proc the app is using so I need them all, and tables too. Is there another way of doing this?

Thank you,

Tatyana

If you make a backup of the database (or detach it) you can restore it (or re-attach it) under a different name and therefore create multiple instances of it.

|||

Mark,

Thank you very much! Your suggestion worked!

Tatyana

sql

Create a table variable from an existing table's schema

Hello.
What's the best way to copy a table's schema and create a "table" data type
inside of a stored procedure?
Thanks in advance,
MikeI think your only choice will be dynamic sql, and you will not have the
chance to access this variable from the original procedure. What are you
trying to do?. Can you use a temporary table created with SELECT ... INTO ..
.
FROM?
select col1, ..., coln
into #t
from table1
where 0 = 1
...
AMB
"MikeL" wrote:

> Hello.
> What's the best way to copy a table's schema and create a "table" data typ
e
> inside of a stored procedure?
> Thanks in advance,
> Mike
>
>|||> What's the best way to copy a table's schema and create a "table" data
type
> inside of a stored procedure?
Well, if you have to rely on dynamic determination of the data model, then
in my opinion: use a temp table. You can't use SELECT INTO for @.table
variables. Some other differences are listed here:
http://www.aspfaq.com/2475
There is no substitute for understanding your data model and not having to
generate this kind of thing on the fly. Why do you need to copy the
structure at all?
Please post DDL, sample data and desired results.
See http://www.aspfaq.com/5006 for info.

Sunday, March 25, 2012

Create a sql stement from existing tables

Is there any way to automatically create a "CREATE TABLE" statment using an
existing table?
I would simply want to execute this statement and it would create, in
another database, a table with the same structure (no data).
Is there a way to do this?
cheers
nathan
hi Nathan,
Nathan wrote:
> Is there any way to automatically create a "CREATE TABLE" statment
> using an existing table?
> I would simply want to execute this statement and it would create, in
> another database, a table with the same structure (no data).
> Is there a way to do this?
not directly... you can use tools like Enterlirse Manager (if you are
licensed to) or even free tools like QALite
(http://www.rac4sql.net/qalite_main.asp) to generate thos kind of DDL...
but with some efforts you can dig into the INFORMATION_SCHEMA views to
output the desired result...
start with
http://msdn.microsoft.com/library/de...a-iz_87w3.asp,
INFORMATION_SCHEMA.COLUMNS..
this is a 5 minutes sample... if you like more deep details such as
constraints, keys, index and the like you have to expand your search on the
other INFORMATION_SCHEMA views..
SET NOCOUNT ON
USE tempdb
GO
CREATE TABLE dbo.table1 (
Id int NOT NULL PRIMARY KEY ,
vc varchar(10) NULL ,
c char(1) NOT NULL DEFAULT ('a') ,
i int ,
d decimal(18,4) NOT NULL DEFAULT 0
)
GO
DECLARE @.COLUMN_NAME nvarchar(128),
@.COLUMN_DEFAULT nvarchar(4000),
@.IS_NULLABLE varchar(3),
@.DATA_TYPE nvarchar(128),
@.NUMERIC_PRECISION tinyint,
@.NUMERIC_SCALE int,
@.COLLATION_NAME nvarchar(128),
@.CHARACTER_MAXIMUM_LENGTH smallint
DECLARE @.cmd varchar(8000)
SET @.cmd = ''
DECLARE t CURSOR FOR
SELECT c.COLUMN_NAME, c.COLUMN_DEFAULT, c.IS_NULLABLE, c.DATA_TYPE,
c.NUMERIC_PRECISION, c.NUMERIC_SCALE, c.COLLATION_NAME,
c.CHARACTER_MAXIMUM_LENGTH
FROM INFORMATION_SCHEMA.COLUMNS c
WHERE c.TABLE_SCHEMA = 'dbo'
AND c.TABLE_NAME = 'table1'
ORDER BY c.ORDINAL_POSITION
OPEN t
FETCH NEXT FROM t
INTO @.COLUMN_NAME, @.COLUMN_DEFAULT, @.IS_NULLABLE, @.DATA_TYPE,
@.NUMERIC_PRECISION, @.NUMERIC_SCALE, @.COLLATION_NAME,
@.CHARACTER_MAXIMUM_LENGTH
WHILE @.@.FETCH_STATUS = 0 BEGIN
IF DATALENGTH(@.cmd) <> 0 SET @.cmd = @.cmd + ' ,' + CHAR(10)
SET @.cmd = @.cmd + CHAR(9) + QUOTENAME( @.COLUMN_NAME )+ ' ' + @.DATA_TYPE + '
'
IF @.DATA_TYPE IN ('varchar', 'nvarchar', 'char', 'nchar')
SET @.cmd = @.cmd + '(' + CONVERT(varchar, @.CHARACTER_MAXIMUM_LENGTH) + ') '
IF @.DATA_TYPE = 'decimal' OR @.DATA_TYPE = 'numeric'
SET @.cmd = @.cmd + '(' + CONVERT(varchar, @.NUMERIC_PRECISION) + ', ' +
CONVERT(varchar, @.NUMERIC_SCALE) + ') '
IF NOT @.COLUMN_DEFAULT IS NULL
SET @.cmd = @.cmd + 'DEFAULT ' + @.COLUMN_DEFAULT + ' '
IF NOT @.COLLATION_NAME IS NULL
SET @.cmd = @.cmd + 'COLLATE ' + @.COLLATION_NAME + ' '
IF @.IS_NULLABLE = 'YES'
SET @.cmd = @.cmd + 'NULL '
ELSE
SET @.cmd = @.cmd + 'NOT NULL '
FETCH NEXT FROM t
INTO @.COLUMN_NAME, @.COLUMN_DEFAULT, @.IS_NULLABLE, @.DATA_TYPE,
@.NUMERIC_PRECISION, @.NUMERIC_SCALE, @.COLLATION_NAME,
@.CHARACTER_MAXIMUM_LENGTH
END
CLOSE t
DEALLOCATE t
SET @.cmd = 'CREATE TABLE ' + QUOTENAME('dbo') + '.' + QUOTENAME('table1') +
' (' + CHAR(10)
+ @.cmd + CHAR(10)
+ CHAR(9) + ')'
SELECT @.cmd
GO
DROP TABLE dbo.table1
--<--
CREATE TABLE [dbo].[table1] (
[Id] int NOT NULL ,
[vc] varchar (10) COLLATE Latin1_General_CI_AS NULL ,
[c] char (1) DEFAULT ('a') COLLATE Latin1_General_CI_AS NOT NULL ,
[i] int NULL ,
[d] decimal (18, 4) DEFAULT (0) NOT NULL
)
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.16.0 - DbaMgr ver 0.61.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply

Thursday, March 22, 2012

Create a modified version of an existing rendering extension

Is there any documentation or sample code to point me in the right direction
on how to modify an existing rendering extension?
I need to add some browser checking to the existing JavaScript that is
generated for the toolbar. I was hoping to modify the existing HTML 4.0
rendering to include some more browser checking to replace some of the
specific IE JavaScript properties.
Any help would be greatly appreciated.
Thanks,This is not possible. All of our renderers have link demands and therefore
could not be loaded by your assemblies.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
".Net Report Dev" <aanargyros@.hotmail.com> wrote in message
news:OwFagExeEHA.3412@.TK2MSFTNGP11.phx.gbl...
> Is there any documentation or sample code to point me in the right
direction
> on how to modify an existing rendering extension?
> I need to add some browser checking to the existing JavaScript that is
> generated for the toolbar. I was hoping to modify the existing HTML 4.0
> rendering to include some more browser checking to replace some of the
> specific IE JavaScript properties.
> Any help would be greatly appreciated.
> Thanks,
>|||Are you saying what I am trying cannot be done or that I cannot modify an
existing rendering extension. According to the books online I should be
able to modify an existing extension. If I cannot modify an existing
extension, is there any way for me to modify the toolbar JavaScript?
"Daniel Reib [MSFT]" <danreib@.online.microsoft.com> wrote in message
news:unQWaTxeEHA.2916@.TK2MSFTNGP12.phx.gbl...
> This is not possible. All of our renderers have link demands and
therefore
> could not be loaded by your assemblies.
> --
> -Daniel
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> ".Net Report Dev" <aanargyros@.hotmail.com> wrote in message
> news:OwFagExeEHA.3412@.TK2MSFTNGP11.phx.gbl...
> > Is there any documentation or sample code to point me in the right
> direction
> > on how to modify an existing rendering extension?
> >
> > I need to add some browser checking to the existing JavaScript that is
> > generated for the toolbar. I was hoping to modify the existing HTML 4.0
> > rendering to include some more browser checking to replace some of the
> > specific IE JavaScript properties.
> >
> > Any help would be greatly appreciated.
> >
> > Thanks,
> >
> >
>|||You can not modify the existing renderers. Can you point me to where in the
docs it says this?
We currently have no mechanism for modifying the JavaScript in the toolbar
so I am not sure how you could accomplish what you are trying to do.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
".Net Report Dev" <aanargyros@.hotmail.com> wrote in message
news:#XaMU8xeEHA.1656@.TK2MSFTNGP09.phx.gbl...
> Are you saying what I am trying cannot be done or that I cannot modify an
> existing rendering extension. According to the books online I should be
> able to modify an existing extension. If I cannot modify an existing
> extension, is there any way for me to modify the toolbar JavaScript?
>
> "Daniel Reib [MSFT]" <danreib@.online.microsoft.com> wrote in message
> news:unQWaTxeEHA.2916@.TK2MSFTNGP12.phx.gbl...
> > This is not possible. All of our renderers have link demands and
> therefore
> > could not be loaded by your assemblies.
> >
> > --
> > -Daniel
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> >
> >
> > ".Net Report Dev" <aanargyros@.hotmail.com> wrote in message
> > news:OwFagExeEHA.3412@.TK2MSFTNGP11.phx.gbl...
> > > Is there any documentation or sample code to point me in the right
> > direction
> > > on how to modify an existing rendering extension?
> > >
> > > I need to add some browser checking to the existing JavaScript that is
> > > generated for the toolbar. I was hoping to modify the existing HTML
4.0
> > > rendering to include some more browser checking to replace some of the
> > > specific IE JavaScript properties.
> > >
> > > Any help would be greatly appreciated.
> > >
> > > Thanks,
> > >
> > >
> >
> >
>|||Could you point me at the section in books online that you're referring to?
You cannot extend our existing rendering extensions. You can extend report
server by writing another rendering extension.
No you cannot change/add script to the report viewer or the report manager.
-Lukasz
This posting is provided "AS IS" with no warranties, and confers no rights.
".Net Report Dev" <aanargyros@.hotmail.com> wrote in message
news:%23XaMU8xeEHA.1656@.TK2MSFTNGP09.phx.gbl...
> Are you saying what I am trying cannot be done or that I cannot modify an
> existing rendering extension. According to the books online I should be
> able to modify an existing extension. If I cannot modify an existing
> extension, is there any way for me to modify the toolbar JavaScript?
>
> "Daniel Reib [MSFT]" <danreib@.online.microsoft.com> wrote in message
> news:unQWaTxeEHA.2916@.TK2MSFTNGP12.phx.gbl...
>> This is not possible. All of our renderers have link demands and
> therefore
>> could not be loaded by your assemblies.
>> --
>> -Daniel
>> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>>
>> ".Net Report Dev" <aanargyros@.hotmail.com> wrote in message
>> news:OwFagExeEHA.3412@.TK2MSFTNGP11.phx.gbl...
>> > Is there any documentation or sample code to point me in the right
>> direction
>> > on how to modify an existing rendering extension?
>> >
>> > I need to add some browser checking to the existing JavaScript that is
>> > generated for the toolbar. I was hoping to modify the existing HTML
>> > 4.0
>> > rendering to include some more browser checking to replace some of the
>> > specific IE JavaScript properties.
>> >
>> > Any help would be greatly appreciated.
>> >
>> > Thanks,
>> >
>> >
>>
>|||Is there any documentation on creating your own rendering extension?
Maybe I can create a custom toolbar within my new rendering extension and
then hide the existing toolbar using the command provided by reporting
services.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_prog_extend_security_87oi.asp
Here is a snippet.
Writing Custom Rendering Extensions
Before you decide to create a custom rendering extension, you should
evaluate simpler alternatives. You can:
a.. Create a modified version of an existing rendering extension.
b.. Customize rendered output by specifying device information settings
for existing extensions.
c.. Add custom formatting and presentation features by combining XSL
Transformations (XSLT) with the output of the XML rendering format.
"Daniel Reib [MSFT]" <danreib@.online.microsoft.com> wrote in message
news:%23L0zLVyeEHA.2764@.TK2MSFTNGP11.phx.gbl...
> You can not modify the existing renderers. Can you point me to where in
the
> docs it says this?
> We currently have no mechanism for modifying the JavaScript in the toolbar
> so I am not sure how you could accomplish what you are trying to do.
> --
> -Daniel
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> ".Net Report Dev" <aanargyros@.hotmail.com> wrote in message
> news:#XaMU8xeEHA.1656@.TK2MSFTNGP09.phx.gbl...
> > Are you saying what I am trying cannot be done or that I cannot modify
an
> > existing rendering extension. According to the books online I should be
> > able to modify an existing extension. If I cannot modify an existing
> > extension, is there any way for me to modify the toolbar JavaScript?
> >
> >
> >
> > "Daniel Reib [MSFT]" <danreib@.online.microsoft.com> wrote in message
> > news:unQWaTxeEHA.2916@.TK2MSFTNGP12.phx.gbl...
> > > This is not possible. All of our renderers have link demands and
> > therefore
> > > could not be loaded by your assemblies.
> > >
> > > --
> > > -Daniel
> > > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> > >
> > >
> > > ".Net Report Dev" <aanargyros@.hotmail.com> wrote in message
> > > news:OwFagExeEHA.3412@.TK2MSFTNGP11.phx.gbl...
> > > > Is there any documentation or sample code to point me in the right
> > > direction
> > > > on how to modify an existing rendering extension?
> > > >
> > > > I need to add some browser checking to the existing JavaScript that
is
> > > > generated for the toolbar. I was hoping to modify the existing HTML
> 4.0
> > > > rendering to include some more browser checking to replace some of
the
> > > > specific IE JavaScript properties.
> > > >
> > > > Any help would be greatly appreciated.
> > > >
> > > > Thanks,
> > > >
> > > >
> > >
> > >
> >
> >
>|||I guess I did not read the documentation correctly. It sounded to me that
you can modify the existing extensions but instead it is saying create
another version of an existing extension with your changes. If that is what
the document means than how is that an alternative to writing a new
extension? Its not like MS will give up the source so that I can just
create my own version.
"Daniel Reib [MSFT]" <danreib@.online.microsoft.com> wrote in message
news:%23L0zLVyeEHA.2764@.TK2MSFTNGP11.phx.gbl...
> You can not modify the existing renderers. Can you point me to where in
the
> docs it says this?
> We currently have no mechanism for modifying the JavaScript in the toolbar
> so I am not sure how you could accomplish what you are trying to do.
> --
> -Daniel
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> ".Net Report Dev" <aanargyros@.hotmail.com> wrote in message
> news:#XaMU8xeEHA.1656@.TK2MSFTNGP09.phx.gbl...
> > Are you saying what I am trying cannot be done or that I cannot modify
an
> > existing rendering extension. According to the books online I should be
> > able to modify an existing extension. If I cannot modify an existing
> > extension, is there any way for me to modify the toolbar JavaScript?
> >
> >
> >
> > "Daniel Reib [MSFT]" <danreib@.online.microsoft.com> wrote in message
> > news:unQWaTxeEHA.2916@.TK2MSFTNGP12.phx.gbl...
> > > This is not possible. All of our renderers have link demands and
> > therefore
> > > could not be loaded by your assemblies.
> > >
> > > --
> > > -Daniel
> > > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> > >
> > >
> > > ".Net Report Dev" <aanargyros@.hotmail.com> wrote in message
> > > news:OwFagExeEHA.3412@.TK2MSFTNGP11.phx.gbl...
> > > > Is there any documentation or sample code to point me in the right
> > > direction
> > > > on how to modify an existing rendering extension?
> > > >
> > > > I need to add some browser checking to the existing JavaScript that
is
> > > > generated for the toolbar. I was hoping to modify the existing HTML
> 4.0
> > > > rendering to include some more browser checking to replace some of
the
> > > > specific IE JavaScript properties.
> > > >
> > > > Any help would be greatly appreciated.
> > > >
> > > > Thanks,
> > > >
> > > >
> > >
> > >
> >
> >
>|||Yes, the documentation seems to be a little misleading. I will forward it
to our doc team to see if they can make it a little more clear.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
".Net Report Dev" <aanargyros@.hotmail.com> wrote in message
news:u#6YtzyeEHA.4092@.TK2MSFTNGP10.phx.gbl...
> Is there any documentation on creating your own rendering extension?
> Maybe I can create a custom toolbar within my new rendering extension and
> then hide the existing toolbar using the command provided by reporting
> services.
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_prog_extend_security_87oi.asp
> Here is a snippet.
> Writing Custom Rendering Extensions
> Before you decide to create a custom rendering extension, you should
> evaluate simpler alternatives. You can:
> a.. Create a modified version of an existing rendering extension.
> b.. Customize rendered output by specifying device information settings
> for existing extensions.
> c.. Add custom formatting and presentation features by combining XSL
> Transformations (XSLT) with the output of the XML rendering format.
>
> "Daniel Reib [MSFT]" <danreib@.online.microsoft.com> wrote in message
> news:%23L0zLVyeEHA.2764@.TK2MSFTNGP11.phx.gbl...
> > You can not modify the existing renderers. Can you point me to where in
> the
> > docs it says this?
> >
> > We currently have no mechanism for modifying the JavaScript in the
toolbar
> > so I am not sure how you could accomplish what you are trying to do.
> >
> > --
> > -Daniel
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> >
> >
> > ".Net Report Dev" <aanargyros@.hotmail.com> wrote in message
> > news:#XaMU8xeEHA.1656@.TK2MSFTNGP09.phx.gbl...
> > > Are you saying what I am trying cannot be done or that I cannot modify
> an
> > > existing rendering extension. According to the books online I should
be
> > > able to modify an existing extension. If I cannot modify an existing
> > > extension, is there any way for me to modify the toolbar JavaScript?
> > >
> > >
> > >
> > > "Daniel Reib [MSFT]" <danreib@.online.microsoft.com> wrote in message
> > > news:unQWaTxeEHA.2916@.TK2MSFTNGP12.phx.gbl...
> > > > This is not possible. All of our renderers have link demands and
> > > therefore
> > > > could not be loaded by your assemblies.
> > > >
> > > > --
> > > > -Daniel
> > > > This posting is provided "AS IS" with no warranties, and confers no
> > > rights.
> > > >
> > > >
> > > > ".Net Report Dev" <aanargyros@.hotmail.com> wrote in message
> > > > news:OwFagExeEHA.3412@.TK2MSFTNGP11.phx.gbl...
> > > > > Is there any documentation or sample code to point me in the right
> > > > direction
> > > > > on how to modify an existing rendering extension?
> > > > >
> > > > > I need to add some browser checking to the existing JavaScript
that
> is
> > > > > generated for the toolbar. I was hoping to modify the existing
HTML
> > 4.0
> > > > > rendering to include some more browser checking to replace some of
> the
> > > > > specific IE JavaScript properties.
> > > > >
> > > > > Any help would be greatly appreciated.
> > > > >
> > > > > Thanks,
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>|||Is there any documentation on creating your own rendering extension?
Maybe I can create a custom toolbar within my new rendering extension and
then hide the existing toolbar using the command provided by reporting
services.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_prog_extend_security_87oi.asp
Here is a snippet.
Writing Custom Rendering Extensions
Before you decide to create a custom rendering extension, you should
evaluate simpler alternatives. You can:
a.. Create a modified version of an existing rendering extension.
b.. Customize rendered output by specifying device information settings
for existing extensions.
c.. Add custom formatting and presentation features by combining XSL
Transformations (XSLT) with the output of the XML rendering format.
"Lukasz Pawlowski [MSFT]" <lukaszp@.online.microsoft.com> wrote in message
news:uf6ndVyeEHA.1036@.TK2MSFTNGP10.phx.gbl...
> Could you point me at the section in books online that you're referring
to?
> You cannot extend our existing rendering extensions. You can extend
report
> server by writing another rendering extension.
> No you cannot change/add script to the report viewer or the report
manager.
> -Lukasz
>
> --
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> ".Net Report Dev" <aanargyros@.hotmail.com> wrote in message
> news:%23XaMU8xeEHA.1656@.TK2MSFTNGP09.phx.gbl...
> > Are you saying what I am trying cannot be done or that I cannot modify
an
> > existing rendering extension. According to the books online I should be
> > able to modify an existing extension. If I cannot modify an existing
> > extension, is there any way for me to modify the toolbar JavaScript?
> >
> >
> >
> > "Daniel Reib [MSFT]" <danreib@.online.microsoft.com> wrote in message
> > news:unQWaTxeEHA.2916@.TK2MSFTNGP12.phx.gbl...
> >> This is not possible. All of our renderers have link demands and
> > therefore
> >> could not be loaded by your assemblies.
> >>
> >> --
> >> -Daniel
> >> This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> >>
> >>
> >> ".Net Report Dev" <aanargyros@.hotmail.com> wrote in message
> >> news:OwFagExeEHA.3412@.TK2MSFTNGP11.phx.gbl...
> >> > Is there any documentation or sample code to point me in the right
> >> direction
> >> > on how to modify an existing rendering extension?
> >> >
> >> > I need to add some browser checking to the existing JavaScript that
is
> >> > generated for the toolbar. I was hoping to modify the existing HTML
> >> > 4.0
> >> > rendering to include some more browser checking to replace some of
the
> >> > specific IE JavaScript properties.
> >> >
> >> > Any help would be greatly appreciated.
> >> >
> >> > Thanks,
> >> >
> >> >
> >>
> >>
> >
> >
>|||Is there any documentation on creating your own rendering extension that I
can use now?
"Daniel Reib [MSFT]" <danreib@.online.microsoft.com> wrote in message
news:eTRNDCzeEHA.1644@.tk2msftngp13.phx.gbl...
> Yes, the documentation seems to be a little misleading. I will forward it
> to our doc team to see if they can make it a little more clear.
> --
> -Daniel
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> ".Net Report Dev" <aanargyros@.hotmail.com> wrote in message
> news:u#6YtzyeEHA.4092@.TK2MSFTNGP10.phx.gbl...
> > Is there any documentation on creating your own rendering extension?
> > Maybe I can create a custom toolbar within my new rendering extension
and
> > then hide the existing toolbar using the command provided by reporting
> > services.
> >
> >
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_prog_extend_security_87oi.asp
> >
> > Here is a snippet.
> >
> > Writing Custom Rendering Extensions
> > Before you decide to create a custom rendering extension, you should
> > evaluate simpler alternatives. You can:
> >
> > a.. Create a modified version of an existing rendering extension.
> > b.. Customize rendered output by specifying device information
settings
> > for existing extensions.
> > c.. Add custom formatting and presentation features by combining XSL
> > Transformations (XSLT) with the output of the XML rendering format.
> >
> >
> > "Daniel Reib [MSFT]" <danreib@.online.microsoft.com> wrote in message
> > news:%23L0zLVyeEHA.2764@.TK2MSFTNGP11.phx.gbl...
> > > You can not modify the existing renderers. Can you point me to where
in
> > the
> > > docs it says this?
> > >
> > > We currently have no mechanism for modifying the JavaScript in the
> toolbar
> > > so I am not sure how you could accomplish what you are trying to do.
> > >
> > > --
> > > -Daniel
> > > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> > >
> > >
> > > ".Net Report Dev" <aanargyros@.hotmail.com> wrote in message
> > > news:#XaMU8xeEHA.1656@.TK2MSFTNGP09.phx.gbl...
> > > > Are you saying what I am trying cannot be done or that I cannot
modify
> > an
> > > > existing rendering extension. According to the books online I
should
> be
> > > > able to modify an existing extension. If I cannot modify an
existing
> > > > extension, is there any way for me to modify the toolbar JavaScript?
> > > >
> > > >
> > > >
> > > > "Daniel Reib [MSFT]" <danreib@.online.microsoft.com> wrote in message
> > > > news:unQWaTxeEHA.2916@.TK2MSFTNGP12.phx.gbl...
> > > > > This is not possible. All of our renderers have link demands and
> > > > therefore
> > > > > could not be loaded by your assemblies.
> > > > >
> > > > > --
> > > > > -Daniel
> > > > > This posting is provided "AS IS" with no warranties, and confers
no
> > > > rights.
> > > > >
> > > > >
> > > > > ".Net Report Dev" <aanargyros@.hotmail.com> wrote in message
> > > > > news:OwFagExeEHA.3412@.TK2MSFTNGP11.phx.gbl...
> > > > > > Is there any documentation or sample code to point me in the
right
> > > > > direction
> > > > > > on how to modify an existing rendering extension?
> > > > > >
> > > > > > I need to add some browser checking to the existing JavaScript
> that
> > is
> > > > > > generated for the toolbar. I was hoping to modify the existing
> HTML
> > > 4.0
> > > > > > rendering to include some more browser checking to replace some
of
> > the
> > > > > > specific IE JavaScript properties.
> > > > > >
> > > > > > Any help would be greatly appreciated.
> > > > > >
> > > > > > Thanks,
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>|||So, although the documentation alludes to modifying an existing rendering
extension, what it is actually referring to is creating a version of a
rendering extension that is similar to ones that we already have. That is,
writing a new HTML rendering extension. I must admit that it is misleading
and that writing one of our rendering extensions from scratch is not a
"simpler alternative."
Writing a rendering extension is no simple matter, in fact, it is one of the
most challenging development experiences I have seen at Microsoft. Please
see the following blog post for my take:
http://blogs.msdn.com/bryanke/archive/2004/03/16/90797.aspx
The Reporting Services team, in light of other key deliverables, elected not
to document rendering extensions in version 1 of Reporting Services because
it was considered a low usage task (only a few select partners ever
expressed an interest in developing one and only a handful have ever
successfully done it and that is after spending months with our developers
hands-on).
It is not an end-user feature and is not something for the average or even
advanced developer. If you are interested, we have included documentation
for rendering extensions in our SQL Server 2005 Books Online that was
released with SQL Server 2005 Beta 2 recently. We hope to someday create an
SDK that will explain rendering extensions in more detail, but that is
probably a ways off.
Bryan
--
Bryan Keller
Developer Documentation
SQL Server Reporting Services
A friendly reminder that this posting is provided "AS IS" with no
warranties, and confers no rights.
".Net Report Dev" <aanargyros@.hotmail.com> wrote in message
news:eB9luSzeEHA.1692@.tk2msftngp13.phx.gbl...
> Is there any documentation on creating your own rendering extension?
> Maybe I can create a custom toolbar within my new rendering extension and
> then hide the existing toolbar using the command provided by reporting
> services.
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_prog_extend_security_87oi.asp
> Here is a snippet.
> Writing Custom Rendering Extensions
> Before you decide to create a custom rendering extension, you should
> evaluate simpler alternatives. You can:
> a.. Create a modified version of an existing rendering extension.
> b.. Customize rendered output by specifying device information settings
> for existing extensions.
> c.. Add custom formatting and presentation features by combining XSL
> Transformations (XSLT) with the output of the XML rendering format.
> "Lukasz Pawlowski [MSFT]" <lukaszp@.online.microsoft.com> wrote in message
> news:uf6ndVyeEHA.1036@.TK2MSFTNGP10.phx.gbl...
> > Could you point me at the section in books online that you're referring
> to?
> > You cannot extend our existing rendering extensions. You can extend
> report
> > server by writing another rendering extension.
> >
> > No you cannot change/add script to the report viewer or the report
> manager.
> >
> > -Lukasz
> >
> >
> > --
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> >
> >
> > ".Net Report Dev" <aanargyros@.hotmail.com> wrote in message
> > news:%23XaMU8xeEHA.1656@.TK2MSFTNGP09.phx.gbl...
> > > Are you saying what I am trying cannot be done or that I cannot modify
> an
> > > existing rendering extension. According to the books online I should
be
> > > able to modify an existing extension. If I cannot modify an existing
> > > extension, is there any way for me to modify the toolbar JavaScript?
> > >
> > >
> > >
> > > "Daniel Reib [MSFT]" <danreib@.online.microsoft.com> wrote in message
> > > news:unQWaTxeEHA.2916@.TK2MSFTNGP12.phx.gbl...
> > >> This is not possible. All of our renderers have link demands and
> > > therefore
> > >> could not be loaded by your assemblies.
> > >>
> > >> --
> > >> -Daniel
> > >> This posting is provided "AS IS" with no warranties, and confers no
> > > rights.
> > >>
> > >>
> > >> ".Net Report Dev" <aanargyros@.hotmail.com> wrote in message
> > >> news:OwFagExeEHA.3412@.TK2MSFTNGP11.phx.gbl...
> > >> > Is there any documentation or sample code to point me in the right
> > >> direction
> > >> > on how to modify an existing rendering extension?
> > >> >
> > >> > I need to add some browser checking to the existing JavaScript that
> is
> > >> > generated for the toolbar. I was hoping to modify the existing
HTML
> > >> > 4.0
> > >> > rendering to include some more browser checking to replace some of
> the
> > >> > specific IE JavaScript properties.
> > >> >
> > >> > Any help would be greatly appreciated.
> > >> >
> > >> > Thanks,
> > >> >
> > >> >
> > >>
> > >>
> > >
> > >
> >
> >
>

create a empty DB from a existing DB

how to: create a empty DB from a existing DB keeping all fields and keys intact

A clean way to create an empty database from an existing populated database is to script all the database objects in the database including Stored Procedures, Tables, User-defined data types and Views. Follow these steps in SQL Server 2005:

1. In SQL Server Management Studio, right-click the database and click Tasks > Generate Scripts...

2. Click the Next button on the Welcome dialog box.

3. Check the "Script all objects in the selected database" option and click the Finish button. The script will be generated and dumped into a query window.

4. Save the script as a SQL Server script file.

5. Run the script file on your destination server to recreate the database without the data.

Hope this helps.

|||Is there a way to generate scripts that also contain the data?

create a empty DB from a existing DB

how to: create a empty DB from a existing DB keeping all fields and keys intact

A clean way to create an empty database from an existing populated database is to script all the database objects in the database including Stored Procedures, Tables, User-defined data types and Views. Follow these steps in SQL Server 2005:

1. In SQL Server Management Studio, right-click the database and click Tasks > Generate Scripts...

2. Click the Next button on the Welcome dialog box.

3. Check the "Script all objects in the selected database" option and click the Finish button. The script will be generated and dumped into a query window.

4. Save the script as a SQL Server script file.

5. Run the script file on your destination server to recreate the database without the data.

Hope this helps.

|||Is there a way to generate scripts that also contain the data?

Create a database based on an existing one?

I want to create one databse with exactly the same tables as another, is that possible?Yes, you can use the Transfer object to create a script that recreates all objects in a target database. See the ScriptTransfer() method.

Tuesday, March 20, 2012

Create a copy of database

Dear all,
From SQL Enterprise Manager, how to create a copy of existing database ?
i.e. there is a database called GL2005 and I want a copy of GL2005 with the
name called GL2006.
Thanks.
Vensia
1. backup/restore
2. deattach, copy files, attach
3. Use DTS or SSIS (depending upon version)
Mike
Mentor
Solid Quality Learning
http://www.solidqualitylearning.com
"Vensia" <vensia2000_nospam@.yahoo.com> wrote in message
news:%23S$lcr1DGHA.2924@.tk2msftngp13.phx.gbl...
> Dear all,
> From SQL Enterprise Manager, how to create a copy of existing database ?
> i.e. there is a database called GL2005 and I want a copy of GL2005 with
> the
> name called GL2006.
> Thanks.
> Vensia
>
|||Hi
You may want to check out the following articles that describe the
techniques Mike has suggested
http://support.microsoft.com/kb/304692/ if using backup/restore you will
need to use the MOVE option to change the file names for the new database
http://support.microsoft.com/kb/221465/
If you are using detach/attach the existing database will be offline while
you copy the files and you will need to attach the original database as well
as the new one:
http://support.microsoft.com/kb/2240...22120121120120
Both of these methods would not remove the data in any way, and any
subsequent changes to the old database will not be reflected in the new one
(and vice-versa), therefore you may be only required to take the backup and
save it. (after checking that the backup has worked!).
John
"Vensia" <vensia2000_nospam@.yahoo.com> wrote in message
news:%23S$lcr1DGHA.2924@.tk2msftngp13.phx.gbl...
> Dear all,
> From SQL Enterprise Manager, how to create a copy of existing database ?
> i.e. there is a database called GL2005 and I want a copy of GL2005 with
> the
> name called GL2006.
> Thanks.
> Vensia
>
|||John & Michael,
Thanks for helping.
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:O8LupD4DGHA.2380@.TK2MSFTNGP12.phx.gbl...
> Hi
> You may want to check out the following articles that describe the
> techniques Mike has suggested
> http://support.microsoft.com/kb/304692/ if using backup/restore you will
> need to use the MOVE option to change the file names for the new database
> http://support.microsoft.com/kb/221465/
> If you are using detach/attach the existing database will be offline while
> you copy the files and you will need to attach the original database as
well
> as the new one:
> http://support.microsoft.com/kb/2240...22120121120120
> Both of these methods would not remove the data in any way, and any
> subsequent changes to the old database will not be reflected in the new
one
> (and vice-versa), therefore you may be only required to take the backup
and
> save it. (after checking that the backup has worked!).
> John
> "Vensia" <vensia2000_nospam@.yahoo.com> wrote in message
> news:%23S$lcr1DGHA.2924@.tk2msftngp13.phx.gbl...
>

Create a copy of database

Dear all,
From SQL Enterprise Manager, how to create a copy of existing database ?
i.e. there is a database called GL2005 and I want a copy of GL2005 with the
name called GL2006.
Thanks.
Vensia1. backup/restore
2. deattach, copy files, attach
3. Use DTS or SSIS (depending upon version)
Mike
Mentor
Solid Quality Learning
http://www.solidqualitylearning.com
"Vensia" <vensia2000_nospam@.yahoo.com> wrote in message
news:%23S$lcr1DGHA.2924@.tk2msftngp13.phx.gbl...
> Dear all,
> From SQL Enterprise Manager, how to create a copy of existing database ?
> i.e. there is a database called GL2005 and I want a copy of GL2005 with
> the
> name called GL2006.
> Thanks.
> Vensia
>|||Hi
You may want to check out the following articles that describe the
techniques Mike has suggested
http://support.microsoft.com/kb/304692/ if using backup/restore you will
need to use the MOVE option to change the file names for the new database
http://support.microsoft.com/kb/221465/
If you are using detach/attach the existing database will be offline while
you copy the files and you will need to attach the original database as well
as the new one:
http://support.microsoft.com/kb/224...122120121120120
Both of these methods would not remove the data in any way, and any
subsequent changes to the old database will not be reflected in the new one
(and vice-versa), therefore you may be only required to take the backup and
save it. (after checking that the backup has worked!).
John
"Vensia" <vensia2000_nospam@.yahoo.com> wrote in message
news:%23S$lcr1DGHA.2924@.tk2msftngp13.phx.gbl...
> Dear all,
> From SQL Enterprise Manager, how to create a copy of existing database ?
> i.e. there is a database called GL2005 and I want a copy of GL2005 with
> the
> name called GL2006.
> Thanks.
> Vensia
>|||John & Michael,
Thanks for helping.
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:O8LupD4DGHA.2380@.TK2MSFTNGP12.phx.gbl...
> Hi
> You may want to check out the following articles that describe the
> techniques Mike has suggested
> http://support.microsoft.com/kb/304692/ if using backup/restore you will
> need to use the MOVE option to change the file names for the new database
> http://support.microsoft.com/kb/221465/
> If you are using detach/attach the existing database will be offline while
> you copy the files and you will need to attach the original database as
well
> as the new one:
> http://support.microsoft.com/kb/224...122120121120120
> Both of these methods would not remove the data in any way, and any
> subsequent changes to the old database will not be reflected in the new
one
> (and vice-versa), therefore you may be only required to take the backup
and
> save it. (after checking that the backup has worked!).
> John
> "Vensia" <vensia2000_nospam@.yahoo.com> wrote in message
> news:%23S$lcr1DGHA.2924@.tk2msftngp13.phx.gbl...
>

Create a copy of database

Dear all,
From SQL Enterprise Manager, how to create a copy of existing database ?
i.e. there is a database called GL2005 and I want a copy of GL2005 with the
name called GL2006.
Thanks.
Vensia1. backup/restore
2. deattach, copy files, attach
3. Use DTS or SSIS (depending upon version)
--
Mike
Mentor
Solid Quality Learning
http://www.solidqualitylearning.com
"Vensia" <vensia2000_nospam@.yahoo.com> wrote in message
news:%23S$lcr1DGHA.2924@.tk2msftngp13.phx.gbl...
> Dear all,
> From SQL Enterprise Manager, how to create a copy of existing database ?
> i.e. there is a database called GL2005 and I want a copy of GL2005 with
> the
> name called GL2006.
> Thanks.
> Vensia
>|||Hi
You may want to check out the following articles that describe the
techniques Mike has suggested
http://support.microsoft.com/kb/304692/ if using backup/restore you will
need to use the MOVE option to change the file names for the new database
http://support.microsoft.com/kb/221465/
If you are using detach/attach the existing database will be offline while
you copy the files and you will need to attach the original database as well
as the new one:
http://support.microsoft.com/kb/224071/#XSLTH3125121122120121120120
Both of these methods would not remove the data in any way, and any
subsequent changes to the old database will not be reflected in the new one
(and vice-versa), therefore you may be only required to take the backup and
save it. (after checking that the backup has worked!).
John
"Vensia" <vensia2000_nospam@.yahoo.com> wrote in message
news:%23S$lcr1DGHA.2924@.tk2msftngp13.phx.gbl...
> Dear all,
> From SQL Enterprise Manager, how to create a copy of existing database ?
> i.e. there is a database called GL2005 and I want a copy of GL2005 with
> the
> name called GL2006.
> Thanks.
> Vensia
>|||John & Michael,
Thanks for helping.
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:O8LupD4DGHA.2380@.TK2MSFTNGP12.phx.gbl...
> Hi
> You may want to check out the following articles that describe the
> techniques Mike has suggested
> http://support.microsoft.com/kb/304692/ if using backup/restore you will
> need to use the MOVE option to change the file names for the new database
> http://support.microsoft.com/kb/221465/
> If you are using detach/attach the existing database will be offline while
> you copy the files and you will need to attach the original database as
well
> as the new one:
> http://support.microsoft.com/kb/224071/#XSLTH3125121122120121120120
> Both of these methods would not remove the data in any way, and any
> subsequent changes to the old database will not be reflected in the new
one
> (and vice-versa), therefore you may be only required to take the backup
and
> save it. (after checking that the backup has worked!).
> John
> "Vensia" <vensia2000_nospam@.yahoo.com> wrote in message
> news:%23S$lcr1DGHA.2924@.tk2msftngp13.phx.gbl...
> > Dear all,
> >
> > From SQL Enterprise Manager, how to create a copy of existing database ?
> > i.e. there is a database called GL2005 and I want a copy of GL2005 with
> > the
> > name called GL2006.
> > Thanks.
> >
> > Vensia
> >
> >
>

Create .sdf from Existing SQL Server 2005 DB

Hello ,

1.Is there a way to generate an .sdf (SQL CE DB) from an existing SQL Server 2005 DB?

So that the sdf file has the same tables and data as SQL server 2005 DB.

2.Is there a way to copy data in Excel file to an .sdf file (SQL CE DB)?

Thanks,

Rookie

Some of the tools from www.primeworks-mobile.com should be able to help you. Also, you can pull the tables from the server with RDA, but you may have to recreate constraints.

Excel data: One solution would be to import Excel data to a SQL Server table, and use the options described above.

|||

Hello Erik,

Thanks for the info on tool.

Hope future versions of SQL management studio come with this functionality.

Thanks,

Rookie

|||According to MS, a "Data Migration Wizard" will appear in the SQL Compact 3.5 timeframe, which should be abel to perform schema and data migration.|||Refer to http://sourceforge.net/projects/sqlceviewer/
It is a utility to do just what you want.

Create .sdf from Existing SQL Server 2005 DB

Hello ,

1.Is there a way to generate an .sdf (SQL CE DB) from an existing SQL Server 2005 DB?

So that the sdf file has the same tables and data as SQL server 2005 DB.

2.Is there a way to copy data in Excel file to an .sdf file (SQL CE DB)?

Thanks,

Rookie

Some of the tools from www.primeworks-mobile.com should be able to help you. Also, you can pull the tables from the server with RDA, but you may have to recreate constraints.

Excel data: One solution would be to import Excel data to a SQL Server table, and use the options described above.

|||

Hello Erik,

Thanks for the info on tool.

Hope future versions of SQL management studio come with this functionality.

Thanks,

Rookie

|||According to MS, a "Data Migration Wizard" will appear in the SQL Compact 3.5 timeframe, which should be abel to perform schema and data migration.|||Refer to http://sourceforge.net/projects/sqlceviewer/
It is a utility to do just what you want.

Create .sdf from Existing SQL Server 2005 DB

Hello ,

1.Is there a way to generate an .sdf (SQL CE DB) from an existing SQL Server 2005 DB?

So that the sdf file has the same tables and data as SQL server 2005 DB.

2.Is there a way to copy data in Excel file to an .sdf file (SQL CE DB)?

Thanks,

Rookie

Some of the tools from www.primeworks-mobile.com should be able to help you. Also, you can pull the tables from the server with RDA, but you may have to recreate constraints.

Excel data: One solution would be to import Excel data to a SQL Server table, and use the options described above.

|||

Hello Erik,

Thanks for the info on tool.

Hope future versions of SQL management studio come with this functionality.

Thanks,

Rookie

|||According to MS, a "Data Migration Wizard" will appear in the SQL Compact 3.5 timeframe, which should be abel to perform schema and data migration.|||Refer to http://sourceforge.net/projects/sqlceviewer/
It is a utility to do just what you want.
sql