Showing posts with label created. Show all posts
Showing posts with label created. Show all posts

Monday, March 26, 2012

Ragged Dimension

I have a created a ragged dimension on OLAP manage but it is not being
displayed properly in Excel. Whereever empty level is there, excel displays
same value as parent. Any idea why it is happening ?Hi,
this is the expected behavior, if your dimension based on a flat dimension
table. To avoid this try a parent child dimension table.
hth
NGE
Am Thu, 11 Dec 2003 19:58:06 +0530 hat Zubin Dhamodiwala
<zubin@.godrej.com> geschrieben:
quote:

> I have a created a ragged dimension on OLAP manage but it is not being
> displayed properly in Excel. Whereever empty level is there, excel
> displays
> same value as parent. Any idea why it is happening ?
>

Erstellt mit M2, Operas revolutionrem E-Mail-Modul:
http://www.opera.com/m2/|||Disadvantage with Parent Child is that you cannot levels in it. It works
with only two column in a table, a key and parent id. But my dimension have
multiple levels and they are unbalanced.
"Nice Guy Eddie" <a_hard_days_night@.web.de> wrote in message
news:oprz2a0xqw1ak0mc@.news.misag.com...
quote:

> Hi,
> this is the expected behavior, if your dimension based on a flat dimension
> table. To avoid this try a parent child dimension table.
> hth
> NGE
> Am Thu, 11 Dec 2003 19:58:06 +0530 hat Zubin Dhamodiwala
> <zubin@.godrej.com> geschrieben:
>
>
> --
> Erstellt mit M2, Operas revolutionrem E-Mail-Modul:
> http://www.opera.com/m2/
|||Hi,
I'm not sure, if I understand...In a parent/ child table you can have
levels and you can have unbalanced trees. Why not?
Example:
Dimension table
col_child (pk) col_parent
child_1 parent_1
parent_1 parent_11
child_2 parent_11
Result:
parent_11
parent_1
child_1
child_2
You have tree levels and a unbalanced hierarchy...
Greetings, NGE
Am Fri, 12 Dec 2003 16:29:05 +0530 hat Zubin Dhamodiwala
<zubin@.godrej.com> geschrieben:
quote:

> Disadvantage with Parent Child is that you cannot levels in it. It works
> with only two column in a table, a key and parent id. But my dimension
> have
> multiple levels and they are unbalanced.
>
> "Nice Guy Eddie" <a_hard_days_night@.web.de> wrote in message
> news:oprz2a0xqw1ak0mc@.news.misag.com...
>

Erstellt mit M2, Operas revolutionrem E-Mail-Modul:
http://www.opera.com/m2/

Monday, March 12, 2012

Quick simple question!

Hello all,
Using SQL Server 2000, if I create a primary key on a table, does that
automatically create an index - or should one be created manually?
Thanks all,
Jon
This will create the index automatically.
Adi
Jon wrote:
> Hello all,
> Using SQL Server 2000, if I create a primary key on a table, does that
> automatically create an index - or should one be created manually?
> Thanks all,
> Jon
|||Thanks,
Would this be the same for Foreign Keys also?
Thanks,
Jon
"Adi" wrote:

> This will create the index automatically.
> Adi
> Jon wrote:
>
|||No - I have a script here to add indexes to all FKs:
http://www.replicationanswers.com/Script23.asp
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
|||Paul, that's great, thanks very much - I notice that it was created in 2005,
will it work for 2000?
Once an index has been created on a table, do you need to re-analyse the
tables or does SQL Server do this automatically? We're using 2000.
Thanks,
Jon
"Paul Ibison" wrote:

> No - I have a script here to add indexes to all FKs:
> http://www.replicationanswers.com/Script23.asp
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com .
>
>
|||Jon - sorry - didn't notice that you were on SQL Server 2000. I used to have
a corresponding script for 2000 but can't find it now and guess I never
posted it to my site . I'll do some digging in my backups and see what I
can find.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .

Friday, March 9, 2012

Quick simple question!

