Showing posts with label client. Show all posts
Showing posts with label client. Show all posts

Friday, March 30, 2012

Scripting creation of server alias

Does anyone know if there's a way to script creation of a server alias,
as you can do using the Client Network Utility?
allancady@.yahoo.com wrote:
> Does anyone know if there's a way to script creation of a server
> alias, as you can do using the Client Network Utility?
Do you mean from a T-SQL script? The utility just writes to the
registration database. Sniff the regdb while you perform adding a new
alias and see where it goes. Then you can use any programming tool or
just a .reg file to add the new data to everyones PC. From a domain this
is easy.
You can sniff the regdb using free tools from www.sysinternals.com
David Gugick
Imceda Software
www.imceda.com

Scripting creation of server alias

Does anyone know if there's a way to script creation of a server alias,
as you can do using the Client Network Utility?allancady@.yahoo.com wrote:
> Does anyone know if there's a way to script creation of a server
> alias, as you can do using the Client Network Utility?
Do you mean from a T-SQL script? The utility just writes to the
registration database. Sniff the regdb while you perform adding a new
alias and see where it goes. Then you can use any programming tool or
just a .reg file to add the new data to everyones PC. From a domain this
is easy.
You can sniff the regdb using free tools from www.sysinternals.com
David Gugick
Imceda Software
www.imceda.com

Scripting a database

I just starting working for a new client this week. They have a custom install program written in VB.NET which installs the database to SQL Server 2000. Normally, when I want to create a SQL script to create a database, I would go into Enterprise Manager, right-click on a database, and select All Tasks | Generate SQL Script. However, that's not how this client works. Much to my horror, the CREATE DATABASE, CREATE TABLE, etc. statements are both hard-coded and hand-coded within the install program itself. When I asked them why they weren't using SQL Server's scripting capabilities to automatically generate the script, they said that SQL Server scripting is buggy and that it doesn't work properly. It was hard getting specific details but they said it would leave out indexes, for example. Now, I'm no SQL Server expert, but I've never had a problem using SQL Server's scripting capabilities. The database they use isn't that big - maybe 20-30 tables. So, before I make an issue out of it, I was wondering what everyone else's experience with SQL Server 2000's scripting features? If you've used SQL Servers scripting to recreate a database, does it work? Did you have issues?The script is the same whether you run it all together through one or more script files versus issuing the commands one be one from an installer. Perhaps they had trouble with the ordering of the index creating script so that it was being called at the wrong time. Either that or some other dependancy was out of synch. In any event it shouldn't be the script per se but the order that it is being applied.

Maybe if you can see one of the script that failed you could figure out what's going on.|||They're not using SQL Server 2000's scripting capabilities at all. All the DDL statements are hand coded in the VB.NET installation program. This seems like a time-consuming and error-prone process. They said that the reason why they are not using SQL Server's script generation feature is because it is broken.|||What I meant was that the script is just a bunch of DDL as is the hand-coding. If there is a problem with the Sql Server generated script it's probably that something is in the wrong order and/or they didn't include the necessary checkboxes to includes indices "Options" tab.

But if their hand-generated DDL is working fine then I wouldn't mess with it. What they might want to do is place it all into a text file (don't call it a script...) and have the installer read that in and execute it. This text file can then be an embedded resource inside the install so that it's not visible to users but can be accessed inside the installer as if it were just another file. This at least would get all the DDL together in one place and not need to be intermixed with the code. There is a walk through for this in the VS.Net help system in the Windows installer section.|||Right now, the client has just one developer. However, my consulting company will probably be adding another 3 developers. I'm the architect/lead developer; we don't have a DBA. Including myself, that means a total of 5 developers will probably be working on the project. I'm worried that with 5 developers, the database could get f**cked up. Obviously, I need some sort of process to ensure the database 'integrity' remains intact.|||Are you just working with a single instance of the database or do you have to worry about multiple instances of the same db installed at different locations?

Do you have SourceSafe or equivalent? You could keep the scripts or installer code that does it there in order to maintain some control and accountability. You'd perhaps want to make it fine grained enough so that it's not just one file that someone always has checked out. I like to have "If then else" scripts for most database objects. If a table doesn't exist, create it. If it does exist check each column. If a column doesn't exist create it. This is a bit of a pain to set up initially but is relatively easy to maintain thereafter.|||There will be multiple instances of the database at remote locations to worry about. These remote locations will be our customers.

No, they are not using source control. We already discussed the importance of source control with them. We'll set up VSS as soon as we get additional developers.

Friday, March 23, 2012

Script to create and load a database

