Showing posts with label save. Show all posts
Showing posts with label save. Show all posts

Tuesday, March 27, 2012

Can't check "Check existing data on creation" in relationship

Hi
When I added relationship to table, checked "Check existing data on
creation" and clicked "Save" in Enterprise Management tool, it has no error.
However, when I check tables again, the "Check existing data on creation"
option was unchecked.
Help me!It's the expected behaviour: the first time you create the
relationship, the existing data is verified (if "Check existing data on
creation" is checked) and subsequently all the new data is verified (if
"Enforce relationship for INSERTs and UPDATEs" is checked).
If you modify something in the relationship (for example: the
relationship's name or the cascade updates/deletes checkboxes), the
existing data does not need be verified again (that's why this checkbox
is unchecked when you look at it later).
Only if you modify the relationship in more semnificative ways (for
example: different columns), you should make sure that you click on
"Check existing data on creation" so the existing data will be verified
according to the new relationship.
Razvan

Monday, March 19, 2012

Cannot view the DTS

Hi ,

I have DTS created in my Development server using the save as option i tried to save it in my production server . All these works fine . But when i logged in to the production server i could not see the DTS . But when we tried loging to the prodcution server using the data base administrator passed we were able to see the DTS and the owner of the DTS is seems to be not a admin person rather it is me.

Why is that i am not able to view the DTS when i logged in with my user id ?

Can any on help us in resolution this issue .

Thanks

K.Karthik Doss

refer this... it may help u ... http://www.sqldts.com/212.aspx

Madhu

|||

Hi Madhu

Thnaks for the efforts . I think i have not made it clear for you .the problem what we have the DTS in the production server but the Owner is not able to view the DTS . but we were able to see the DTS in DB admin access . so what should be done to view the dts in the owners login .

Thanks

K.Karthik Doss

|||

have u checked the owner of this DTS in Production server... Is it still the same ?

Madhu

|||If your login is not a part of SYSADMIN group on the production server, then what you are getting is by default. If that package is owned by SA then only SYSADMIN privileged uses can view or edit.|||

Yes i was able to view the DTS thru the DB Admin userID and Password and the owner is me. But i could not view it when i logged in thru my UserID and Password .

|||

say if the package is owned by SA then how do i change that to a comman , Like if any one logs in to the system can view that package .

|||

AFAIK... there is not direct method in SQL Server 2000 ... yes u have Specific role available in SQL Server 2005(db_dtsadmin,db_dtsltduser etc)... in SQL 2000, if all the users want to view the package owned by others ... then u need to add all of them in SysAdmin Role, which is not recommened atall ..

Madhu

Tuesday, February 14, 2012

cannot save trace output to a local file?

Hi,
This is SQL 2000 on a win2k3 box.
In Trace Properties, when I checked 'Save to file' and clicked the folder
icon and specified a local file name, I got the following message:
For SQL server to write to a file, file path should have the following
format \\servername\sharename\filename
But I'm trying to write to a local file on the database server. How do I
have to use that format? Also in the Save As window, there is no way to
specify the path name like that given in the above message.
Thanks for any help,
Bing
bing wrote:
> Hi,
> This is SQL 2000 on a win2k3 box.
> In Trace Properties, when I checked 'Save to file' and clicked the
> folder icon and specified a local file name, I got the following
> message:
> For SQL server to write to a file, file path should have the following
> format \\servername\sharename\filename
> But I'm trying to write to a local file on the database server. How
> do I have to use that format? Also in the Save As window, there is
> no way to specify the path name like that given in the above message.
> Thanks for any help,
>
> Bing
You don't. You can specify any local drive with a drive letter.
David Gugick
Quest Software
www.imceda.com
www.quest.com

cannot save trace output to a local file?

Hi,
This is SQL 2000 on a win2k3 box.
In Trace Properties, when I checked 'Save to file' and clicked the folder
icon and specified a local file name, I got the following message:
For SQL server to write to a file, file path should have the following
format \\servername\sharename\filename
But I'm trying to write to a local file on the database server. How do I
have to use that format? Also in the Save As window, there is no way to
specify the path name like that given in the above message.
Thanks for any help,
Bingbing wrote:
> Hi,
> This is SQL 2000 on a win2k3 box.
> In Trace Properties, when I checked 'Save to file' and clicked the
> folder icon and specified a local file name, I got the following
> message:
> For SQL server to write to a file, file path should have the following
> format \\servername\sharename\filename
> But I'm trying to write to a local file on the database server. How
> do I have to use that format? Also in the Save As window, there is
> no way to specify the path name like that given in the above message.
> Thanks for any help,
>
> Bing
You don't. You can specify any local drive with a drive letter.
--
David Gugick
Quest Software
www.imceda.com
www.quest.com

cannot save trace output to a local file?

Hi,
This is SQL 2000 on a win2k3 box.
In Trace Properties, when I checked 'Save to file' and clicked the folder
icon and specified a local file name, I got the following message:
For SQL server to write to a file, file path should have the following
format \\servername\sharename\filename
But I'm trying to write to a local file on the database server. How do I
have to use that format? Also in the Save As window, there is no way to
specify the path name like that given in the above message.
Thanks for any help,
Bingbing wrote:
> Hi,
> This is SQL 2000 on a win2k3 box.
> In Trace Properties, when I checked 'Save to file' and clicked the
> folder icon and specified a local file name, I got the following
> message:
> For SQL server to write to a file, file path should have the following
> format \\servername\sharename\filename
> But I'm trying to write to a local file on the database server. How
> do I have to use that format? Also in the Save As window, there is
> no way to specify the path name like that given in the above message.
> Thanks for any help,
>
> Bing
You don't. You can specify any local drive with a drive letter.
David Gugick
Quest Software
www.imceda.com
www.quest.com

cannot save storedproc after SP3

hi
we found a bug in EM. we are unable to save/export/transfer a DTS package to
another remote box. is there any workaround or hotfix available?
AlexAlex
See if this helps
http://www.sqldts.com/default.aspx?6,105,204,0,1
Regards
John|||How are you trying ?
File | Save As | SQL Server ?
File | Save As | Structured Storage File ?
Transferring DTS Packages
http://www.sqldts.com/default.aspx?6,105,204,0,1
--
--
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org
"alex" <ntnewsNO@.SPAM.hrz3.hrz.tu-darmstadt.de> wrote in message
news:OgI#tPoUDHA.1280@.tk2msftngp13.phx.gbl...
> hi
> we found a bug in EM. we are unable to save/export/transfer a DTS package
to
> another remote box. is there any workaround or hotfix available?
>
> Alex
>|||hi
> How are you trying ?
> File | Save As | SQL Server ?
> File | Save As | Structured Storage File ?
this are 3 "save as" options in SP3 and 4 "save as" options in SP2 and
prior.
the third in SP3 is "Visual Basic File". in SP2 there is another Option
"Save as DTS package file" (sorry - the options is gone - i don't know the
exact name). we need this DTS package option for transfer...
Alex

Cannot save server properties on Case Sensitive instances

Hi all,

I've filled this suspect bug to Connect:

https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=282812

The issue is: I'm unable to save any change to server properties if instance is set to Case Sensitive collation .

The process returns an error like (translated from Spanish, so not exact message):

"Error in metadata manager. Log file extension should be .LOG. Error in metadata manager. Error setting ConfigurationSettings\Log\File configuration property.".

As far as I've tested this happens with any property you're trying to set when in CS collation.

My bypass has been to edit msmdsrv.ini file directly with Notepad, reverting CollationName to case insensitive.

Then everything goes fine.

Details:

Tested with AS 2005 SP2 Collation: Latin1_General_CS_AI Happens both with SSMS and direct scripting (as expected)

Best regards,

Jordi Rambla

Solid Quality Mentors

wenn Collation Latin1_CS and soon is, you should change in msmdsrv.ini in

<Log>

<File>msmdsrv.log</File>... </Log> to <File>msmdsrv.LOG</File>

Cannot save server properties on Case Sensitive instances

Hi all,

I've filled this suspect bug to Connect:

https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=282812

The issue is: I'm unable to save any change to server properties if instance is set to Case Sensitive collation .

The process returns an error like (translated from Spanish, so not exact message):

"Error in metadata manager. Log file extension should be .LOG. Error in metadata manager. Error setting ConfigurationSettings\Log\File configuration property.".

As far as I've tested this happens with any property you're trying to set when in CS collation.

My bypass has been to edit msmdsrv.ini file directly with Notepad, reverting CollationName to case insensitive.

Then everything goes fine.

Details:

Tested with AS 2005 SP2 Collation: Latin1_General_CS_AI Happens both with SSMS and direct scripting (as expected)

Best regards,

Jordi Rambla

Solid Quality Mentors

wenn Collation Latin1_CS and soon is, you should change in msmdsrv.ini in

<Log>

<File>msmdsrv.log</File>... </Log> to <File>msmdsrv.LOG</File>

Cannot save my Maintenance plan

I use sa to login to sql 2005. I can save Maintenance plan using wizard, however, when I try to save maintenance plan using the maintenance plan design screen. I received error message "Apply to target server failed for job ...". When I check the job, there is no step in the job.

In the Maintenance wizard, there is no maintenance clean up task. I want to create a task to delete my backup file if it is older than certain days.

Any suggestions are welcome. Thanks in advance.

Hi

Dont use the wizard.

You can use the cleanup maintenacne task to cleanup backups files older than x days.

Cheers

|||

Only the wizard let me save my maintenance plan. I cannot save my maintenance plan if I use the design screen.

There is no Maintenance clean up task in the wizard.

|||

What error do you get when you save from designer ?

Gops Dwarak

|||

Oh I missed to see the error message in your mail.

This is the difference in behavior i noticed when created though wizard and through Designer

When you create maintenance plan with a name of job that is already existing through wizard , maintenance plan gets created successfully with a step added to the existing job. Expected behavior should have been to throw valid error saying "Job with this name already exists". When similar scenario is tried from Designer then error is thrown mentioning "Create failed for job 'job name' ". I have opened a bug to be fixed for next release.

Can you check whether job with plan name exists before creating the plan through designer ?

Also, this issue looks like more of SQL Server Agent issue. Can you look at the agent log file(through log viewer) when you try to perform this operation and see what message is logged in there. That may help to narrow down the issue

|||

I checked my sql server log and agent log. Both had no error message recorded.

I noticed if there is job name existed, the Designer thrown error 'Create failed for job...'. I manually deleted the job and maintenance and created from fresh. I got error message 'Apply to target server failed for job 'job name''. Acturally the maintenance plan is saved and job is saved. However, there is no job steps in the job.

I don't think it is SQL agent issue since I have run the job yet. The error occurred at the save process. I guess maybe a security issue. I am using sa to login and sa is dbo of msdb. I can use the wizard to save with no problem.

Thanks for any suggestions.

|||Any suggestions? Thanks.|||

Hi renching

I am afraid i canoot help you much more.

My experience with the new maintenance plans are that they suck.

When i try upgrade 2000 plans to 2005 they just give me errors, i hate the wizard it is nowhere near as user friendly as easy as in 2000.

Basically all i can advise is to do what i did, redo all plans from scratch in 2005.

But you say you have to use the wizard so i cannot help you there cos the wizard cant do what i want it to do, so i avoid it.

As far as exisitng jobs are concerned , i know i had to use sp_delete_maintenance_plan and sp_delete_maintenance_plan_job to properly clear out exisitng jobs and plans.\

Good luck.

Thanx

|||

Thanks. I wish the error message gave more information. Our application is built on SQL 2005. We have no conversions. All jobs are new. I got a lot problem with SQL 2005.

Thanks anyway. I hope someone will help me out here.

|||My SSIS is installed, however, it is disabled. Will this cause the problem?|||Try logging to SQL Server Management Studio on the local server as 'sa' with a server name of '.', then create, schedule, and save the new maintenence plan.|||

renching wrote:

My SSIS is installed, however, it is disabled. Will this cause the problem?

We shouldn't have a dependency on the SSIS service. Try installing SQL Server 2005 Service Pack 2.

http://www.microsoft.com/sql/sp2.mspx

Paul A. Mestemaker II
Program Manager
Microsoft SQL Server Manageability
http://blogs.msdn.com/sqlrem/

Cannot save my Maintenance plan

I use sa to login to sql 2005. I can save Maintenance plan using wizard, however, when I try to save maintenance plan using the maintenance plan design screen. I received error message "Apply to target server failed for job ...". When I check the job, there is no step in the job.

In the Maintenance wizard, there is no maintenance clean up task. I want to create a task to delete my backup file if it is older than certain days.

Any suggestions are welcome. Thanks in advance.

Hi

Dont use the wizard.

You can use the cleanup maintenacne task to cleanup backups files older than x days.

Cheers

|||

Only the wizard let me save my maintenance plan. I cannot save my maintenance plan if I use the design screen.

There is no Maintenance clean up task in the wizard.

|||

What error do you get when you save from designer ?

Gops Dwarak

|||

Oh I missed to see the error message in your mail.

This is the difference in behavior i noticed when created though wizard and through Designer

When you create maintenance plan with a name of job that is already existing through wizard , maintenance plan gets created successfully with a step added to the existing job. Expected behavior should have been to throw valid error saying "Job with this name already exists". When similar scenario is tried from Designer then error is thrown mentioning "Create failed for job 'job name' ". I have opened a bug to be fixed for next release.

Can you check whether job with plan name exists before creating the plan through designer ?

Also, this issue looks like more of SQL Server Agent issue. Can you look at the agent log file(through log viewer) when you try to perform this operation and see what message is logged in there. That may help to narrow down the issue

|||

I checked my sql server log and agent log. Both had no error message recorded.

I noticed if there is job name existed, the Designer thrown error 'Create failed for job...'. I manually deleted the job and maintenance and created from fresh. I got error message 'Apply to target server failed for job 'job name''. Acturally the maintenance plan is saved and job is saved. However, there is no job steps in the job.

I don't think it is SQL agent issue since I have run the job yet. The error occurred at the save process. I guess maybe a security issue. I am using sa to login and sa is dbo of msdb. I can use the wizard to save with no problem.

Thanks for any suggestions.

|||Any suggestions? Thanks.|||

Hi renching

I am afraid i canoot help you much more.

My experience with the new maintenance plans are that they suck.

When i try upgrade 2000 plans to 2005 they just give me errors, i hate the wizard it is nowhere near as user friendly as easy as in 2000.

Basically all i can advise is to do what i did, redo all plans from scratch in 2005.

But you say you have to use the wizard so i cannot help you there cos the wizard cant do what i want it to do, so i avoid it.

As far as exisitng jobs are concerned , i know i had to use sp_delete_maintenance_plan and sp_delete_maintenance_plan_job to properly clear out exisitng jobs and plans.\

Good luck.

Thanx

|||

Thanks. I wish the error message gave more information. Our application is built on SQL 2005. We have no conversions. All jobs are new. I got a lot problem with SQL 2005.

Thanks anyway. I hope someone will help me out here.

|||My SSIS is installed, however, it is disabled. Will this cause the problem?|||Try logging to SQL Server Management Studio on the local server as 'sa' with a server name of '.', then create, schedule, and save the new maintenence plan.|||

renching wrote:

My SSIS is installed, however, it is disabled. Will this cause the problem?

We shouldn't have a dependency on the SSIS service. Try installing SQL Server 2005 Service Pack 2.

http://www.microsoft.com/sql/sp2.mspx

Paul A. Mestemaker II
Program Manager
Microsoft SQL Server Manageability
http://blogs.msdn.com/sqlrem/

Cannot save maintenance plans

I am running SQL 2005 standard SP2 and I cannot save maintenance plans. Using the wizard I create the plan but it always fails with the following error messages:

An exception occurred while executing a Transact_SQL statement or batch

Invalid column name 'from_msx'.

Invalid column name 'has_targets'. (Microsoft SQL Server , Error: 207)

Invalid column name 'msx_job_id'. (Microsoft SQL Server, Error: 207)

Thanks

Todd

The column names you mention were added in SP2. This indicates that there is a mix of SP2 and earlier functionality involved in this problem.

Bring all elements up to SP2. If you have done so already, inspect installler logs to see if sp2 setup ran without error.

Good luck,

jkh

Cannot save Maintenance plan

I use sa to login to sql 2005. I can save Maintenance plan using wizard. However, when I try to save maintenance plan using the maintenance plan design screen, I received error message "Apply to target server failed for job ...". When I check the job, there is no step in the job.

In the Maintenance wizard, there is no maintenance clean up task. I want to create a task to delete my backup file if it is older than certain days.

Any suggestions are welcome. Thanks in advance.

have you considered using the script task?|||

Although Maintenance Plans are built on the SSIS infrastrcucture, they do have some aspects that we do not cover. Best to start in the SQL Server Tools forum. I'll move this thread for now.

Thanks

Donald

Cannot save English dates!

Hi All,

I have this dumb problem with dates in my mobile application. The problem is when saving a short date in English format ex 20/08/2006 the sql server 200 windows CE Edition display an error stating

THERE IS AN ERROR IN THE DATEPART FORMAT. [,,,Expression,,]

When changing the date in American format the problem is solved ex 08/20/2006

The problem is that I require the dates in English Format only!

Is there anyway of solving my problem ?

Thanks

Matt

Please use parameters to avoid formatting issues. If you don’t know how, please look up SqlCeParameter class on MSDN and/or search this forum.

Note: SQL CE 2.0 only supports unnamed parameters, SQL Mobile supports both named and unnamed parameters.

Cannot save a long string

This is what I am trying to save and what is actually being saved:

All variables are STRINGS.

Saving: 08:02:40 08:18:05 ^09:34:07 09:39:25 ^10:02:50 10:18:19 10:37:33 11:01:34 11:23:26 11:50:47 ^12:52:30 13:42:37 ^14:41:04 ^18:36:13
Saved: 08:02:40 08:18:05 ^09:34:07 09:39:25 ^10:02:50 10:

Saving: 08:08:52 08:59:55 ^09:38:04 09:54:20 ^10:15:37 10:34:40 10:39:02 11:12:45 11:39:33 ^12:18:51 13:11:24 ^14:04:52 15:18:43 ^19:13:10
Saved: 08:08:52 08:59:55 ^09:38:04 09:54:20 ^10:15:37 10:

The codes:

Table scripted to a query:

USE [Analytical]
GO
/****** Object: Table [dbo].[DailyTickMinMaxAnalysis] Script Date: 08/07/2007 15:44:29 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[DailyTickMinMaxAnalysis](
[symbol] [varchar](50) NOT NULL,
[cDate] [varchar](50) NOT NULL,
[part] [varchar](50) NOT NULL,
[collection] [varchar](max) NULL,
CONSTRAINT [remPat_Trades] PRIMARY KEY CLUSTERED
(
[symbol] ASC,
[cDate] ASC,
[part] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF

Stored procedure is:


USE [Analytical]
GO
/****** Object: StoredProcedure [dbo].[InsertDailyTickMinMaxAnalysis] Script Date: 08/07/2007 15:45:49 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO

ALTER PROCEDURE [dbo].[InsertDailyTickMinMaxAnalysis]
@.symbol varchar(50),
@.cDate varchar(50),
@.part varchar(50),
@.collection varchar(50) = NULL
AS
BEGIN
SET NOCOUNT ON;
INSERT INTO dbo.DailyTickMinMaxAnalysis (
symbol,
cDate,
part,
[collection])
Values (
@.symbol,
@.cDate,
@.part,
@.collection)
END

C# procedure:

public void saveHistTickMinMaxAnalysis ( int tableIndex )
{
if ( tableIndex != -1 )
{
using ( SqlConnection conn_Analytical = new SqlConnection ( "server=ddmnvt61\\sqlexpress;" +
"database=Analytical;Trusted_Connection=Yes" ) )
{
SqlCommand cmdm = new SqlCommand ( );
conn_Analytical.Open ( );
cmdm.Connection = conn_Analytical;
cmdm.CommandType = CommandType.StoredProcedure;
cmdm.CommandText = "InsertDailyTickMinMaxAnalysis";
cmdm.Parameters.Clear ( );
cmdm.Parameters.Add ( "@.symbol", SqlDbType.VarChar, 50, "symbol" );
cmdm.Parameters.Add ( "@.cDate", SqlDbType.VarChar, 50, "cDate" );
cmdm.Parameters.Add ( "@.part", SqlDbType.VarChar, 50, "part" ); // 2
cmdm.Parameters.Add ( "@.collection", SqlDbType.VarChar, 500, "collection" ); // 3
foreach ( DataRow row in Globals.dtSets.Tables[tableIndex].Rows )
{
cmdm.Parameters[0].Value = ( string )row[0];
cmdm.Parameters[1].Value = ( string )row[1];
cmdm.Parameters[2].Value = ( string )row[2];
cmdm.Parameters[3].Value = ( string )row[3];
Console.WriteLine ( "Saving {0}", ( string )row[3] ); // <= where the print out occurs to confirm that the right string is being passed
try
{
cmdm.ExecuteNonQuery ( );
}
catch { }
}
}
}
} // saveHistTickMinMaxAnalysis

Table is defined with the last columns[3].Length = 500;

What happened to the rest of my strings?

I would appreciate any help.

Many thanks.

Your parameter in your procedure is only VARCHAR(50), therefor it is implictly cut to 50 chars.

Jens K. Suessmeyer


http://www.sqlserver2005.de

|||

Jens K. Suessmeyer wrote:

Your parameter in your procedure is only VARCHAR(50), therefor it is implictly cut to 50 chars.

Jens K. Suessmeyer


http://www.sqlserver2005.de

Thank you Jens.

I actually figured it out right after I posted the message but in the end I did a complete workaround even without SQL Server. Probably was very tired that day. Goofy!

Sunday, February 12, 2012

Cannot save a long string

This is what I am trying to save and what is actually being saved:

All variables are STRINGS.

Saving: 08:02:40 08:18:05 ^09:34:07 09:39:25 ^10:02:50 10:18:19 10:37:33 11:01:34 11:23:26 11:50:47 ^12:52:30 13:42:37 ^14:41:04 ^18:36:13
Saved: 08:02:40 08:18:05 ^09:34:07 09:39:25 ^10:02:50 10:

Saving: 08:08:52 08:59:55 ^09:38:04 09:54:20 ^10:15:37 10:34:40 10:39:02 11:12:45 11:39:33 ^12:18:51 13:11:24 ^14:04:52 15:18:43 ^19:13:10
Saved: 08:08:52 08:59:55 ^09:38:04 09:54:20 ^10:15:37 10:

The codes:

Table scripted to a query:

USE [Analytical]
GO
/****** Object: Table [dbo].[DailyTickMinMaxAnalysis] Script Date: 08/07/2007 15:44:29 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[DailyTickMinMaxAnalysis](
[symbol] [varchar](50) NOT NULL,
[cDate] [varchar](50) NOT NULL,
[part] [varchar](50) NOT NULL,
[collection] [varchar](max) NULL,
CONSTRAINT [remPat_Trades] PRIMARY KEY CLUSTERED
(
[symbol] ASC,
[cDate] ASC,
[part] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF

Stored procedure is:


USE [Analytical]
GO
/****** Object: StoredProcedure [dbo].[InsertDailyTickMinMaxAnalysis] Script Date: 08/07/2007 15:45:49 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO

ALTER PROCEDURE [dbo].[InsertDailyTickMinMaxAnalysis]
@.symbol varchar(50),
@.cDate varchar(50),
@.part varchar(50),
@.collection varchar(50) = NULL
AS
BEGIN
SET NOCOUNT ON;
INSERT INTO dbo.DailyTickMinMaxAnalysis (
symbol,
cDate,
part,
[collection])
Values (
@.symbol,
@.cDate,
@.part,
@.collection)
END

C# procedure:

public void saveHistTickMinMaxAnalysis ( int tableIndex )
{
if ( tableIndex != -1 )
{
using ( SqlConnection conn_Analytical = new SqlConnection ( "server=ddmnvt61\\sqlexpress;" +
"database=Analytical;Trusted_Connection=Yes" ) )
{
SqlCommand cmdm = new SqlCommand ( );
conn_Analytical.Open ( );
cmdm.Connection = conn_Analytical;
cmdm.CommandType = CommandType.StoredProcedure;
cmdm.CommandText = "InsertDailyTickMinMaxAnalysis";
cmdm.Parameters.Clear ( );
cmdm.Parameters.Add ( "@.symbol", SqlDbType.VarChar, 50, "symbol" );
cmdm.Parameters.Add ( "@.cDate", SqlDbType.VarChar, 50, "cDate" );
cmdm.Parameters.Add ( "@.part", SqlDbType.VarChar, 50, "part" ); // 2
cmdm.Parameters.Add ( "@.collection", SqlDbType.VarChar, 500, "collection" ); // 3
foreach ( DataRow row in Globals.dtSets.Tables[tableIndex].Rows )
{
cmdm.Parameters[0].Value = ( string )row[0];
cmdm.Parameters[1].Value = ( string )row[1];
cmdm.Parameters[2].Value = ( string )row[2];
cmdm.Parameters[3].Value = ( string )row[3];
Console.WriteLine ( "Saving {0}", ( string )row[3] ); // <= where the print out occurs to confirm that the right string is being passed
try
{
cmdm.ExecuteNonQuery ( );
}
catch { }
}
}
}
} // saveHistTickMinMaxAnalysis

Table is defined with the last columns[3].Length = 500;

What happened to the rest of my strings?

I would appreciate any help.

Many thanks.

Your parameter in your procedure is only VARCHAR(50), therefor it is implictly cut to 50 chars.

Jens K. Suessmeyer


http://www.sqlserver2005.de

|||

Jens K. Suessmeyer wrote:

Your parameter in your procedure is only VARCHAR(50), therefor it is implictly cut to 50 chars.

Jens K. Suessmeyer


http://www.sqlserver2005.de

Thank you Jens.

I actually figured it out right after I posted the message but in the end I did a complete workaround even without SQL Server. Probably was very tired that day. Goofy!

Friday, February 10, 2012

Cannot resolve index for fact table

Hi,

When I am trying to deploy or save the project with cube I am getting this error.

Property accessor 'StorageLocation' on object '339f70f7-5d30-4c38-97c8-30b675640b24' threw the following exception:'Cannot resolve the 'Fact Table 2' index because the setting does not support the '2' nesting level.
Make sure that the product is installed properly.' (Microsoft Visual Studio)

Also I have this error in "StorageLocation" property for partition.

Any ideas?

Thank you for your help.

One idea is double check the value for the StorageLocation property. What value did you have for it.
Make sure it points to the valid folder on server's file system.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.