Hello all,
Using SQL Server 2000, if I create a primary key on a table, does that
automatically create an index - or should one be created manually?
Thanks all,
JonThis will create the index automatically.
Adi
Jon wrote:
> Hello all,
> Using SQL Server 2000, if I create a primary key on a table, does that
> automatically create an index - or should one be created manually?
> Thanks all,
> Jon|||Thanks,
Would this be the same for Foreign Keys also?
Thanks,
Jon
"Adi" wrote:

> This will create the index automatically.
> Adi
> Jon wrote:
>|||No - I have a script here to add indexes to all FKs:
http://www.replicationanswers.com/Script23.asp
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .|||Paul, that's great, thanks very much - I notice that it was created in 2005,
will it work for 2000?
Once an index has been created on a table, do you need to re-analyse the
tables or does SQL Server do this automatically? We're using 2000.
Thanks,
Jon
"Paul Ibison" wrote:

> No - I have a script here to add indexes to all FKs:
> http://www.replicationanswers.com/Script23.asp
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com .
>
>|||Jon - sorry - didn't notice that you were on SQL Server 2000. I used to have
a corresponding script for 2000 but can't find it now and guess I never
posted it to my site . I'll do some digging in my backups and see what I
can find.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .

Saturday, February 25, 2012

Queuing Files