Dear all,
I am very new to SQL Server but must say I find it and the GUI tools
very good.
I am now in a position where I need to supply a client with a script
file to create a database, create tables within it and then load the
tables.
I have a script that will create the tables and also have exported the
contents to comma separated files.
If someone could supply a sample set of script commands that would:
create a standard database
creat a user in it called "foo" and make this user the db owner
create tables owned by foo
load the data from an export file
I would be very grateful.
Also, how would I run such a script.
Thanks in advance
Ed
PS I am willing to learn - if there is a page or manual where I can
find this out myself tell me to RTFM ;-) (But please let me know where
it is!)> If someone could supply a sample set of script commands that would: (...)
> PS I am willing to learn - if there is a page or manual where I can
> find this out myself tell me to RTFM ;-) (But please let me know where
> it is!)
See SQL Server manual - "SQL Books Online" \Microsoft SQL
Server\80\Tools\BOOKS\SQL80.col
Online MSDN resources on SQL2k -
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/html/sqlserver2000.asp
> Also, how would I run such a script.
In SQL Query Analyzer
sincerely,
--
Sebastian K. Zaklada
Skilled Software
http://www.skilledsoftware.com
This posting is provided "AS IS" with no warranties, and confers no rights.

Script to create and load a database

Dear all,
I am very new to SQL Server but must say I find it and the GUI tools
very good.
I am now in a position where I need to supply a client with a script
file to create a database, create tables within it and then load the
tables.
I have a script that will create the tables and also have exported the
contents to comma separated files.
If someone could supply a sample set of script commands that would:
create a standard database
creat a user in it called "foo" and make this user the db owner
create tables owned by foo
load the data from an export file
I would be very grateful.
Also, how would I run such a script.
Thanks in advance
Ed
PS I am willing to learn - if there is a page or manual where I can
find this out myself tell me to RTFM ;-) (But please let me know where
it is!)> If someone could supply a sample set of script commands that would: (...)
> PS I am willing to learn - if there is a page or manual where I can
> find this out myself tell me to RTFM ;-) (But please let me know where
> it is!)
See SQL Server manual - "SQL Books Online" \Microsoft SQL
Server\80\Tools\BOOKS\SQL80.col
Online MSDN resources on SQL2k -
http://msdn.microsoft.com/library/d...
server2000.asp

> Also, how would I run such a script.
In SQL Query Analyzer
sincerely,
--
Sebastian K. Zaklada
Skilled Software
http://www.skilledsoftware.com
This posting is provided "AS IS" with no warranties, and confers no rights.

Wednesday, March 21, 2012

Script Task debug error

Good afternoon -

Info:

Microsoft SQL Server Management Studio 9.00.1399.00
Microsoft Analysis Services Client Tools 2005.090.1399.00
Microsoft Data Access Components (MDAC) 2000.085.1117.00 (xpsp_sp2_rtm.040803-2158)
Microsoft MSXML 2.6 3.0 4.0 5.0 6.0
Microsoft Internet Explorer 6.0.2900.2180
Microsoft .NET Framework 2.0.50727.42
Operating System 5.1.2600

I am trying to debug a script task within a SSIS package by setting a breakpoint within the design window of teh script taks and I get the following error:

EventType : clr20r3 P1 : dtattach.exe P2 : 9.0.242.0 P3 : 434f5e26
P4 : microsoft.sqlserver.scripttask P5 : 9.0.242.0 P6 : 434f5e02
P7 : 4f P8 : 0 P9 : pszqoadhx1u5zahbhohghldgiy4qixhx

Other packages within the solution have script tasks and I can debug these with no problem. This particular script task has constanly given me this error.

Please let me know if there is additional information that I need to provide to facilitate a solution.

Respectfully,

James

I kind of figured nobody would tackle this...|||Looks like a nasty error, and one that should not occur. You could try breaking down the task to try and isolate the cause, as obviously not all scripts do it, so what part of this one does cause the issue. Even if you find it, unless you can change what you are doing it will not fix it, but you may then be able to log a support case with MS giving them more information. You could just log a call now, it does seem like something is very wrong, since the normal task/VSA error handling is not catching this.|||

Thanks for the reply. I will log an incident with MS to resolve this. It's odd because the script task functions properly, I just can't debug this particular task. When the debugger begins, the text displayed is from a totally different script task and a box pops up saying that, "Microsoft Visual Studio has lost the link to your application and will attempt to recover when you logoff."

Respectfully,

James

|||

Hi

I had a similar issue, the details of which can be found below. I believe my issue was around a line of code that assigned a string containing a string of xml directly to a dts string variable:

Dts.Variables("CaseDetail").Value = myNode.OuterXml.ToString()

I removed the above line, copied the script, deleted the script task, added a new script task and then pasted back in the code without the above line. The code then debugged fine but I still needed to save the OuterXml so I assigned it to a string variable first:

Dim outerXML As String

outerXML = myNode.OuterXml.ToString()

Dts.Variables("CaseDetail").Value = outerXML

This seems to work ok and debugs too. I'm not sure why I couldn't assign directly to the dts variable, but I'm more of a c# man these days, so maybe my VB skills are to blame.

My Error:

Event Type: Error
Event Source: .NET Runtime 2.0 Error Reporting
Event Category: None
Event ID: 5000
Date: 28/06/2006
Time: 14:01:16
User: N/A
Computer: ****
Description:
EventType clr20r3, P1 dtattach.exe, P2 9.0.242.0, P3 434f5e26, P4 microsoft.sqlserver.scripttask, P5 9.0.242.0, P6 434f5e02, P7 4f, P8 0, P9 pszqoadhx1u5zahbhohghldgiy4qixhx, P10 NIL.
Data:

|||

Was facing the same issue even after trying all of the above.

Have found workaround for this annoying problem

Everytime you get this error, right click on the problematic project in solution explorer and select 'clean' and then select 'rebuild'

Debugging should then work ok.

ta

arun

|||

Thanks Arun,

I tried ur stuff and it worked. I had been having hard time debugging my scripts and used to get this error evrytime.

Thanks again,

Mohit

|||

MohitGupta wrote:

Thanks Arun,

I tried ur stuff and it worked. I had been having hard time debugging my scripts and used to get this error evrytime.

Thanks again,

Mohit

If someone replies with an answer please could you mark it as such. This helps when other people are searchig the forums for answers to their own questions.

Thanks

|||

Hello,

I've got the same problem here. Previous week i had no probleme, now i'm not able to put a breakpoint in any of my scripts. This cause a crash... it is very annoying

Version of server 9.0.3153 32 bit

Version of client 9.0.3142 32 bit (last sp2 + hotfixes) - dotnet framework 2.0 + sp2

What change since then : update in windows defender...

I suspect a problem with the antivirus, or windows defender preventing the script from debugging...

sql

Script Task debug error

Good afternoon -

Info:

Microsoft SQL Server Management Studio 9.00.1399.00
Microsoft Analysis Services Client Tools 2005.090.1399.00
Microsoft Data Access Components (MDAC) 2000.085.1117.00 (xpsp_sp2_rtm.040803-2158)
Microsoft MSXML 2.6 3.0 4.0 5.0 6.0
Microsoft Internet Explorer 6.0.2900.2180
Microsoft .NET Framework 2.0.50727.42
Operating System 5.1.2600

I am trying to debug a script task within a SSIS package by setting a breakpoint within the design window of teh script taks and I get the following error:

EventType : clr20r3 P1 : dtattach.exe P2 : 9.0.242.0 P3 : 434f5e26
P4 : microsoft.sqlserver.scripttask P5 : 9.0.242.0 P6 : 434f5e02
P7 : 4f P8 : 0 P9 : pszqoadhx1u5zahbhohghldgiy4qixhx

Other packages within the solution have script tasks and I can debug these with no problem. This particular script task has constanly given me this error.

Please let me know if there is additional information that I need to provide to facilitate a solution.

Respectfully,

James

I kind of figured nobody would tackle this...|||Looks like a nasty error, and one that should not occur. You could try breaking down the task to try and isolate the cause, as obviously not all scripts do it, so what part of this one does cause the issue. Even if you find it, unless you can change what you are doing it will not fix it, but you may then be able to log a support case with MS giving them more information. You could just log a call now, it does seem like something is very wrong, since the normal task/VSA error handling is not catching this.|||

Thanks for the reply. I will log an incident with MS to resolve this. It's odd because the script task functions properly, I just can't debug this particular task. When the debugger begins, the text displayed is from a totally different script task and a box pops up saying that, "Microsoft Visual Studio has lost the link to your application and will attempt to recover when you logoff."

Respectfully,

James

|||

Hi

I had a similar issue, the details of which can be found below. I believe my issue was around a line of code that assigned a string containing a string of xml directly to a dts string variable:

Dts.Variables("CaseDetail").Value = myNode.OuterXml.ToString()

I removed the above line, copied the script, deleted the script task, added a new script task and then pasted back in the code without the above line. The code then debugged fine but I still needed to save the OuterXml so I assigned it to a string variable first:

Dim outerXML AsString

outerXML = myNode.OuterXml.ToString()

Dts.Variables("CaseDetail").Value = outerXML

This seems to work ok and debugs too. I'm not sure why I couldn't assign directly to the dts variable, but I'm more of a c# man these days, so maybe my VB skills are to blame.

My Error:

Event Type: Error
Event Source: .NET Runtime 2.0 Error Reporting
Event Category: None
Event ID: 5000
Date: 28/06/2006
Time: 14:01:16
User: N/A
Computer: ****
Description:
EventType clr20r3, P1 dtattach.exe, P2 9.0.242.0, P3 434f5e26, P4 microsoft.sqlserver.scripttask, P5 9.0.242.0, P6 434f5e02, P7 4f, P8 0, P9 pszqoadhx1u5zahbhohghldgiy4qixhx, P10 NIL.
Data:

|||

Was facing the same issue even after trying all of the above.

Have found workaround for this annoying problem

Everytime you get this error, right click on the problematic project in solution explorer and select 'clean' and then select 'rebuild'

Debugging should then work ok.

ta

arun

|||

Thanks Arun,

I tried ur stuff and it worked. I had been having hard time debugging my scripts and used to get this error evrytime.