I have a requirement of instantiating a job which will copy and move the
newly created file once a file has been created in a folder. How can I
perform this in SQL Server. Can you please give your thoughts about this.
What I was planning was to write a visual basic code which will pool the
files getting created into the folder and accordingly copy and paste into
another folder. I feel this is not a better method.
I really wanted a queuing system to be implemented.Hi, there's a script I am using to copy files:
USE [msdb]
GO
/****** Object: Job [CopyToCluster] Script Date: 03/20/2006 15:24:31 ******/
BEGIN TRANSACTION
DECLARE @.ReturnCode INT
SELECT @.ReturnCode = 0
/****** Object: JobCategory [Database Maintenance] Script Date: 03/20/2006
15:24:31 ******/
IF NOT EXISTS (SELECT name FROM msdb.dbo.syscategories WHERE name=N'Database
Maintenance' AND category_class=1)
BEGIN
EXEC @.ReturnCode = msdb.dbo.sp_add_category @.class=N'JOB', @.type=N'LOCAL',
@.name=N'Database Maintenance'
IF (@.@.ERROR <> 0 OR @.ReturnCode <> 0) GOTO QuitWithRollback
END
DECLARE @.jobId BINARY(16)
EXEC @.ReturnCode = msdb.dbo.sp_add_job @.job_name=N'CopyToCluster',
@.enabled=1,
@.notify_level_eventlog=2,
@.notify_level_email=0,
@.notify_level_netsend=0,
@.notify_level_page=0,
@.delete_level=0,
@.description=N'Copies all files rom the local backup directory to
\\datacluster\\Backup',
@.category_name=N'Database Maintenance',
@.owner_login_name=N'YOUR_USER', @.job_id = @.jobId OUTPUT
IF (@.@.ERROR <> 0 OR @.ReturnCode <> 0) GOTO QuitWithRollback
/****** Object: Step [Copy files] Script Date: 03/20/2006 15:24:31 ******/
EXEC @.ReturnCode = msdb.dbo.sp_add_jobstep @.job_id=@.jobId, @.step_name=N'Copy
files',
@.step_id=1,
@.cmdexec_success_code=0,
@.on_success_action=1,
@.on_success_step_id=0,
@.on_fail_action=2,
@.on_fail_step_id=0,
@.retry_attempts=2,
@.retry_interval=0,
@.os_run_priority=0, @.subsystem=N'CmdExec',
@.command=N'c:\copybackups.cmd $(DATE)$(TIME)',
@.flags=4
IF (@.@.ERROR <> 0 OR @.ReturnCode <> 0) GOTO QuitWithRollback
EXEC @.ReturnCode = msdb.dbo.sp_update_job @.job_id = @.jobId, @.start_step_id =
1
IF (@.@.ERROR <> 0 OR @.ReturnCode <> 0) GOTO QuitWithRollback
EXEC @.ReturnCode = msdb.dbo.sp_add_jobschedule @.job_id=@.jobId,
@.name=N'CopyBackupFilesSched',
@.enabled=1,
@.freq_type=4,
@.freq_interval=1,
@.freq_subday_type=1,
@.freq_subday_interval=0,
@.freq_relative_interval=0,
@.freq_recurrence_factor=0,
@.active_start_date=20060106,
@.active_end_date=99991231,
@.active_start_time=50000,
@.active_end_time=235959
IF (@.@.ERROR <> 0 OR @.ReturnCode <> 0) GOTO QuitWithRollback
EXEC @.ReturnCode = msdb.dbo.sp_add_jobserver @.job_id = @.jobId, @.server_name
= N'(local)'
IF (@.@.ERROR <> 0 OR @.ReturnCode <> 0) GOTO QuitWithRollback
COMMIT TRANSACTION
GOTO EndSave
QuitWithRollback:
IF (@.@.TRANCOUNT > 0) ROLLBACK TRANSACTION
EndSave:
and this is copypackups.cmd:
rem PR 2006-01-09
rem This batch file copies daily backups of databases to network location
rem
@.echo . > c:\copybackups.log
@.echo %1 Copying files from c:\SQLBackup to \\datacluster\Backup... >>
c:\copybackups.log
xcopy c:\SQLBackup\*.* \\datacluster\Backup\*.* /L /R /H /D /V /Y /F /C >>
c:\copybackups.log
xcopy c:\SQLBackup\*.* \\datacluster\Backup\*.* /R /H /D /V /Y /F /C >>
c:\copybackups.log
@.echo done >> c:\copybackups.log
@.echo . >> c:\copybackups.log
Note that this file does not use date and time passed by the job. I have
another job that removes older files from local directory.
HTH
Peter|||Thank you very much for your response.
What I need is watch for newly added files to a folder. The moment a new
file is added, I need to copy and paste into another location. This is
something like a service which keeps on monitoring a folder for new files
coming in.
Finally once the day is fininshed I will have a copy of the master folder in
another location also. I need to do this on receipt of each file, not finall
y
at the end of a day.
Thanks & Regards,
VB Babunath
"Rogas69" wrote:

> Hi, there's a script I am using to copy files:
> USE [msdb]
> GO
> /****** Object: Job [CopyToCluster] Script Date: 03/20/2006 15:24:31 ******/
> BEGIN TRANSACTION
> DECLARE @.ReturnCode INT
> SELECT @.ReturnCode = 0
> /****** Object: JobCategory [Database Maintenance] Script Date: 03/20/2006
> 15:24:31 ******/
> IF NOT EXISTS (SELECT name FROM msdb.dbo.syscategories WHERE name=N'Databa
se
> Maintenance' AND category_class=1)
> BEGIN
> EXEC @.ReturnCode = msdb.dbo.sp_add_category @.class=N'JOB', @.type=N'LOCAL',
> @.name=N'Database Maintenance'
> IF (@.@.ERROR <> 0 OR @.ReturnCode <> 0) GOTO QuitWithRollback
> END
> DECLARE @.jobId BINARY(16)
> EXEC @.ReturnCode = msdb.dbo.sp_add_job @.job_name=N'CopyToCluster',
> @.enabled=1,
> @.notify_level_eventlog=2,
> @.notify_level_email=0,
> @.notify_level_netsend=0,
> @.notify_level_page=0,
> @.delete_level=0,
> @.description=N'Copies all files rom the local backup directory to
> \\datacluster\\Backup',
> @.category_name=N'Database Maintenance',
> @.owner_login_name=N'YOUR_USER', @.job_id = @.jobId OUTPUT
> IF (@.@.ERROR <> 0 OR @.ReturnCode <> 0) GOTO QuitWithRollback
> /****** Object: Step [Copy files] Script Date: 03/20/2006 15:24:31 ******/
> EXEC @.ReturnCode = msdb.dbo.sp_add_jobstep @.job_id=@.jobId, @.step_name=N'Co
py
> files',
> @.step_id=1,
> @.cmdexec_success_code=0,
> @.on_success_action=1,
> @.on_success_step_id=0,
> @.on_fail_action=2,
> @.on_fail_step_id=0,
> @.retry_attempts=2,
> @.retry_interval=0,
> @.os_run_priority=0, @.subsystem=N'CmdExec',
> @.command=N'c:\copybackups.cmd $(DATE)$(TIME)',
> @.flags=4
> IF (@.@.ERROR <> 0 OR @.ReturnCode <> 0) GOTO QuitWithRollback
> EXEC @.ReturnCode = msdb.dbo.sp_update_job @.job_id = @.jobId, @.start_step_id
=
> 1
> IF (@.@.ERROR <> 0 OR @.ReturnCode <> 0) GOTO QuitWithRollback
> EXEC @.ReturnCode = msdb.dbo.sp_add_jobschedule @.job_id=@.jobId,
> @.name=N'CopyBackupFilesSched',
> @.enabled=1,
> @.freq_type=4,
> @.freq_interval=1,
> @.freq_subday_type=1,
> @.freq_subday_interval=0,
> @.freq_relative_interval=0,
> @.freq_recurrence_factor=0,
> @.active_start_date=20060106,
> @.active_end_date=99991231,
> @.active_start_time=50000,
> @.active_end_time=235959
> IF (@.@.ERROR <> 0 OR @.ReturnCode <> 0) GOTO QuitWithRollback
> EXEC @.ReturnCode = msdb.dbo.sp_add_jobserver @.job_id = @.jobId, @.server_nam
e
> = N'(local)'
> IF (@.@.ERROR <> 0 OR @.ReturnCode <> 0) GOTO QuitWithRollback
> COMMIT TRANSACTION
> GOTO EndSave
> QuitWithRollback:
> IF (@.@.TRANCOUNT > 0) ROLLBACK TRANSACTION
> EndSave:
>
> and this is copypackups.cmd:
> rem PR 2006-01-09
> rem This batch file copies daily backups of databases to network location
> rem
> @.echo . > c:\copybackups.log
> @.echo %1 Copying files from c:\SQLBackup to \\datacluster\Backup... >>
> c:\copybackups.log
> xcopy c:\SQLBackup\*.* \\datacluster\Backup\*.* /L /R /H /D /V /Y /F /C >>
> c:\copybackups.log
> xcopy c:\SQLBackup\*.* \\datacluster\Backup\*.* /R /H /D /V /Y /F /C >>
> c:\copybackups.log
> @.echo done >> c:\copybackups.log
> @.echo . >> c:\copybackups.log
>
> Note that this file does not use date and time passed by the job. I have
> another job that removes older files from local directory.
> HTH
> Peter
>
>

Monday, February 20, 2012

Questions to the Microsoft guys about the custom assembly

Hi Guys,

I created a custom assemy and added a reference to it in my report, but when I built the report, it told me that the system could not find the file. I followed the steps in the MSDN when I did the above steps. Can anybody tell me why?

Another question is about the location of the assmbly that I should copy. In the Debugging Custom Assemblie chapter on MSDN, it tells to copy my assembly to

C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE.

But in Deploying a Custom Assembly chapter, it tells me to copy it to

C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies.

Can Microsoft guys tell me which is correct?

Thanks in advance.

Danny

C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies is the correct location for the report designer in BI Development Studio.

-- Robert

|||

Hi Robert,

Thank you very much for your answer. My another question is I can only refer to my custom assembly when I use strong name for the assembly and put it into GAC. Or else, the report designer just told me that the file or its dependecies counld not be found. But put the assembly into the GAC means I cannot debug my assembly. Could you give me some tips on this? (I followed all the steps I could find on the MSDN)

Thanks in advance.

Danny