Thanks again,

Mohit

|||

MohitGupta wrote:

Thanks Arun,

I tried ur stuff and it worked. I had been having hard time debugging my scripts and used to get this error evrytime.

Thanks again,

Mohit

If someone replies with an answer please could you mark it as such. This helps when other people are searchig the forums for answers to their own questions.

Thanks

|||

Hello,

I've got the same problem here. Previous week i had no probleme, now i'm not able to put a breakpoint in any of my scripts. This cause a crash... it is very annoying

Version of server 9.0.3153 32 bit

Version of client 9.0.3142 32 bit (last sp2 + hotfixes) - dotnet framework 2.0 + sp2

What change since then : update in windows defender...

I suspect a problem with the antivirus, or windows defender preventing the script from debugging...

Script Task debug error

Good afternoon -

Info:

Microsoft SQL Server Management Studio 9.00.1399.00
Microsoft Analysis Services Client Tools 2005.090.1399.00
Microsoft Data Access Components (MDAC) 2000.085.1117.00 (xpsp_sp2_rtm.040803-2158)
Microsoft MSXML 2.6 3.0 4.0 5.0 6.0
Microsoft Internet Explorer 6.0.2900.2180
Microsoft .NET Framework 2.0.50727.42
Operating System 5.1.2600

I am trying to debug a script task within a SSIS package by setting a breakpoint within the design window of teh script taks and I get the following error:

EventType : clr20r3 P1 : dtattach.exe P2 : 9.0.242.0 P3 : 434f5e26
P4 : microsoft.sqlserver.scripttask P5 : 9.0.242.0 P6 : 434f5e02
P7 : 4f P8 : 0 P9 : pszqoadhx1u5zahbhohghldgiy4qixhx

Other packages within the solution have script tasks and I can debug these with no problem. This particular script task has constanly given me this error.

Please let me know if there is additional information that I need to provide to facilitate a solution.

Respectfully,

James

I kind of figured nobody would tackle this...|||Looks like a nasty error, and one that should not occur. You could try breaking down the task to try and isolate the cause, as obviously not all scripts do it, so what part of this one does cause the issue. Even if you find it, unless you can change what you are doing it will not fix it, but you may then be able to log a support case with MS giving them more information. You could just log a call now, it does seem like something is very wrong, since the normal task/VSA error handling is not catching this.|||

Thanks for the reply. I will log an incident with MS to resolve this. It's odd because the script task functions properly, I just can't debug this particular task. When the debugger begins, the text displayed is from a totally different script task and a box pops up saying that, "Microsoft Visual Studio has lost the link to your application and will attempt to recover when you logoff."

Respectfully,

James

|||

Hi

I had a similar issue, the details of which can be found below. I believe my issue was around a line of code that assigned a string containing a string of xml directly to a dts string variable:

Dts.Variables("CaseDetail").Value = myNode.OuterXml.ToString()

I removed the above line, copied the script, deleted the script task, added a new script task and then pasted back in the code without the above line. The code then debugged fine but I still needed to save the OuterXml so I assigned it to a string variable first:

Dim outerXML As String

outerXML = myNode.OuterXml.ToString()

Dts.Variables("CaseDetail").Value = outerXML

This seems to work ok and debugs too. I'm not sure why I couldn't assign directly to the dts variable, but I'm more of a c# man these days, so maybe my VB skills are to blame.

My Error:

Event Type: Error
Event Source: .NET Runtime 2.0 Error Reporting
Event Category: None
Event ID: 5000
Date: 28/06/2006
Time: 14:01:16
User: N/A
Computer: ****
Description:
EventType clr20r3, P1 dtattach.exe, P2 9.0.242.0, P3 434f5e26, P4 microsoft.sqlserver.scripttask, P5 9.0.242.0, P6 434f5e02, P7 4f, P8 0, P9 pszqoadhx1u5zahbhohghldgiy4qixhx, P10 NIL.
Data:

|||

Was facing the same issue even after trying all of the above.

Have found workaround for this annoying problem

Everytime you get this error, right click on the problematic project in solution explorer and select 'clean' and then select 'rebuild'

Debugging should then work ok.

ta

arun

|||

Thanks Arun,

I tried ur stuff and it worked. I had been having hard time debugging my scripts and used to get this error evrytime.

Thanks again,

Mohit

|||

MohitGupta wrote:

Thanks Arun,

I tried ur stuff and it worked. I had been having hard time debugging my scripts and used to get this error evrytime.

Thanks again,

Mohit

If someone replies with an answer please could you mark it as such. This helps when other people are searchig the forums for answers to their own questions.

Thanks

|||

Hello,

I've got the same problem here. Previous week i had no probleme, now i'm not able to put a breakpoint in any of my scripts. This cause a crash... it is very annoying

Version of server 9.0.3153 32 bit

Version of client 9.0.3142 32 bit (last sp2 + hotfixes) - dotnet framework 2.0 + sp2

What change since then : update in windows defender...

I suspect a problem with the antivirus, or windows defender preventing the script from debugging...

Script Task debug error

Good afternoon -

Info:

Microsoft SQL Server Management Studio 9.00.1399.00
Microsoft Analysis Services Client Tools 2005.090.1399.00
Microsoft Data Access Components (MDAC) 2000.085.1117.00 (xpsp_sp2_rtm.040803-2158)
Microsoft MSXML 2.6 3.0 4.0 5.0 6.0
Microsoft Internet Explorer 6.0.2900.2180
Microsoft .NET Framework 2.0.50727.42
Operating System 5.1.2600

I am trying to debug a script task within a SSIS package by setting a breakpoint within the design window of teh script taks and I get the following error:

EventType : clr20r3 P1 : dtattach.exe P2 : 9.0.242.0 P3 : 434f5e26
P4 : microsoft.sqlserver.scripttask P5 : 9.0.242.0 P6 : 434f5e02
P7 : 4f P8 : 0 P9 : pszqoadhx1u5zahbhohghldgiy4qixhx

Other packages within the solution have script tasks and I can debug these with no problem. This particular script task has constanly given me this error.

Please let me know if there is additional information that I need to provide to facilitate a solution.

Respectfully,

James

I kind of figured nobody would tackle this...|||Looks like a nasty error, and one that should not occur. You could try breaking down the task to try and isolate the cause, as obviously not all scripts do it, so what part of this one does cause the issue. Even if you find it, unless you can change what you are doing it will not fix it, but you may then be able to log a support case with MS giving them more information. You could just log a call now, it does seem like something is very wrong, since the normal task/VSA error handling is not catching this.|||

Thanks for the reply. I will log an incident with MS to resolve this. It's odd because the script task functions properly, I just can't debug this particular task. When the debugger begins, the text displayed is from a totally different script task and a box pops up saying that, "Microsoft Visual Studio has lost the link to your application and will attempt to recover when you logoff."

Respectfully,

James

|||

Hi

I had a similar issue, the details of which can be found below. I believe my issue was around a line of code that assigned a string containing a string of xml directly to a dts string variable:

Dts.Variables("CaseDetail").Value = myNode.OuterXml.ToString()

I removed the above line, copied the script, deleted the script task, added a new script task and then pasted back in the code without the above line. The code then debugged fine but I still needed to save the OuterXml so I assigned it to a string variable first:

Dim outerXML As String

outerXML = myNode.OuterXml.ToString()

Dts.Variables("CaseDetail").Value = outerXML

This seems to work ok and debugs too. I'm not sure why I couldn't assign directly to the dts variable, but I'm more of a c# man these days, so maybe my VB skills are to blame.

My Error:

Event Type: Error
Event Source: .NET Runtime 2.0 Error Reporting
Event Category: None
Event ID: 5000
Date: 28/06/2006
Time: 14:01:16
User: N/A
Computer: ****
Description:
EventType clr20r3, P1 dtattach.exe, P2 9.0.242.0, P3 434f5e26, P4 microsoft.sqlserver.scripttask, P5 9.0.242.0, P6 434f5e02, P7 4f, P8 0, P9 pszqoadhx1u5zahbhohghldgiy4qixhx, P10 NIL.
Data:

|||

Was facing the same issue even after trying all of the above.

Have found workaround for this annoying problem

Everytime you get this error, right click on the problematic project in solution explorer and select 'clean' and then select 'rebuild'

Debugging should then work ok.

ta

arun

|||

Thanks Arun,

I tried ur stuff and it worked. I had been having hard time debugging my scripts and used to get this error evrytime.

Thanks again,

Mohit

|||

MohitGupta wrote:

Thanks Arun,

I tried ur stuff and it worked. I had been having hard time debugging my scripts and used to get this error evrytime.

Thanks again,

Mohit

If someone replies with an answer please could you mark it as such. This helps when other people are searchig the forums for answers to their own questions.

Thanks

|||

Hello,

I've got the same problem here. Previous week i had no probleme, now i'm not able to put a breakpoint in any of my scripts. This cause a crash... it is very annoying

Version of server 9.0.3153 32 bit

Version of client 9.0.3142 32 bit (last sp2 + hotfixes) - dotnet framework 2.0 + sp2

What change since then : update in windows defender...

I suspect a problem with the antivirus, or windows defender preventing the script from debugging...

Friday, March 9, 2012

Script creation

Hi

I am supposed to give scripts for an installtion at client site.

installing SQL server 2005 Developer edition
some databases already we have
tables
indexes
Stored procedures
jobs

Can u please guide me how to do this?

I am new to this.

Muralidaran rI would suggest you get a mentor at your current place of employment.|||In SQL Server Management Studio, right-click on your database and select "Script Database as...".|||Dump and restore|||The jobs will need to be scripted separately from the database, however
(which, incidentally, irritates the hell out of me).

Don't forget to check the appropriate options when you are scripting though, and remember that sp_change_users_login can be helpful to get your userid's back in synch.

Mi Perro, you have a huge pile of work before you...if'n I was you I'd start (a) asking for a mentor at my place of employment, (b) ask if perhaps this task can be given to someone who is not "new to this", (c) updating my resume, or (d) all of the above.

If this is anything other than a training exercise, and you are actually building a representative product at your client's site, you probably need to be more than "new at this", and hopefully your company management would agree.

Saturday, February 25, 2012

Screen output vs. print output, SSRS 2000

Hi,
I'm building a report for a client (in SSRS 2000), where I am
experiencing the fact that the output on the screen (ie, what is
rendered by Report Manager) is very different from the print output (or
export output, for that matter).
I am using a list, with a couple of tables (with fixed size) embedded
in it. While shown on screen, the page breaks are (as far as I can
tell) randomly inserted, no matter what I set as properties for Page
Break, Keep Together, etc. The output while exporting to (for example)
PDF is great, and exactly as I want it.
Has anyone experienced a similar problem? If so, have you solved it,
and how?
Thanks,
Jeroen Buisman
InfoReports Business Intelligence B.V.I have read in training material that the output to the screen (HTML) does
not have fixed page bounderies but goes until it hits the end of a group set
for a page break at the end of the group. HTML is not a "page oriented"
output format, while PDF is. This has been my experience.
<jeroen.buisman@.gmail.com> wrote in message
news:1141808034.990107.276690@.i39g2000cwa.googlegroups.com...
> Hi,
> I'm building a report for a client (in SSRS 2000), where I am
> experiencing the fact that the output on the screen (ie, what is
> rendered by Report Manager) is very different from the print output (or
> export output, for that matter).
> I am using a list, with a couple of tables (with fixed size) embedded
> in it. While shown on screen, the page breaks are (as far as I can
> tell) randomly inserted, no matter what I set as properties for Page
> Break, Keep Together, etc. The output while exporting to (for example)
> PDF is great, and exactly as I want it.
> Has anyone experienced a similar problem? If so, have you solved it,
> and how?
> Thanks,
> Jeroen Buisman
> InfoReports Business Intelligence B.V.
>|||Hi,
if you dont mention the margin propert for the report layout then this
problem will come up for the HTML print and not for PDF. so you have to
mention the margin hight,width,top,left in the rdl for the html activex
control to get that property otherwise it will get the default property which
makes the report ugly. You can fix temp by changing the margin property to
low in HTML print active control while viewing.
Bava
"jeroen.buisman@.gmail.com" wrote:
> Hi,
> I'm building a report for a client (in SSRS 2000), where I am
> experiencing the fact that the output on the screen (ie, what is
> rendered by Report Manager) is very different from the print output (or
> export output, for that matter).
> I am using a list, with a couple of tables (with fixed size) embedded
> in it. While shown on screen, the page breaks are (as far as I can
> tell) randomly inserted, no matter what I set as properties for Page
> Break, Keep Together, etc. The output while exporting to (for example)
> PDF is great, and exactly as I want it.
> Has anyone experienced a similar problem? If so, have you solved it,
> and how?
> Thanks,
> Jeroen Buisman
> InfoReports Business Intelligence B.V.
>|||Bava
can you explain this more in detail
Thx|||True, but the page breaks are occurring erraticaly. If it were so that
the HTML page break would only occur after the first group which has
the "Page Break at End" (or something like that) set, the break would
occur on exactly the same spot, right? So my guess is that that's not
the case. Will check it though, when I visit my client again tomorrow.
Thx,
Jeroen|||Hi Bava,
You mean that for the Report object, I should set explicit margins? If
so, that's something I always do with my reports. If that's not wat you
mean: could you please clarify what you mean with "changing the margin
property to low in HTML print active control"?
Thx,
Jeroen|||Hi,
The report rdl has the element like
<Report>
<RightMargin>0.2in</RightMargin>
<LeftMargin>0.2in</LeftMargin>
<TopMargin>0.2in</TopMargin>
</Report>
you have to set explicit for the report otherwise it will take the default
of .5in i think.
The default of 0.5in will not be good for some reports in HTML print control
that is avilable in report manager near the Export link.
You can see the value of the report margin set during the print control
preview mode. You can adjust the margin in this print control preview mode
but it will not be saved to the report or in the setting.
Bava
"Jeroen Buisman" wrote:
> Hi Bava,
> You mean that for the Report object, I should set explicit margins? If
> so, that's something I always do with my reports. If that's not wat you
> mean: could you please clarify what you mean with "changing the margin
> property to low in HTML print active control"?
> Thx,
> Jeroen
>|||Ow ok... however, the problem I'm having is not with printing, in fact,
printing is what goes well. The rendering on screen doesn't work as it
should.

scratch that

I am getting the error

Error: 18456, Severity: 14, State: 16.
Login failed for user 'PRI\sqlservice'. [CLIENT: 172.16.9.2]

in the log repeated every 15 seconds or so. I am logged into the server as pri\sqlservice, I have started the sql server and sql server agent with pri\sqlservice and I can access databases and tables inside the Server Management studio. I have set up the login pri\sqlservice and given it dbo owner access to all databases.

I am in the process of upgrading from 2000 to 2005. I have installed a new sql server 2005, restored backups of databases from 2000. I have also converted all packages and uploaded those to the new server (although they all point to the 2000 server). I have imported the jobs, but all but one are disabled and the one that is enabled ran okay when I ran it manually.

I have researched and researched this issue, and none seem to apply to my specific issue.

This is an extract of my errorlog:

2006-12-20 16:23:16.95 Server Microsoft SQL Server 2005 - 9.00.1399.06 (Intel X86)
Oct 14 2005 00:33:37
Copyright (c) 1988-2005 Microsoft Corporation
Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 1)

2006-12-20 16:23:16.98 Server (c) 2005 Microsoft Corporation.
2006-12-20 16:23:16.98 Server All rights reserved.
2006-12-20 16:23:16.98 Server Server process ID is 1780.
2006-12-20 16:23:16.98 Server Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG'.
2006-12-20 16:23:16.98 Server This instance of SQL Server last reported using a process ID of 4532 at 12/20/2006 4:23:52 PM (local) 12/20/2006 9:23:52 PM (UTC). This is an informational message only; no user action is required.
2006-12-20 16:23:16.98 Server Registry startup parameters:
2006-12-20 16:23:17.00 Server -d C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf
2006-12-20 16:23:17.00 Server -e C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG
2006-12-20 16:23:17.00 Server -l C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf
2006-12-20 16:23:17.23 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2006-12-20 16:23:17.23 Server Detected 2 CPUs. This is an informational message; no user action is required.
2006-12-20 16:23:17.93 Server Set AWE Enabled to 1 in the configuration parameters to allow use of more memory.
2006-12-20 16:23:19.65 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required.
2006-12-20 16:23:22.07 Server Attempting to initialize Microsoft Distributed Transaction Coordinator (MS DTC). This is an informational message only. No user action is required.
2006-12-20 16:23:23.21 Server Attempting to recover in-doubt distributed transactions involving Microsoft Distributed Transaction Coordinator (MS DTC). This is an informational message only. No user action is required.
2006-12-20 16:23:23.48 Server Database Mirroring Transport is disabled in the endpoint configuration.
2006-12-20 16:23:23.79 spid5s Starting up database 'master'.
2006-12-20 16:23:25.01 spid5s Recovery is writing a checkpoint in database 'master' (1). This is an informational message only. No user action is required.
2006-12-20 16:23:26.17 spid5s SQL Trace ID 1 was started by login "sa".
2006-12-20 16:23:26.37 spid5s Starting up database 'mssqlsystemresource'.
2006-12-20 16:23:27.93 spid9s Starting up database 'model'.
2006-12-20 16:23:27.95 spid5s Server name is 'KSDBT01'. This is an informational message only. No user action is required.
2006-12-20 16:23:29.06 spid9s Clearing tempdb database.
2006-12-20 16:23:29.54 Server A self-generated certificate was successfully loaded for encryption.
2006-12-20 16:23:29.62 Server Server is listening on [ 'any' <ipv4> 1433].
2006-12-20 16:23:29.62 Server Server local connection provider is ready to accept connection on [ \\.\pipe\SQLLocal\MSSQLSERVER ].
2006-12-20 16:23:29.62 Server Server local connection provider is ready to accept connection on [ \\.\pipe\sql\query ].
2006-12-20 16:23:29.64 Server Server is listening on [ 127.0.0.1 <ipv4> 1434].
2006-12-20 16:23:29.64 Server Dedicated admin connection support was established for listening locally on port 1434.
2006-12-20 16:23:29.68 Server SQL Server is now ready for client connections. This is an informational message; no user action is required.
2006-12-20 16:23:32.56 spid9s Starting up database 'tempdb'.
2006-12-20 16:23:32.67 spid13s Starting up database 'msdb'.
2006-12-20 16:23:32.67 spid12s Starting up database 'test'.
2006-12-20 16:23:32.67 spid14s Starting up database 'bravoAztecnology'.
2006-12-20 16:23:32.67 spid15s Starting up database 'bravoKNE'.
2006-12-20 16:23:32.67 spid16s Starting up database 'bravoKNS'.
2006-12-20 16:23:32.67 spid17s Starting up database 'bravoKNSBelgium'.
2006-12-20 16:23:32.68 spid18s Starting up database 'bravoKNSCanada'.
2006-12-20 16:23:32.68 spid19s Starting up database 'bravoKNSEngland'.
2006-12-20 16:23:34.79 spid20s The Service Broker protocol transport is disabled or not configured.
2006-12-20 16:23:34.81 spid20s The Database Mirroring protocol transport is disabled or not configured.
2006-12-20 16:23:35.01 spid12s Starting up database 'bravoKNSKennedy'.
2006-12-20 16:23:35.20 spid17s Starting up database 'bravoKNSSuperior'.
2006-12-20 16:23:35.35 spid13s Starting up database 'bravoKNSSuperiorSS'.
2006-12-20 16:23:35.48 spid19s Starting up database 'stamp'.
2006-12-20 16:23:35.83 spid20s Service Broker manager has started.
2006-12-20 16:23:38.59 spid14s Starting up database 'KNSSpecial'.
2006-12-20 16:23:39.31 spid18s Starting up database 'knsRPCS'.
2006-12-20 16:23:39.39 spid14s Analysis of database 'KNSSpecial' (16) is 100% complete (approximately 0 seconds remain). This is an informational message only. No user action is required.
2006-12-20 16:23:43.03 spid5s Recovery of any in-doubt distributed transactions involving Microsoft Distributed Transaction Coordinator (MS DTC) has completed. This is an informational message only. No user action is required.
2006-12-20 16:23:43.03 spid5s Recovery is complete. This is an informational message only. No user action is required.
2006-12-20 16:23:50.95 spid51 Using 'xpsqlbot.dll' version '2005.90.1399' to execute extended stored procedure 'xp_qv'. This is an informational message only; no user action is required.
2006-12-20 16:23:55.85 spid51 Using 'xpstar90.dll' version '2005.90.1399' to execute extended stored procedure 'xp_instance_regread'. This is an informational message only; no user action is required.
2006-12-20 16:23:57.10 spid51 Using 'xplog70.dll' version '2005.90.1399' to execute extended stored procedure 'xp_msver'. This is an informational message only; no user action is required.
2006-12-20 16:24:00.02 Logon Error: 18456, Severity: 14, State: 16.
2006-12-20 16:24:00.02 Logon Login failed for user 'PRI\sqlservice'. [CLIENT: 172.16.9.2]
2006-12-20 16:24:00.06 Logon Error: 18456, Severity: 14, State: 16.
2006-12-20 16:24:00.06 Logon Login failed for user 'PRI\sqlservice'. [CLIENT: 172.16.9.2]
2006-12-20 16:24:01.06 Logon Error: 18456, Severity: 14, State: 16.
2006-12-20 16:24:01.06 Logon Login failed for user 'PRI\sqlservice'. [CLIENT: 172.16.9.2]
2006-12-20 16:24:01.07 Logon Error: 18456, Severity: 14, State: 16.
2006-12-20 16:24:01.07 Logon Login failed for user 'PRI\sqlservice'. [CLIENT: 172.16.9.2]
2006-12-20 16:24:03.84 Logon Error: 18456, Severity: 14, State: 16.
2006-12-20 16:24:03.84 Logon Login failed for user 'PRI\sqlservice'. [CLIENT: 172.16.9.2]
2006-12-20 16:24:03.85 Logon Error: 18456, Severity: 14, State: 16.
2006-12-20 16:24:03.85 Logon Login failed for user 'PRI\sqlservice'. [CLIENT: 172.16.9.2]
2006-12-20 16:24:03.96 Logon Error: 18456, Severity: 14, State: 16.
2006-12-20 16:24:03.96 Logon Login failed for user 'PRI\sqlservice'. [CLIENT: 172.16.9.2]
2006-12-20 16:24:03.98 Logon Error: 18456, Severity: 14, State: 16.
2006-12-20 16:24:03.98 Logon Login failed for user 'PRI\sqlservice'. [CLIENT: 172.16.9.2]
2006-12-20 16:24:41.41 Logon Error: 18456, Severity: 14, State: 16.
2006-12-20 16:24:41.41 Logon Login failed for user 'PRI\sqlservice'. [CLIENT: 172.16.9.2]
2006-12-20 16:24:41.41 Logon Error: 18456, Severity: 14, State: 16.
2006-12-20 16:24:41.41 Logon Login failed for user 'PRI\sqlservice'. [CLIENT: 172.16.9.2]

Just found out its someone running a script to get into our server.|||That wasn't it. The same server is the one trying to log in. I have database mail turned on, too.

Tuesday, February 21, 2012

SCOPE_IDENTITY() SqlCe problem

I unable to do the SCOPE_IDENTITY on a insert query at SQL Mobile.

I need to perform on this query the insert on Client table and to get the ID.

I am programming on Visual Basic on Visual Studio 2005

My code is:

Dim ClientID as Integer

Dim sql As String = "INSERT INTO Client(Number) VALUES('5'); SELECT scope_identity()"

Dim cmd As New SqlCeCommand(sql, connection)

connection.Open()

ClientID = Convert.ToInt32(cmd.ExecuteNonQuery())

connection.Close()

And I get an error like this:

There was an error parsing the query. [ Token line number = 1,Token line offset = 76,Token in error = SELECT ]

Thanks!

You cannot have more queries in the same batch and scope_identity is not supported by SQL CE/Mobile. Use "SELECT @.@.IDENTITY" in a second .ExecuteNonQuery call.